summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_report_test.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2020-08-05 19:51:36 +0000
committerYabin Cui <yabinc@google.com>2020-08-06 18:48:35 +0000
commit075dd1876248e2746542f644e59e331900586cfc (patch)
treed0771a16a55c1fc32422333bf4a312d1bb0c4473 /simpleperf/cmd_report_test.cpp
parent3c69332324978a62891160ed298bedacb18c4c0a (diff)
downloadextras-075dd1876248e2746542f644e59e331900586cfc.tar.gz
simpleperf: fix jit cache path in report cmd.
1. Separate app cache and zygote cache in ElfDso::GetReportPath(). 2. Use GetReportPath() in --dsos option in report cmd. So "[JIT app cache]" can be used to filter binaries. Bug: 159155297 Test: run simpleperf_unit_test Change-Id: Idc52bd1b2496aae30721a224d93621f776f2ae03
Diffstat (limited to 'simpleperf/cmd_report_test.cpp')
-rw-r--r--simpleperf/cmd_report_test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp
index ae081148..25b88b77 100644
--- a/simpleperf/cmd_report_test.cpp
+++ b/simpleperf/cmd_report_test.cpp
@@ -507,6 +507,17 @@ TEST_F(ReportCommandTest, csv_option) {
ASSERT_NE(content.find("AccEventCount,SelfEventCount,EventName"), std::string::npos);
}
+TEST_F(ReportCommandTest, dso_path_for_jit_cache) {
+ Report("perf_with_jit_symbol.data", {"--sort", "dso"});
+ ASSERT_TRUE(success);
+ ASSERT_NE(content.find("[JIT app cache]"), std::string::npos);
+
+ // Check if we can filter dso by "[JIT app cache]".
+ Report("perf_with_jit_symbol.data", {"--dsos", "[JIT app cache]"});
+ ASSERT_TRUE(success);
+ ASSERT_NE(content.find("[JIT app cache]"), std::string::npos);
+}
+
#if defined(__linux__)
#include "event_selection_set.h"