diff options
author | Yabin Cui <yabinc@google.com> | 2016-02-14 19:18:02 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2016-03-07 12:05:22 -0800 |
commit | 7288501a660ce2616539e8a963185d2f3c679729 (patch) | |
tree | a27a9eab7e6ab3ab8839b65388a96fede0dda2f7 /simpleperf/cmd_stat_test.cpp | |
parent | 9a1f829db03dc9ad9701b4ddae1267d3140e84f4 (diff) | |
download | extras-7288501a660ce2616539e8a963185d2f3c679729.tar.gz |
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
(cherry picked from commit b1a885b014540a2f7798b5a35ea0f0ec150d93ee)
Diffstat (limited to 'simpleperf/cmd_stat_test.cpp')
-rw-r--r-- | simpleperf/cmd_stat_test.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/simpleperf/cmd_stat_test.cpp b/simpleperf/cmd_stat_test.cpp index 34448066..b45e02ff 100644 --- a/simpleperf/cmd_stat_test.cpp +++ b/simpleperf/cmd_stat_test.cpp @@ -49,6 +49,16 @@ TEST(stat_cmd, event_modifier) { ASSERT_TRUE(StatCmd()->Run({"-e", "cpu-cycles:u,sched:sched_switch:k", "sleep", "1"})); } +void CreateProcesses(size_t count, std::vector<std::unique_ptr<Workload>>* workloads) { + workloads->clear(); + for (size_t i = 0; i < count; ++i) { + auto workload = Workload::CreateWorkload({"sleep", "1"}); + ASSERT_TRUE(workload != nullptr); + ASSERT_TRUE(workload->Start()); + workloads->push_back(std::move(workload)); + } +} + TEST(stat_cmd, existing_processes) { std::vector<std::unique_ptr<Workload>> workloads; CreateProcesses(2, &workloads); |