Age | Commit message (Collapse) | Author |
|
Before this CL, CtsSimpleperfTestCases copies itself to the app's
directory, then run it using run-as.
With this CL, CtsSimpleperfTestCases keeps itself in /data/local/tmp,
but forces stat/record cmd to run with --app option. This gives
more freedom to tests:
1. They can stay in shell's context with --in-app option.
2. The stat/record cmds are started in the shell's context, so
they can collect information no available in app's context (like
data in /sys/kernel/debug/tracing/events).
This is a preparation to add tests for recording tracepoint events.
It also matches the way we want users to use simpleperf (with --app option).
Bug: http://b/29520177
Test: run CtsSimpleperfTestCases.
Change-Id: I1709adfb1ff7169df87560226c197e473fdf8516
|
|
libsimpleperf_inplace_sampler.so is a library linked with
user's app. It opens a unix socket server and waits for
simpleperf's profiling request. This patch doesn't contain
code generating real samples, instead it uses a fake sample
for testing.
Add runtest for 32bit. Increase runtest duration to 2 seconds
and adjust some args in runtest.conf to make test result stable.
Fix one tiny error in cmd_report.cpp to report correctly
in `report --sort comm,symbol`.
Bug: http://b/30974760
Test: run simpleperf_unit_test.
Test: run runtest.py.
Change-Id: I58163fe47f62e6ba7dd684b33a2ce302feb880f5
|
|
When monitoring some threads/processes not forked by simpleperf,
check if these threads/processes exist regularly. So we can
stop profiling once all threads/processes exit.
Also handle SIGHUP signal, so we can finish profiling properly
when `adb shell simpleperf record xxx` is killed by Ctrl-C.
Add corresponding tests.
Bug: http://b/33558210
Test: run simpleperf_unit_test.
Change-Id: Ieae4d00d099dc1c7a0c51b0610dff43981bb642e
|
|
32-bit simpleperf can't unwind a 64-bit `sleep` process in aarch64
environment. It makes following error in tests:
simpleperf is built in arch arm, and can't do stack unwinding for arch arm64
So make the workload be able to start a process
running callback function. By profiling that process, we can
guarantee that 32-bit simpleperf is profiling a 32-bit process.
Also fix a flaky test IOEventLoop.signal.
Build 32-bit simpleperf_unit_test on 64-bit devices.
Bug: http://b/33167911
Test: run simpleperf_unit_test.
Change-Id: I82741dc5d90c73c1890f834d8e2a9188421a3828
|
|
Add a stat interval printing
Bug: http://b/31806433
Test: simpleperf_unit_test --gtest_filter=stat_cmd.interval_option
Change-Id: Ia2881d990036cc099baccb8a2d8cd3828877a910
(cherry picked from commit e6d8a52400fe710b743ce57b89bd015ab219434b)
|
|
am: 43908a31c1
Change-Id: I4f53fa84ea663a4090a99f2261f153faf8f0b8fb
|
|
If there is no need to record samples, u/k modifiers
used in event cpu-clock and task-clock are ignored
by the kernel.
Bug: http://b/29574526
Change-Id: Id45568448888965a3bfa382c4420e395a741f77a
Test: simpleperf_unit_test.
|
|
am: 4b97e8e71f
Change-Id: I98f11a1fa3bab4c1754e76fc0d82b39a5225205b
|
|
Previously --duration option can't be used while executing child
command, mainly because we use `sleep XX` child command to implement
--duration option. By using libevent, the limit doesn't exist.
Bug: http://b/30405638
Change-Id: Iea1953ecf3aca48e75fb74f048ed04ad5b168630
Test: run simpleperf_unit_test.
|
|
am: 9ec492a979
Change-Id: I9ed4fc32a7ba7030c48d4d5b7d7a905caed01e6d
|
|
The cpu option tests are flaky because Cpu 0 can be offlined.
Bug: http://b/30389972
Change-Id: Ie9f57dcde957be245167c957eb029ab37496471e
Test: run simpleperf cts test.
|
|
am: cab924fae5
Change-Id: Id3f2e39a1aebddcdc6e548595b394d4eedcf3e0f
|
|
Wrap libevent in IOEventLoop, use IOEventLoop in stat command.
Add corresponding tests.
Bug: http://b/30405638
Change-Id: I78b79e0eff1365ab46dde29c2a24a2def586af79
Test: run simpleperf_unit_test.
|
|
am: 53fdddd794
Change-Id: Ibc911eb9be4666dae97ae179248863a0622541a8
|
|
Also fix a bug in ReportCommandTest.callgraph_option.
Bug: http://b/30292111
Change-Id: I21ced0c8aa7ec10c60c4fc1ddc6e5dfd256feeb1
Test: run simpleperf_unit_test.
|
|
am: 11615de832
Change-Id: I41e95398507e62f442d948273c12cb65e5d1730d
|
|
When there are summaries monitoring one event type in user
space and kernel space at the same time period, we can automatically
generate a summary combining the results generated in user space and
kernel space.
This can help to decrease the number of needed hardware counters.
Also adjust scale check when deciding whether an event is monitored
all the time.
Bug: 29213742
Change-Id: I272e21420700c10fccb1336a1e60138db8d13b3d
Test: run simpleperf_unit_test.
|
|
Change-Id: Iad2f0b498d7abd2eb52116a32517bfee20129f05
|
|
Simpleperf stat/record command may need 1 second to set security.perf_harden
property. So the monitored child threads should run longer than 1 second.
Bug: 29763505
Change-Id: I9bf6dcba03f3fc5c91130f38a08ce0062e104103
|
|
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
|
|
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
|
|
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
(cherry picked from commit be7ec66eaa4f995bd9068637f7c7d5718173922c)
|
|
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
(cherry picked from commit b1a885b014540a2f7798b5a35ea0f0ec150d93ee)
|
|
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
|
|
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
|
|
Change-Id: Ic15d4778c7accd1382de0b440a437aba2cf67016
|
|
--cpu option is used to record on selected cpus.
Change-Id: If5bb9b42a064d2ff69fbeec77906fc79943dddc1
|
|
Also fix a bug in event_attr dumping.
Bug: 19483574
Change-Id: I255647d1471acab3a63c3dc787ab06b3d2bee294
|
|
Also change the default record freq from 1000 to 4000. Because 1000 seems to be too low.
Bug: 19483574
Change-Id: I340fcb9d28a156862705e483ee340a1c824eea21
|
|
Register a callback function to create a new command instance instead of
registering a command instance. Then we can release resources in the
command destructors, and don't need xxxCommandImpl classes any more.
Bug: 19483574
Change-Id: Ibb54892ec0655fd43909347afd72bb08bc8a716c
|
|
Also support options in `simpleperf list`, add test about tracepoint event types.
Bug: 19483574
Change-Id: I2d2c2f300fe5e2968696228899084410aa9f29a4
|
|
Bug: 19483574
Change-Id: Ia65cb12804a6dffa440501736a6229b2f7248958
|
|
Bug: 19483574
Change-Id: Id879713a75c2d3a6289d8847b95ee0bb4a2cc8a0
|
|
Also add some simple unit-tests.
Change-Id: Ic30a2d4a879e028a8c82babbaf82e322fc49a838
|