summaryrefslogtreecommitdiff
path: root/simpleperf/doc
AgeCommit message (Collapse)Author
2022-03-30simpleperf: update doc for supporting ETM in the kernel.Yabin Cui
1. Recommend building coresight driver as modules on kernel 5.10+. 2. Add a link of missing patches in kernel 5.4. 3. Suggest optional flags in ETM device tree. Bug: 226705914 Test: None Change-Id: I79cbb05fce4677c869c5b56a74b2633548d4f282
2022-02-24simpleperf: add view_the_profile.md.Yabin Cui
This makes viewing-the-profile section of go/gmm-profiling externally visible, with a few changes: 1. Use com.example.android.displayingbitmaps as the profile example. 2. Add instructions to build FlameScope before running FlameScope. 3. Add example of opening trace files in Android Studio. 4. Add simpleperf report command and custom report interface sections. Bug: 203559486 Test: none Change-Id: Iab87869ecc1eb9f3c073d3ec758866a5059e9d8e
2022-01-27simpleperf: add doc for getting boot-time profile.Yabin Cui
Bug: 214731005 Test: none Change-Id: If446962e3b32e14be96dd41ea9a926b0634c2fde
2022-01-07simpleperf: support filter file in RecordFilter.Yabin Cui
filter file is used to filter samples based on time ranges. Also add its format in doc/sample_filter.md. Bug: 211814099 Test: run simpleperf_unit_test Change-Id: Ic6eee3381ec005576d3f333fef502fffe7be59c2
2021-12-22simpleperf: add --print-hw-counter in stat cmd.Yabin Cui
It shows available hardware perf counters on the device. Bug: 195133623 Test: run simpleperf_unit_test Change-Id: If8520225ae715ce3fa93b700bd7b6aa76ce0f77b
2021-12-16Merge "simpleperf: add doc for --proguard-mapping-file."Yabin Cui
2021-12-16simpleperf: add doc for --proguard-mapping-file.Yabin Cui
Bug: none Test: none Change-Id: Idb32e86a420595b47a386fe20bce11e4488eb3db
2021-12-16simpleperf: fix format in README.md.Yabin Cui
Bug: none Test: test in markdown preview. Change-Id: Ib6d448bd89c454f7e49c0a39067ea35a922cb788
2021-12-03simpleperf: a small fix of doc format.Yabin Cui
Bug: 38383695 Test: N/A Change-Id: I56b78206b66957429823ab27030fa97131405dcc
2021-11-29simpleperf: update doc for --trace-offcpu.Yabin Cui
Bug: 38383695 Test: N/A Change-Id: Ieda38df9724f0a567c5652abd6b10d5548c5ce98
2021-11-05simpleperf: update app_api and api_profiler.py.Yabin Cui
Update app_api interface to check persist properties. Update api_profiler.py to use new options in api-prepare cmd. Also refactor api_profiler.py to move functions inside ApiProfiler class. Also update build config of demo packages. Also update test apk files. Apk files targeting prev Q are removed, Because Android Studio already recommends targeting Android 11. Bug: 204601121 Test: run scripts/test/test.py -p TestApiProfiler* Change-Id: I91c3a9f1a5cfeb528af27b1a0648812541121ae3
2021-10-20simpleperf: replace ExampleWithNative with ExampleCpp.Yabin Cui
The native library built in ExampleWithNative is too old to work with current llvm-symbolizer. So replace it with ExampleCpp. ExampleCpp has the same source code, but is built with newer ndk, and has shorter package name. It also drops wrap.sh. Because the gradle file building it no longer works, and wrap.sh is only needed in Android O. Bug: 203246914 Test: none Change-Id: I48e497ef21a24920131bf78c371beaf0bc1efa22
2021-10-08Add: stackcollapse.py converter to Folded StacksMark Hansen
This converts to Brendan Gregg's Folded Stack Format: https://queue.acm.org/detail.cfm?id=2927301#:~:text=The%20folded%20stack%2Dtrace%20format,trace%2C%20followed%20by%20a%20semicolon. This tries to be consistent with https://github.com/brendangregg/FlameGraph/blob/master/stackcollapse-perf.pl, outputting annotations for kernel and JIT code for colour-coding in flamegraph.pl downstream. BUG=201571852 Change-Id: I9083299f5662f87d059b5881d5127e23dbe9e7e3 Test: Ran test/test.py -p TestStackCollapse.\*
2021-10-01simpleperf: Add an introduction slide deck.Yabin Cui
Bug: none Test: none Change-Id: If7c62e9826ddb3b4e9ef8787d0da9c6fac17eaa8
2021-09-28scripts_reference.md: Add an information hierarchy: recorders and viewersMark Hansen
Also add a bunch of code formatting. Change-Id: I9e5ce547bc4bfa9b2a4f33967da8b16e896de324
2021-09-22Merge "Add a simpleperf to Gecko profile format converter"Treehugger Robot
2021-09-23Add a simpleperf to Gecko profile format converterMark Hansen
Gecko Profile Format can be used in https://profiler.firefox.com/, which is a very powerful multi-thread profiler UI. The format is documented here: https://github.com/firefox-devtools/profiler/blob/main/docs-developer/gecko-profile-format.md I have commandeered some metadata fields to show Android-specific data in the Firefox Profiler UI: - Timestamp - Build ID - Simpleperf command line The golden test data was generated with pretty-printing with `jq`: $ ./gecko_profile_generator.py test/testdata/perf_with_interpreter_frames.data | jq > test/testdata/perf_with_interpreter_frames.firefox.json BUG=200472654 Test: Ran test/test.py -p TestGeckoProfileGenerator.\* and opened in Firefox Profiler. Change-Id: I53c5dd5415a0d34dbbdd45fa3031d5b66edc072d
2021-09-22Autogenerate tables of contentsMark Hansen
This fixes some broken links that were assuming the previous markdown formatter's style of generating hash-anchors. Also changed Inferno's headings to start from H1 so the TOC works. BUG=200740465 Change-Id: I9ad8b3694e8792d26153be2abcadbeda976fb920 Test: Haven't, docs-only changes, but I see other [TOC]s working fine.
2021-09-20Remove code block for bullet points that aren't code.Mark Hansen
It looked a bit funny when rendered to markdown before. Change-Id: Iacbc310812c0304c6355c0fe751a56049593cf25
2021-08-12Run simpleperf scripts standalone, letting them choose interpreter with #!Mark Hansen
These scripts all assume Python3, but `python` is still an alias to `python2` on many machines. The #! lines of each of these scripts point to `/usr/bin/env python3` which is more likely correct, and as a bonus, shorter. For example, on my mac, python points to Python 2.7.16. On Windows, #!'s don't work, but there should be a file association for .py files to the Python interpreter. Change-Id: Ia369bc55d8bc6556716ce7ff12733f4c38ba6c57
2021-08-04simpleperf: add doc for enabling etm in the kernel and bootloader.Yabin Cui
Bug: 195324010 Test: none Change-Id: Ia593f7bd58c03cb5ee8f636052ac143babda4edf
2021-07-02simpleperf: add doc for etm and autofdo.Yabin Cui
Bug: 183135316 Test: none Change-Id: I739b41bc46df90d125fed6e2e1221416decc7f52
2021-06-21simpleperf: add doc for debug dwarf unwinding.Yabin Cui
Bug: 181075274 Test: none Change-Id: Id8c8afa36d0ce835c4efd481f6badc3a63271f9c
2021-02-22simpleperf: add purgatorio in scripts.Marco Ballesio
Purgatorio is a visualization tool to show samples in time order. Bug: 159166366 Test: run purgatorio.py manually. Change-Id: Ib70c1080d585218b46a00f5a0534307422ec0d97
2021-02-11simpleperf: add doc about not complete DWARF-based call graphs.Yabin Cui
Bug: 175337276 Test: None Change-Id: I5c4f5b8505afb29608323f7b3cdd2351ca4244b9
2020-09-10Add documentation for generic JIT symbols supportEvgeny Eltsin
Bug: 164091700 Test: none Change-Id: I1e62f85b2ae0af76021c22fab3567d1afcb34e55
2020-07-29Update language to comply with Android's inclusive language guidance.Yabin Cui
See https://source.android.com/setup/contribute/respectful-code for reference. Bug: 161896447 Test: run simpleperf_unit_test. Change-Id: Ib9599bba6cd3a7857c01c11f1a7b862f007dab6e
2020-06-24simpleperf: add doc to show report in android studio.Yabin Cui
Bug: none Test: verified the steps manually. Change-Id: Ic438bc6d6074762a4fc4f5fddaff3e518e3c4dc5
2020-05-14simpleperf: add doc for pmu counter limit.Yabin Cui
Bug: none Test: none Change-Id: I8e76b5e6ac6c55080458fab57aabc6e4adc19393
2020-05-14simpleperf: add doc for starting from system_server.Yabin Cui
Bug: 155429025 Test: none Change-Id: Icf6851bcd46e36a7fc6a0fadfd746fc20335228a
2020-04-10simpleperf: add event check for --trace-offcpu option.Yabin Cui
This is to improve error message for https://github.com/android/ndk/issues/1227. Bug: none Test: run simpleperf_unit_test. Change-Id: Ic74dce593ed9184911350a8a3a62e9c8839cb815
2020-03-24simpleperf: update doc for stat --per-core option.Yabin Cui
Improve document reported by issue https://github.com/android/ndk/issues/1214. Also clean up stat ouptut: 1. Skip output for threads and cpus not running. 2. Tiny fix in column width adjustment. Bug: none Test: run simpleperf_unit_test. Change-Id: Ic032a12daa50bfb4c1552c94d8e7e7822c2f4ad8
2020-02-14simpleperf: add app_api doc.Yabin Cui
Also add a section about profileableFromShell released apps. Bug: none Test: none. Change-Id: I60b0baf8739a76b01b303915d962d4d2af9d7349
2020-01-28simpleperf: add --per-core option to stat cmd.Yabin Cui
When --per-core is used, open perf event file for each cpu for each monitored target, and report event count for each cpu separately. When reporting, add a cpu entry. Rows will be sorted by (event_count_for_a_thread, event_count_for_a_thread_on_a_cpu) in decreasing order. Also add msgs explaining percentages in comment in different situations. Also add a suggestion when EMFILE happens, which is likely to happen when `-a --per-thread --per-core` is used. Also add document. Bug: 148302668 Test: run simpleperf_unit_test. Change-Id: I9f9adcc26f1308fc5e5cd47611d0fad926792da8
2020-01-21simpleperf: add --per-thread option to stat cmd.Yabin Cui
It shows event count for each thread. Bug: 146220391 Test: run simpleperf_unit_test. Change-Id: I6346b787eb630c49631e477d0e83bf1901a9f2b3
2020-01-13simpleperf: add doc to show annotated source code and disassembly.Yabin Cui
Bug: 132371337 Test: none Change-Id: I09b8855af7d8609e7c16c8120cacda46ce83de31
2019-11-19simpleperf: support libraries without build ids when recording.Yabin Cui
Simpleperf can download unstripped libraries on device and use them for unwinding during recording, through `app_profiler.py -lib` and `simpleperf record --symfs` options. But it doesn't support libraries without build ids. To support them: 1. In app_profiler.py, download libraries without build ids in native lib dir. 2. In DebugElfFileFinder in dso.cpp, check path with the same basename in symfs_dir. Also add document for downloading unstripped libraries on device. Bug: none Test: run simpleperf_unit_test. Test: run test.py. Change-Id: I5d9015e683f2ecb992d425a42f1f7303307b2cea
2019-05-16simpleperf: split doc.Yabin Cui
Bug: 132910352 Test: use remarkable to verify links. Change-Id: I049df2c8ed23da1780b1a9e6df04375f5c3b3c12
2019-01-17simpleperf: split simpleperf build on target.Yabin Cui
Currently simpleperf on target builds static binary, shipped on userdebug devices and in ndk release. Now split it into two builds. Simpleperf shipped on device uses shared libs and version lib. Simpleperf shipped in ndk release is renamed to simpleperf_static. This is to ship simpleperf on Q user device. Also change the directory of simpleperf from /system/xbin to /system/bin. Bug: 118835348 Bug: 72403367 Test: build and run simpleperf manually. Change-Id: I25b861fc24fdf2edfeb432050303aaec293a005f
2018-08-16simpleperf: add doc for Android platform profiling.Yabin Cui
Also update for recently added options. Bug: none Test: run remarkable. Change-Id: Ibe464842c91bddeade4740f310617f8cef7dbef3
2018-07-02simpleperf: add doc for building and uploading patches.Yabin Cui
It is to make it easier to contribute patches to simpleperf, especially for people not familiar with AOSP. Bug: none. Test: none. Change-Id: I042c5e12eee7513f8fdd60724f8d0dee37fe8615
2018-06-28simpleperf: add document for app_profiler.py -o option.Yabin Cui
Bug: none Test: none Change-Id: I9277da1d856feda69e9afd82b6eebcc8dd0c96c9
2018-05-01simpleperf: improve words in README.md.Yabin Cui
Changed based on comments in https://android-review.googlesource.com/c/platform/system/extras/+/675481. Bug: none. Test: none. Change-Id: I3d7ab6ec100fd1411c5e04bc8801a93295964ffb
2018-04-30simpleperf: Update doc.Yabin Cui
Bug: none. Test: none. Change-Id: I096ccad9a668850c64cad91ea5baec31dcf83ca7
2018-01-10simpleperf: add missing report html example.Yabin Cui
It is referenced in README.md. Bug: none Test: none Change-Id: I6e194178702f4b7611f3b94f80ab17cd60a05e20
2017-12-14simpleperf: update document about app profiling.Yabin Cui
1. Remove instructions using command lines. Because I think it's easier to understand by focusing on script interface. 2. Remove texts that already exists in references, replace them with links. Bug: http://b/69128787 Test: none. Change-Id: Ia331673cf2e9fd10354d1ec5dc7857f3bb5e74da
2017-11-15simpleperf: refactor introduction in README.md.Yabin Cui
Bug: http://b/69128787 Test: None. Change-Id: I4ba94269c3f5e3c2b9bd4cec61816fab1dea52ae
2017-11-14simpleperf: add scripts reference in README.md.Yabin Cui
Bug: http://b/69128787 Test: None. Change-Id: I58be6b85d2807d115fd35f3e7664207437474f25
2017-11-10simpleperf: refactor executable commands reference.Yabin Cui
1. Use limit of 100 columns per line. 2. Improve sentences. 3. In commands section, add a brief description for each cmd. 4. In the list cmd, add description for raw events. 5. In the record cmd: 5.1 Add example of using -a and --app option. 5.2 Add section of recording call graph. 5.3 Add section of recording off CPU time. 6. In the report cmd, add section of reporting call graph. 7. In the common issues, add suggestion to improve call graph results. Bug: http://b/69128787 Test: none. Change-Id: Ie78095c89e885312eef2080634a563a95bb6f574
2017-11-09simpleperf: move commands reference to the end of the doc.Yabin Cui
Bug: http://b/69128787 Test: none. Change-Id: Iddcf1b9b921b789e2098a7ea8d8cbf57e372e95f