b6b433224c144c46a08e5b118df3ce6501571aec |
|
04-May-2017 |
Yabin Cui <yabinc@google.com> |
simpleperf: fix tracing counters. Previously prev_counter is an uninitialized value, which makes the tracing result not correct. Test: run simpleperf/systrace.py to profile an app. Change-Id: I440771f705e22dec7a2948cb2f1164c17d41259a
/system/extras/simpleperf/event_fd.h
|
26968e6c48dea2eaa217991ade5a04e801f1be8f |
|
30-Jan-2017 |
Yabin Cui <yabinc@google.com> |
simpleperf: add inplace-sampler event type. Add inplace-sampler event type, so it can be used in record/list command. This cl doesn't add code for communicating with profiled process, and fake records in InplaceSamplerClient.cpp for testing purpose. Refactor runtest.py to test inplace-sampler profiling. Bug: http://b/30974760 Test: run runtest.py --inplace-sampler. Change-Id: I92d8b03583c58b3589207f5c655e03853899be3a
/system/extras/simpleperf/event_fd.h
|
2ea6de11962fea5613f15308b202fb505e57ae9b |
|
25-Oct-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: merge records from different buffers in memory. By reading records from all buffers at once, we can merge records in memory instead of sorting them in perf.data. To make it clear, this patch only contains the code to merge records in memory, and I will remove old method later. Bug: http://b/32343227 Test: run simpleperf_unit_test. Test: run simpleperf_runtest.py. Change-Id: Iea2da06c072243c2014f43c8aa6d96a23cfb9123
/system/extras/simpleperf/event_fd.h
|
825e56be3a1c5310969aaa3e10a7cd1f63455189 |
|
27-Aug-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: support hotplug events in record cmd. 1. When a cpu is down, read records from event files on that cpu, then close those event files. 2. When a cpu is up, open event files on that cpu, and create mapped buffer for those event files to dump records. 3. Instead of creating a mapped buffer for each event type on each cpu, we can just create a mapped buffer for all event types on each cpu. 4. When new event files are created, store a EventIdRecord record in perf.data to notify record_file_reader.cpp. Bug: http://b/29245608 Test: run simpleperf record cmd and make cpu offline and online. Test: run simpleperf_unit_test. Change-Id: Ib97a24b6292fa143e9b35cb105bdddf1e826d60a
/system/extras/simpleperf/event_fd.h
|
dbbda3020c483a8da2e9ce985c1e9d8b7bcc8ec0 |
|
28-Jul-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: use libevent in record command. Support read Event in IOEventLoop, test it, and use it in record command. Format related code and clean up some comments. Bug: http://b/30405638 Change-Id: I3b07d50b0374be3f3e7ee9fa4d0c0ccc8ae21a2b Test: run simpleperf_unit_test.
/system/extras/simpleperf/event_fd.h
|
0a072cda021e5dfbdbb39f4d8d30771a851b3c3a |
|
14-Jul-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: adjust mapped buffer size in record command. Instead of fixing the mapped buffer size, we can adjust it at runtime. So users don't need to adjust -m manually. Bug: 29574526 Change-Id: Icb580df3d60f8d2cf554c0d4139e6f7f64b19f8f Test: run simpleperf_unit_test.
/system/extras/simpleperf/event_fd.h
|
6173592d3d086b8e493590d626fdbdb4e344c433 |
|
08-Jul-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: combine mapped buffer used for the same event and cpu. Non root users have a size limit of buffers used for profiling. By combining buffers used for the same event and cpu, we can reduce buffer cost when monitoring multiple threads, thus avoid mmap() failures. Increase default value for -m option for non system wide profiling. Bug: 28911532 Change-Id: I91148061eb54840c144cf72e7bb901e7b74897ec Test: run simpleperf_unit_test.
/system/extras/simpleperf/event_fd.h
|
877751bbae11e009070e036ee1cd16e88135fff5 |
|
14-Jun-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: support event group. Kernel supports monitoring several events as a group, so they are scheduled on and out at the same time. Add --group option to stat command and record command. Adjust the method to calculate miss rate in stat command: limit the matched events in the same group or with scale == 1.0. Bug: 29213742 Change-Id: I899aba207f1e3357307541e81f97526f5a2913c3
/system/extras/simpleperf/event_fd.h
|
5633586f0efc54dbaecad3deeb8568786317832d |
|
18-Apr-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: improve cpu_hotplug tests. Add cpu hotplug test for ioctl(PERF_EVENT_IOC_ENABLE), and improve cpu_hotplug tests by removing sleep calls. Bug: 28384580 Change-Id: I5869cd9bb3086b6f3a73cf7dce4ffd720326c3c6
/system/extras/simpleperf/event_fd.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/event_fd.h
|
19e6b6d372a1244189dc2df62313085a61ed1a80 |
|
10-Mar-2016 |
Yabin Cui <yabinc@google.com> |
simpleperf: check if dwarf callgraph is supported by kernel before testing. Move inclusion of poll.h from header files to source files, as event_selection_set.h is used by cmd_report_test.cpp, which can be built on windows. Bug: 27590546 Change-Id: Ic6b141a93d96610f911ab52da1d927b7f619ccb2
/system/extras/simpleperf/event_fd.h
|
b9ca50b319d2083c5a92c468e54796b0e71a4ad9 |
|
05-Dec-2015 |
Yabin Cui <yabinc@google.com> |
Merge "Simpleperf: don't use ioctl(PERF_EVENT_IOC_ENABLE)."
|
66dd09e8e2407082ce93bf0784de641298131912 |
|
04-Dec-2015 |
Elliott Hughes <enh@google.com> |
Track rename from base/ to android-base/. Change-Id: Ic15d4778c7accd1382de0b440a437aba2cf67016
/system/extras/simpleperf/event_fd.h
|
a46794fa2963de93a9d25fd6945d3c58121e2ba6 |
|
03-Dec-2015 |
Yabin Cui <yabinc@google.com> |
Simpleperf: don't use ioctl(PERF_EVENT_IOC_ENABLE). Some android kernels(like bullhead/angler) can't handle ioctl(PERF_EVENT_IOC_ENABLE) correctly when cpu-hotplug happens. Instead of fixing all of them in kernel, we can't simply don't use it. Bug: 25193162 Change-Id: I9df1458045ffd2ccc2c7ba393e746ebba7c253de
/system/extras/simpleperf/event_fd.h
|
f469c3d7f4466a2a31c3e837969c43c1e3bc4c90 |
|
08-Oct-2015 |
Yabin Cui <yabinc@google.com> |
Simpleperf: do stack unwinding while recording. Dumping user's stack consumes lots of disk space, which makes long period recording impossible. This patch does stack unwinding before writing to perf.data, so it doesn't need to save user's stack. Previous behavior is still supported with --post-unwind option. A record cache is used for online record processing. Bug: 22229391 Change-Id: Idcc6ec46924fff3fcc8c165d62f8af875b173cd4
/system/extras/simpleperf/event_fd.h
|
04d08a35c5e1cabdf6eb7397536a790b0ff44459 |
|
20-Aug-2015 |
Yabin Cui <yabinc@google.com> |
Simpleperf: improve output of stat command. Before this change: $sudo simpleperf record -a sleep 1 Performance counter statistics: 5994649915(scaled) cpu-cycles 8785461570(scaled) stalled-cycles-frontend 6089237592(scaled) instructions 1086987265(scaled) branch-instructions 11019426(scaled) branch-misses 40306210522 task-clock 21955 context-switches 16659 page-faults Total test time: 1.007973 seconds. After this change: $sudo simpleperf record -a sleep 1 Performance counter statistics: 11,768,763,985 cpu-cycles # 11.675808 Ghz (83%) 16,142,943,081 stalled-cycles-frontend # 16.015 G/sec (67%) 17,286,201,730 instructions # 0.680818 cycles per instruction (83%) 3,141,529,369 branch-instructions # 3.117 G/sec (84%) 18,168,963 branch-misses # 0.578348% miss rate (83%) 40222.432118(ms) task-clock # 3990.473223% cpu usage (100%) 19,240 context-switches # 19.088 K/sec (100%) 9,302 page-faults # 9.229 K/sec (100%) Total test time: 1.007961 seconds. Change-Id: I5590699957650e246b14b3d2b405108483631908
/system/extras/simpleperf/event_fd.h
|
9fd3cc1048a3d0338df4a48760dfd655560992a1 |
|
26-Jun-2015 |
Yabin Cui <yabinc@google.com> |
Simpleperf: support build on mac. Bug: 19483574 Change-Id: I6c28541944bc0a4e6fc07d7ea5a8fb5f71890510
/system/extras/simpleperf/event_fd.h
|
b032de7a9e1975a838cd6df2e7c8df3c7f70a3ce |
|
18-Jun-2015 |
Yabin Cui <yabinc@google.com> |
Simpleperf: support monitoring existing processes/threads. Also change the default record freq from 1000 to 4000. Because 1000 seems to be too low. Bug: 19483574 Change-Id: I340fcb9d28a156862705e483ee340a1c824eea21
/system/extras/simpleperf/event_fd.h
|
7d4904d5fc038f8125cfc63a5eaa4669ee2aebda |
|
09-Jun-2015 |
Yabin Cui <yabinc@google.com> |
Simpleperf: fix a few bugs. Fix mistyped word. Kill workload process when exiting. Add checking of whether branch sampling is supported. Bug: 19483574 Change-Id: Ibe48914cd92da1ee40bf67c0c47a6376a7291e8c
/system/extras/simpleperf/event_fd.h
|
9759e1b1ce76185aa539aeea2fb1cbd8382156e7 |
|
29-Apr-2015 |
Yabin Cui <yabinc@google.com> |
Implement simpleperf record/dumprecord subcommands. Bug: 19483574 Change-Id: Id879713a75c2d3a6289d8847b95ee0bb4a2cc8a0
/system/extras/simpleperf/event_fd.h
|
323e945313b190373b3fcfe578e25ee8390a76d3 |
|
21-Apr-2015 |
Yabin Cui <yabinc@google.com> |
Implement simpleperf stat subcommand. Also add some simple unit-tests. Change-Id: Ic30a2d4a879e028a8c82babbaf82e322fc49a838
/system/extras/simpleperf/event_fd.h
|
67d3abd7b26a741347b33402ad32f5c6735ca0bd |
|
17-Apr-2015 |
Yabin Cui <yabinc@google.com> |
Implement simpleperf list subcommand. simpleperf is used to replace linux/tools/perf. And This CL implements the list subcommand of it. Change-Id: I3e6fe854e19cc370070d0fd8416d0aa6fa8f8e90
/system/extras/simpleperf/event_fd.h
|