History log of /system/extras/simpleperf/cmd_report_sample.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52190a377feeb1dccaae5034c51f0130c24dea09 02-Jun-2017 Yabin Cui <yabinc@google.com> simpleperf: add thread name in report_sample.proto.

Bug: http://b/62189080
Test: run simpleperf_unit_test.
Change-Id: I3c96f6474e56b2f51a00f85082973e5d1c1aec72
/system/extras/simpleperf/cmd_report_sample.cpp
b3675a5db81d02b07b92f8f13d37187a9cb4890c 15-May-2017 Yabin Cui <yabinc@google.com> simpleperf: fix report_sample_test.

When running cmd_report_sample.* tests, it may call
ReportSampleCmd()->Run() more than once. If we shutdown
protobuf library in one call, using protobuf in the
following calls will encounter failures.

Bug: http://b/37996565
Test: run CtsSimpleperfTestCases.
Change-Id: I5ca217406e786645d45fda518055c4a63ab3db3c
/system/extras/simpleperf/cmd_report_sample.cpp
07ee9416bcaf6b1e2da2fadbc73995d27dbebb42 02-May-2017 Yabin Cui <yabinc@google.com> simpleperf: add 'event_count' field in report proto.

Bug: http://b/37294023
Test: run simpleperf_unit_test.
Change-Id: Ib16eec55512769a9a241c8ff054179d450488142
/system/extras/simpleperf/cmd_report_sample.cpp
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/cmd_report_sample.cpp
aba7e29f163b4a332a9d3fe9973d82c7d0db148f 11-Nov-2016 Yabin Cui <yabinc@google.com> simpleperf: dump only needed symbols in file feature section.

Instead of dumping all symbols in the hit elf files, dump only
needed symbols can save a lot of space. To do so, read perf.data
after recording to collect hit file and symbol information.

Bug: http://b/32340274
Test: test using `simpleperf record --dump-symbols` manually.
Test: run simpleperf_unit_test.
Change-Id: I480f3e2e7ccebfbb5df16a597724f5f40d62c821
/system/extras/simpleperf/cmd_report_sample.cpp
16501ffbd73483c498dde1ea4ad2670da7c9df55 20-Oct-2016 Yabin Cui <yabinc@google.com> simpleperf: use file records in protobuf output.

Dump file name and symbol name for each CallChainEntry
takes too much space. So instead we store file_id and
symbol_id for each CallChainEntry, and store file
records separately.

In CallChainEntry, replace ip with vaddr_in_file, because
vaddr_in_file is more useful in finding instructions in
elf file.

Bug: http://b/32210800
Test: simpleperf_unit_test.
Change-Id: I85542db21acbaa4d81b3c3aa7f9215f2d23c4878
/system/extras/simpleperf/cmd_report_sample.cpp
010b232198b1eab7c9fcba099a5565b03faba695 05-Nov-2016 Yabin Cui <yabinc@google.com> simpleperf: make file feature section used in more report commands.

Bug: http://b/32340274
Test: run simpleperf_unit_test.
Change-Id: I0bed466c145fdbb2988308f56a031c06bad16352
/system/extras/simpleperf/cmd_report_sample.cpp
a447c0d5f1d5227af30c0cbb4320ad878bd78c43 26-Aug-2016 Yabin Cui <yabinc@google.com> simpleperf: add python report interface on linux.

1. Build libsimpleperf_report.so on host, which exports functions
to access samples.
2. Add simpleperf_report_lib.py to wrap libsimpleperf_report.so.
3. Write report_sample.py to test simpleperf_report_lib.py. The
output format of report_sample.py matches the need of building
FlameGraph.

Bug: http://b/31069528
Test: run report_sample.py on perf.data.
Test: run simpleperf_unit_test.

Change-Id: I4949f8ea506f12101a9c4fb4c896957c96676853
/system/extras/simpleperf/cmd_report_sample.cpp
190a848fb2d4f502372b2528c55ca1f520e90609 04-Aug-2016 Yabin Cui <yabinc@google.com> simpleperf: keep binary in class Record.

It removes memory copy and heap allocation/deallocation in
Record::BinaryFormat(), and is a preparation to remove memory
copy and heap allocation in Record constructor.

Bug: 30649868
Test: run simpleperf_unit_test.
Change-Id: Ic8dd80e43f7b547a9beaf896d726b56aeb5d55a2
/system/extras/simpleperf/cmd_report_sample.cpp
587fb9b5b85e93a212586e6f98009860da0512ed 27-Jul-2016 Yabin Cui <yabinc@google.com> simpleperf: report lost record situation in report-sample command.

Bug: http://b/28114205
Change-Id: I1dc1389fb62596811a27d8dab5cbd214437457ee
Test: run simpleperf_unit_test.
/system/extras/simpleperf/cmd_report_sample.cpp
71b533b5a2902c75901c9e3fc9da3befd53e54dc 21-Jul-2016 Yabin Cui <yabinc@google.com> simplperf: improve unknown symbol print in report-sample command.

Add * for all unknown symbols, so it is easier to write program to
identify unknown symbols.
Use dso[+ip_offset] for unknown symbols.

Bug: 28114205
Change-Id: I14cfffe6673a9aedc62cc288c1b2d724ab411f5d
/system/extras/simpleperf/cmd_report_sample.cpp
09dad97ae5110e9c706bba4b48e7aa8fb429d585 20-Jul-2016 Yabin Cui <yabinc@google.com> simpleperf: add thread_id in report_sample's output.

Also fix enum Type in report_sample.proto.

Bug: 28114205
Change-Id: Ia4e6a31a69095c8183544e2d53c8ceddc10ccb51
/system/extras/simpleperf/cmd_report_sample.cpp
5674ed87431f2d9b05f4ec0c7f7c2e56e585c956 12-Jul-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in simpleperf.

* Declare explicit conversion constructors.

Bug: 28341362
Change-Id: I9d5b764fe004e291cbdd212617df6f385c31df25
Test: build with clang-tidy
/system/extras/simpleperf/cmd_report_sample.cpp
9970a2344333f2c19d9126cfec4f833f50ff2f22 29-Jun-2016 Yabin Cui <yabinc@google.com> Simpleperf: add vaddr_in_file sort key in report command.

Currently report command can't report more details than function name.
After adding vaddr_in_file sort key, it can report the place of the
instruction being sampled. vaddr_in_file is the instruction's virtual
address in elf file, which matches output generated by objdump.

Bug: 29826956
Test: run simpleperf_unit_test.
Change-Id: Ifad4dfb7c60014a03c01ffbfd0b972858f1a4884
/system/extras/simpleperf/cmd_report_sample.cpp
42c8dc673e9edcfa9b315580cee2352c3db9f3e6 04-Jun-2016 Yabin Cui <yabinc@google.com> simpleperf: support report samples using format defined by protobuf.

Bug: 28114205
Change-Id: Idf6d64b8418b3d55d5a43f6096dd2d69764692c0
/system/extras/simpleperf/cmd_report_sample.cpp
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/cmd_report_sample.cpp