c3bf9d08671e8d41d24eeb5978a01b2dd40d0bc4 |
|
02-Feb-2018 |
Yabin Cui <yabinc@google.com> |
simpleperf: add debug-unwind cmd. Currently, we use --log debug option in record cmd to debug offline unwinding. However, it has below disadvantages: 1. It adds extra complexity in record cmd. 2. It doesn't keep reg/stack data of samples. 3. It isn't convenient to reproduce samples in problem. Because each time recording gets different samples. 4. It isn't very suitable for performance test of unwinding, for the same reason as item 3. So instead, this CL adds debug-unwind cmd focusing on debugging and testing offline unwinding. It solves problems mentioned above. Also change unwinding_result_reporter.py to make it work with perf.data generated by debug-unwind cmd. Bug: http://b/72556486 Test: run simpleperf_unit_test. Test: run unwinding_result_reporter.py manually. Change-Id: I11cdf1eba993f48d61ef9891ad1be54d29679fdb
/system/extras/simpleperf/get_test_data.h
|
81a9d33dd0d753e4d4915dfb6f453b916be08813 |
|
10-Dec-2017 |
Yabin Cui <yabinc@google.com> |
simpleperf: Use CallChainJoiner. 1. In record cmd, split most code in Run() into three functions to make it easier to maintain. 2. In record cmd, use CallChainJoiner by default when -g option is used. And allow using --no-callchain-joiner option to disable the joiner, and --callchain-joiner-min-matching-nodes to adjust the joiner. 3. Adjust the interface of UnwindCallChain() to return sps used by the joiner. 4. Add functions in SampleRecord to use callchains returned by the joiner. Add CallChainRecord to keep callchains returned by the joiner for debugging. 5. In dump cmd, show callchains of SampleRecord and CallChainRecord for debugging. Bug: http://b/69383534 Test: run simpleperf_unit_test. Test: run python test.py. Change-Id: I951b169dfba0f7c50b6d4d741df83f02f8010626
/system/extras/simpleperf/get_test_data.h
|
68b8383d76a7a18bdaee13949cc66ca012cc3dee |
|
20-Jul-2017 |
Yabin Cui <yabinc@google.com> |
simpleperf: support tracing offcpu time. 1. Add --trace-offcpu option in record command, to record the callstack when a thread is scheduled off cpu. 2. Change the report command to report time spent not running on cpu when --trace-offcpu option is used for recording. 3. Add related unittests and runtests. Bug: http://b/37572306 Test: run simpleperf_unit_test. Change-Id: Ia50cc39c8dde0c8fb1b1facbcb26bbd0a7ab1351
/system/extras/simpleperf/get_test_data.h
|
dcb2a3e580f155bb28621c4cbad019d104e8f300 |
|
19-May-2017 |
Yabin Cui <yabinc@google.com> |
simpleperf: enable two options by default. Enable dumping symbols in record cmd by default, and change --dump-symbols option into --no-dump-symbols option. Show brief call graph in report cmd by default, and change --brief-callgraph option into --full-callgraph option. Make the change because these two behaviors are always recommended. Bug: None. Test: run simpleperf_unit_test. Change-Id: Icff6a843a7f46c56313500f4da119aa5118a57e5
/system/extras/simpleperf/get_test_data.h
|
98c7584c1c6cb93ad3e0f66e2a6f1d6b2d8fb878 |
|
28-Apr-2017 |
Yabin Cui <yabinc@google.com> |
simpleperf: fix unknown binary in samples. 1. Wrong ip addresses in callchain can map to unknown binary. They should be omitted. 2. When unknown binary is really hitted in samples, which is unlikely to happen, make sure report-sample cmd will not skip the file id of unknown binary. 3. Add corresponding test. Bug: http://b/37783312 Test: run simpleperf_unit_test. Change-Id: Ifb5b59401bce9c8f81042015e73f190acd43ce31
/system/extras/simpleperf/get_test_data.h
|
044861ba8d71688940b6500f68458fae0791517c |
|
14-Dec-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: check invalid perf.data. Bug: http://b/33558210 Test: run simpleperf_unit_test. Change-Id: If5a1f7fc9c436a39776f80f1e52479f1cd7ff407
/system/extras/simpleperf/get_test_data.h
|
c0565bb21e2997d7a01dda40ea2b16e067e7e28c |
|
30-Sep-2016 |
Yabin Cui <yabinc@google.com> |
Simpleperf: add --max-stack and --percent-limit options for report cmd. Bug: http://b/24905115 Test: run simpleperf-unit-test. Change-Id: I177f618f923f90069c0380063f0c3f93427dedd7
/system/extras/simpleperf/get_test_data.h
|
eafa7188ac41584555d36ac0c19f3c7fc66d42cc |
|
30-Aug-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: fix two errors. Fix two errors when reporting perf.data generated by linux perf. And add corresponding tests. Test: run simpleperf_unit_test. Change-Id: I04dd88461fdd6a85763847570bac16db1ccb81fa
/system/extras/simpleperf/get_test_data.h
|
861f655538b17ed37cf5d9bcadc71f22d3a0a6e9 |
|
08-Aug-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: fix --pids option. --pids option was recognized as --tids because of logic error. this patch fixes that and adds corresponding test. Bug: http://b/30736228 Change-Id: I0515fc7e03f29f821f7b0aa32c608cf250e87662 Test: run simpleperf_unit_test.
/system/extras/simpleperf/get_test_data.h
|
dec43c18d06415a955b8f32355bca925be901905 |
|
30-Jul-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: print warning message when failed to read symbol table from elf file. Change return type of read elf functions to ElfStatus, and print warning message based on situation. Add corresponding test. Bug: 29193936 Change-Id: Ie449f8be34cb579962cb73f4be3df9e4997270ca Test: run simpleperf_unit_test.
/system/extras/simpleperf/get_test_data.h
|
c855ecc6becfe5d1c2445094aa525856e4538f7c |
|
12-Jul-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: add min_vaddr in DsoRecord. Min virtual address of a shared library is needed when mapping ip addresses to function symbols. So we should dump it in DsoRecord. Bug: 28114205 Test: run simpleperf_unit_test. Change-Id: Ib986ee598281cf60caa3a2c5408100b9e7678143
/system/extras/simpleperf/get_test_data.h
|
05ef2eab98caee49b6b27cac518856b7f5124bee |
|
11-Jul-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: change the separator of --symbols option from comma to semicolon. Function name of c++ can have comma, like func2(int, int). So it is not proper to use comma to separate function names. Bug: 29826956 Change-Id: I9da4bc178232dad53abdc5735358f3feb608fee4 Test: run simpleperf_unit_test.
/system/extras/simpleperf/get_test_data.h
|
eec606cfefcb8cb20ac0f9e3465daff09fb31ffd |
|
07-Jul-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: fix build id check of files in symfs. In dso.cpp, build_id_map_ should use path_ instead of GetAccessiblePath() as the key. However, patch https://android-review.googlesource.com/#/c/175654/ wrongly used GetAccessiblePath() as the key in build_id_map_. This patch fixes the error and add corresponding test. Check if file in symfs exists before using it as debug file path. If the build id of debug file path doesn't match the one in build_id_map_, output warning to user. Bug: 28911532 Test: run simpleperf_unit_test. Change-Id: I21bca508359a492245db4cba5d287005363cd465
/system/extras/simpleperf/get_test_data.h
|
1761a271faf98050891ba6e918993225782c811a |
|
24-Jun-2016 |
Yabin Cui <yabinc@google.com> |
Simpleperf: Add SPLIT and SPLIT_END records to handle big records. Previously we split KernelSymbolRecord because it is > 65535. Then I found TracingDataRecord can also be > 65535. So it is better to handle big records when reading and writing perf.data. record_file_writer.cpp splits a big record into multiple SPLIT records followed by a SPLIT_END record, and record_file_reader.cpp restores the big record when reading SPLIT and SPLIT_END records. Also Add RecordHeader to represent record having size > 65535. Bug: 29581559 Change-Id: I0b4556988f77b3431c7f1a28fce65cf225d6a067 Test: run simpleperf_unit_test.
/system/extras/simpleperf/get_test_data.h
|
6965d42c43f12fd2dfcca3c490b51edc67822586 |
|
15-Jun-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: add kmem command to report slab allocation information. Bug: 27403614 Change-Id: Id3015a4828ec32170ea1db3a1580b14a8bd159ba
/system/extras/simpleperf/get_test_data.h
|
767dd17947f1ae9dd3d02f738d442a23ed76f2f6 |
|
03-Jun-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: add report-sample command. 1. Add report-sample command to report each sample with symbol information. 2. Add --dump-symbols option to record command to collect dso and symbol information in perf.data. Bug: 28114205 Change-Id: I37424ee6abd74a21ad41cd3b6c4249cf0625c201
/system/extras/simpleperf/get_test_data.h
|
b42129797f17f990ea5a88c6bdc7446000cc361c |
|
25-May-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: record kernel symbols in perf.data. To better support kernel profiling, record kernel symbols in perf.data when necessary. An option --no-dump-kernel-symbols is added in record command to always avoid recording kernel symbols. The way to handle all zero /proc/modules and /proc/kallsyms is improved. Add Better support in finding symbols for kernel modules. Bug: 27403614 Change-Id: I470151c54f8a45ad1c101c1b94490e33d7fd7485
/system/extras/simpleperf/get_test_data.h
|
2d6efe4b167da4e6b77f168b1820239ee65599e2 |
|
02-Apr-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: support reporting more than one event type. When sampling kernel trace points, it is like to sample more than one even type. Like `simpleperf record -e kmem:mm_page_alloc,kmem:mm_page_free`. 1. change record command to dump event_id for all records. 2. change report command and record reader to support multiple event attrs. 3. hide record_cache inside EventSelectionSet. 4. add test to report multiple event types. Bug: 27403614 Change-Id: Ic22a5527d68e7a843e3cf95e85381f8ad6bcb196
/system/extras/simpleperf/get_test_data.h
|
4b6720d137c15b9485318255e89ffcd3c76ab579 |
|
31-Mar-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: loosen unwinding arch check for system wide collection. When doing system wide collection, it is possible that there are 32-bit compat processes running on 64-bit devices. It is not proper to abort in this situation. So loosen the check to allow it. Also add corresponding test. Bug: 27927427 Change-Id: I5c9253eb6e474497e4f37e234e0e523e141fab20
/system/extras/simpleperf/get_test_data.h
|
8f680f60dc800bec880c5c35bfbc1ac36165e1f3 |
|
19-Mar-2016 |
Yabin Cui <yabinc@google.com> |
Simpleperf: add test for reporting callgraph of shared libraries in apk file. Also add comment for how to generate each perf.data in testdata/. Add --log <leve> argument in unit test to help debugging. Bug: 26962895 Change-Id: Iaa5a81cd8da5174d5b5b4e7847811e2432bf0db8
/system/extras/simpleperf/get_test_data.h
|
05400539d15c50a52a388daba2e831b86824cc8e |
|
18-Mar-2016 |
Yabin Cui <yabinc@google.com> |
Simpleperf: support reading symbols from .gnu_debugdata. As in https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html, elf files can store mini debug information in .gnu_debugdata. Bug: 27744639 Change-Id: If4a53a4a1332824388ee309ac63a008dc5cf8d5c
/system/extras/simpleperf/get_test_data.h
|
be7ec66eaa4f995bd9068637f7c7d5718173922c |
|
02-Mar-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: support building cts test. 1. build cts test libraries. 2. change tests to use tmpfile instead of perf.data. 3. support extracting testdata from cts test file. Bug: 27387280 Change-Id: I7c5db77f3157d586d0c9beb446b247626e7cce36
/system/extras/simpleperf/get_test_data.h
|
6e51bef9aa101307523946df301ca90215d0ee82 |
|
24-Feb-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: port cmd_report_test to nonlinux. And fix one build_id bug introduced by previous patch. Bug: 26962895 Change-Id: Ibb8bd6ec77ee862bb01c26342d3b3024468e75b2
/system/extras/simpleperf/get_test_data.h
|
b1a885b014540a2f7798b5a35ea0f0ec150d93ee |
|
15-Feb-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: report symbols of native libraries in apk file. Changes included: 1. provide interface in read_apk.h to read build id and symbols. 2. report symbols of native libraries in apk file. 3. refactor code in read_elf.cpp and read_apk.cpp. 4. add verbose log. 5. add -o report_file_name option for report command. 6. add corresponding unit tests. Bug: 26962895 Change-Id: I0d5398996e0c29dba4a6f5226692b758ca096bbd
/system/extras/simpleperf/get_test_data.h
|
569f64afd3db2b43003978765b833669f99477d2 |
|
06-Feb-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: port read_apk and read_apk/read_elf tests to nonlinux. Also make following small changes: 1. Manage testdata files like libziparchive. 2. Replace StringToPid() with android::base::ParseInt(). 3. Add tests in read_elf_test. Bug: 26962895 Change-Id: I6603e9f3cea3a013e2618ea003790d102739f843
/system/extras/simpleperf/get_test_data.h
|