History log of /system/extras/simpleperf/sample_tree.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6e75e1b8f560bd3029e22aa9ac04e789e405a007 06-Feb-2018 Yabin Cui <yabinc@google.com> simpleperf: Use cross-arch unwinding.

Enables cross-arch unwinding since the new unwinder supports cross-arch
unwinding.
Also change tests accordingly.

Bug: http://b/73127000
Test: run simpleperf_unit_test.

Change-Id: I3ca3f7a81b40e9f7ea2b39b9fdc951f9e7a6acc7
/system/extras/simpleperf/sample_tree.h
0338145e5418d73c97521c676d31c05e74e01fdd 13-Dec-2017 Yabin Cui <yabinc@google.com> simpleperf: report unwinding failures.

1. When --log debug is used, store unwinding results in
UnwindingResultRecords in perf.data.
2. Use unwinding_result_reporter.py to report unwinding results.

This is to help finding different unwinding failures.

Bug: http://b/69383534
Test: run simpleperf_unit_test.
Test: run unwinding_result_reporter.py manually.
Change-Id: I6d7f107e9758b1ec55ed35b49657bb41d47e2178
/system/extras/simpleperf/sample_tree.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/sample_tree.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/sample_tree.h
0c093f3cc0dbced581c9d430e0ed8cd12def61ce 19-Apr-2017 Yabin Cui <yabinc@google.com> simpleperf: add --brief-callgraph option for report cmd.

Remove duplicated callgraphs (which appears as a sub graph in
another place) in --brief-callgraph mode.
Accept brief callgraph in report.py.
Add unit test for --brief-callgraph option.

Bug: http://b/37444055
Test: run simpleperf_unit_test.
Test: manually run report.py.
Change-Id: I41977762552ec66807f394558352da6cbefaec2e
/system/extras/simpleperf/sample_tree.h
417df291499b37f63fa9b930e081d80a25bf38ec 16-Nov-2016 Yabin Cui <yabinc@google.com> simpleperf: fix dumping arm regs on arm64 devices.

On arm64 devices, the kernel dumps arm64 regs
even for 32-bit processes. So we need to map
from arm64 registers to arm registers.

Bug: http://b/30974693
Test: run simpleperf manually on one app.
Change-Id: Iffeac9510b418b5dabc0604c16523887d63bba49
/system/extras/simpleperf/sample_tree.h
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/sample_tree.h
cf31e9d83d3fff0c0970aa344366136e4d5126a7 14-Jul-2016 Yabin Cui <yabinc@google.com> simpleperf: fix unwind stack size.

Currently, to work around the bug in N9, simpleperf uses
all dumped user stack for unwinding. However, not all of
the data is valid, which can make unwinding result annoying.
So fix this by using only valid stack data if dyn_size != 0.

Bug: 29574526
Test: run simpleperf_unit_test and use simpleperf manually.

Change-Id: Idaa82f3156215fc4fb902d96de290e43726b0e17
/system/extras/simpleperf/sample_tree.h
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/sample_tree.h
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/sample_tree.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/sample_tree.h
b64a86327afe2b77dab7d724d363386c674163b6 25-May-2016 Yabin Cui <yabinc@google.com> simpleperf: refactor SampleTree for reuse.

By moving most function in report command into template classes, it
allows other report commands to reuse the code.

Bug: 27403614
Change-Id: I3d35b3a34d48c5c043ba4257a52eaf0961c12bca
/system/extras/simpleperf/sample_tree.h
c84856093e8bf4350d30fc521dc0f1c800c5270b 21-Aug-2015 Yabin Cui <yabinc@google.com> Simpleperf: refactor dso.

Having DsoEntry and DsoFactory confuses me which part code should belong to.
This change merges the two into class Dso and makes things clear.
It is also a preparation for performance optimization in Dso.

Bug: 23387541
Change-Id: I41e773406a7f1582a11a18859df252ce8ea3acfa
/system/extras/simpleperf/sample_tree.h
38e573ee1958959253ba8f3af7567adb4cbeea55 06-Aug-2015 Yabin Cui <yabinc@google.com> Simpleperf: add filters to report command.

Change-Id: I0e6cec1ce638fd4c832fe398a08168138e22ee7e
/system/extras/simpleperf/sample_tree.h
60a0ea96c0fb9e807c899759256df5e20bd904bd 23-Jul-2015 Yabin Cui <yabinc@google.com> Simpleperf: separate ThreadTree from SampleTree.

