-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support importing simpleperf trace files from Android Studio #5212
Support importing simpleperf trace files from Android Studio #5212
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5212 +/- ##
==========================================
- Coverage 88.61% 86.06% -2.56%
==========================================
Files 308 311 +3
Lines 28051 29582 +1531
Branches 7596 8156 +560
==========================================
+ Hits 24858 25460 +602
- Misses 2979 3542 +563
- Partials 214 580 +366 ☔ View full report in Codecov by Sentry. |
Can you share an example output profile? This importer would be nice to have. As an alternative you can also use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks pretty good! Impressive work!
I suggested a few things, tell me what you think!
Also it would be good to have a few tests, at least one import test. See unit/profile-conversion.test.js for existing tests.
@mstange Thanks for pointing out samply, seems interesting. I'll have a look! Though this only helps when you have control over the perf.data file which might not be available when exporting the profile from Android Studio. @julienw Thanks a lot for the review. I have addressed most of the suggestions. Please have a look? |
a7493d9
to
a97496b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good to me!
I rebased and updated some part of the code that were needed after the rebase and I'm gonna land this soon!
Thanks for your patience
Would you want to add some limited documentation around https://profiler.firefox.com/docs/#/./guide-android-profiling ? |
PR firefox-devtools#5212 added support for importing simpleperf trace file format. Update the documentation on Android profiling to reflect this.
Thanks @julienw for updating and merging. Created #5309 to update the documentation. |
Updates: [Nicolas Chevobbe] Adapt Keyboard shortcut dialog in High Contrast Mode. (#5245) [Nicolas Chevobbe] Fix sidebar-toggle in High Contrast Mode. (#5246) [Nicolas Chevobbe] Fix timeline selection overlay time / hover line in High Contrast Mode (#5247) [Zac Spitzer] fix broken link for processed profile format (#5267) [Greg Tatum] Update the memory allocation docs and add DHAT docs (#5270) [Markus Stange] Simplify some code related to thread CPU deltas (#5265) [Greg Tatum] Update dhat convertor to work better with valgrind (#5269) [Markus Stange] Rename UniqueStringArray to StringTable. (#5283) [Markus Stange] Use snapshot testing in the symbolicator CLI test. (#5284) [Markus Stange] Fix two confused upgraders which didn't expect to be run on the serialized format. (#5285) [Nicolas Chevobbe] Fix timelineSettingsHiddenTracks in High Contrast Mode. (#5250) [Julien Wajsberg] Fix some test and non-test warnings (#5294) [Nisarg Jhaveri] Support importing simpleperf trace files from Android Studio (#5212) [Sean Kim] Add HTTP response status code in the profiler network tab (#5297) [Markus Stange] Change StringTable API a bit. (#5286) [Markus Stange] Correctly declare imported simpleperf trace profiles to be of the current version. (#5312) [Markus Stange] Two small changes (#5313) [Nazım Can Altınova] Show sample tooltips on sample graph hover (#5298) Also thanks to our localizers: en-CA: chutten es-CL: ravmn es-CL: ravmn fr: Théo Chevalier ia: Melo46 ia: Melo46 sv-SE: Andreas Pettersson uk: Lobodzets zh-TW: Olvcpr423
Fix #5203.
Attempt to add importer for simpleperf trace files. These can be generated using the
simpleperf report-sample
command or using Profiler UI in Android Studio.Here is the file format details: https://cs.android.com/android/platform/superproject/main/+/main:system/extras/simpleperf/cmd_report_sample.proto
Added a couple of dependencies to work with protobuf. These will also be useful for more importers in future, I believe pprof also uses protobufs (in discussion at #4462).
This is one attempt. I'm fairly new to the codebase and Flow. Feel free to suggest any changes as required.