summaryrefslogtreecommitdiff
path: root/simpleperf/JITDebugReader.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2020-09-08 16:12:46 -0700
committerYabin Cui <yabinc@google.com>2020-09-09 10:05:27 -0700
commit9ba4d94e31c86831e2853e4fbde5d3db0dc2ca4b (patch)
tree81aff0dd8b063e571ef98ced27f921e5244c7013 /simpleperf/JITDebugReader.h
parent425952c29bd828696275baa98c23463dfc8873b9 (diff)
downloadextras-9ba4d94e31c86831e2853e4fbde5d3db0dc2ca4b.tar.gz
simpleperf: fix tests broken by jit symfile path change.
Simpleperf checks if a path is JIT symfile by looking for a colon symbol in it. But a normal path on windows can contain colon symbols. Thus two windows tests are broken. This CL fixs them by adding a function in JITDebugReader class to check JIT symfile paths. Also fix python test TestReportLib.test_merge_java_methods. It was broken by report_lib_interface.cpp dropping support for old jit symfile paths. This CL added the support back. Also add a new test TestReportLib.test_jited_java_methods to test new jit symfile path. Bug: 167604389 Test: run simpleperf_unit_test. Test: run test.py. Change-Id: Ic0f69d224069f708fe20d79d0ce61cf63bd17e5f
Diffstat (limited to 'simpleperf/JITDebugReader.h')
-rw-r--r--simpleperf/JITDebugReader.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/simpleperf/JITDebugReader.h b/simpleperf/JITDebugReader.h
index a6c9c030..a890299a 100644
--- a/simpleperf/JITDebugReader.h
+++ b/simpleperf/JITDebugReader.h
@@ -133,6 +133,11 @@ class JITDebugReader {
// Flush all debug info registered before timestamp.
bool FlushDebugInfo(uint64_t timestamp);
+ static bool IsPathInJITSymFile(const std::string& path) {
+ return path.find(std::string("_") + kJITAppCacheFile + ":") != path.npos ||
+ path.find(std::string("_") + kJITZygoteCacheFile + ":") != path.npos;
+ }
+
private:
enum class DescriptorType {
kDEX,