It is a preparation for unwinding in record command.

Bug: 22229391
Change-Id: I2f5c6df3f7332d4c98b61c7f9f922456b5bbeaaa
/system/extras/simpleperf/sample_tree.h
ba50c4bba1c3ea7e98a475a3d2ae2e6c24ee81f2 21-Jul-2015 Yabin Cui <yabinc@google.com> Simpleperf: load symbols from dso file only when necessary.

Bug: 22630113
Change-Id: I12bb24ec02ba3ddb94bcb2a26ae2d6e7b445ed4d
/system/extras/simpleperf/sample_tree.h
ecb9a302b52b034610efb85bd73cb473e7c4ddb2 01-Jul-2015 Yabin Cui <yabinc@google.com> Simpleperf: support callgraph option in report command.

Bug: 19483574
Change-Id: I7c5558a71ea15650c1d3e7afa268b3fbc11543d7
/system/extras/simpleperf/sample_tree.h
36c662b538bd89e591b1bfcbce59fc0de3602bf6 30-Jun-2015 Yabin Cui <yabinc@google.com> Simpleperf: support --children option in report command.

1. Refactor code about managing report items.
2. support --children option. It is a preparation to support -g option.

Bug: 19483574
Change-Id: Iba4dc0895c48a9fa1937aed165d7b3a2dc8e5c71
/system/extras/simpleperf/sample_tree.h
be6afa300a01ad1e6cb493e748d709d0b3b5e3b5 25-Jun-2015 Yabin Cui <yabinc@google.com> Simpleperf: don't use designation in struct member initialization.

designation is not supported in c++ standard, and partially initialized
struct can be unsafe.
And use constexpr when desired.

Bug: 19483574
Change-Id: I4f445845a7d97aeb685f02176485c70f8b0ca995
/system/extras/simpleperf/sample_tree.h
8a530e3bae0cc031d60e397c347e96f44487e919 24-Jun-2015 Yabin Cui <yabinc@google.com> Simpleperf: add option to report branch stack information.

Bug: 19483574
Change-Id: If98e6d3e7a171bb4f2aa7f5d4be43586a6286f56
/system/extras/simpleperf/sample_tree.h
41d4ba9f6f2781155a0519a784606d5382cda88f 22-Jun-2015 Yabin Cui <yabinc@google.com> Simpleperf: better support for per thread comm.

1. Move ProcessEntry to ThreadEntry, and add thread_comm in SampleEntry.
2. Add support of ForkRecord and Mmap2Record.
3. Dump ForkRecord for each thread in record command.
4. Add sort key 'tid' in report command, and change default keys.

Bug: 19483574
Change-Id: Iacc690637154aeb7b6f85373730beb50d638ce86
/system/extras/simpleperf/sample_tree.h
22ec7fa2032610b6868e4fb8997bb28aee0dea84 11-Jun-2015 Yabin Cui <yabinc@google.com> Simpleperf: improve records parsing.

Sort records by time before handling.
Separate kernel space and user space sample records handling.

Bug: 19483574

Change-Id: I7722bb15678af18cbe883a2cf3fdac948bdd0c9f
/system/extras/simpleperf/sample_tree.h
ec12ed9010128483993a87d68edc02d3a89d56cf 08-Jun-2015 Yabin Cui <yabinc@google.com> Simpleperf: support symbol parsing in report command.

Also fix the storage of ProcessEntry.

Bug: 19483574
Change-Id: I2182a804f6ecbd28e7aa3c1a38a6f19b86f583c9
/system/extras/simpleperf/sample_tree.h
b47de4af4d9a1ceffa74a148f6e89be4dbb62bcd 08-Jun-2015 Yabin Cui <yabinc@google.com> Simpleperf: remove overlapped user map in SampleTree.

If a new map overlapps with some old maps, the overlapped old
maps are not valid any more and should be removed.

Bug: 19483574
Change-Id: Ie5df5073d0c8c3727ab05163ef27537618bb416e
/system/extras/simpleperf/sample_tree.h
2672dea3f1112b13678103023011c797ca283bac 21-May-2015 Yabin Cui <yabinc@google.com> Add simpleperf report command.

Only support report of process/file level. Symbol parsing is not included.

Bug: 19483574
Change-Id: I6d1c67000bd0e303623183912ff06fdeeb51c5e9
/system/extras/simpleperf/sample_tree.h