diff options
author | Yabin Cui <yabinc@google.com> | 2020-12-15 16:28:55 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2020-12-16 12:52:28 -0800 |
commit | 3988a40acee990fb505b77bd65fee46265ea640a (patch) | |
tree | e28ac3d2da4b77b392ca766e2f36bfa383dbde87 /simpleperf/report_utils.h | |
parent | 9ae17c2c08c0cdd0d4f946e566b7d96ee60cb9ab (diff) | |
download | extras-3988a40acee990fb505b77bd65fee46265ea640a.tar.gz |
simpleperf: add --show-execution-type in report-sample cmd.
When --show-execution-type is used, a new field execution_type is
added in CallChainEntry to show the method type. When used, it can
increase up to 20% output size.
Bug: 175163225
Test: run simpleperf_unit_test
Change-Id: I4724059e26a0250ef52bf89ce8d81434a7893bbd
Diffstat (limited to 'simpleperf/report_utils.h')
-rw-r--r-- | simpleperf/report_utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/simpleperf/report_utils.h b/simpleperf/report_utils.h index fb628bc5..8293f76b 100644 --- a/simpleperf/report_utils.h +++ b/simpleperf/report_utils.h @@ -25,6 +25,14 @@ namespace simpleperf { +enum class CallChainExecutionType { + NATIVE_METHOD, + INTERPRETED_JVM_METHOD, + JIT_JVM_METHOD, + // ART methods near interpreted/JIT JVM methods. They're shown only when RemoveArtFrame = false. + ART_METHOD, +}; + struct CallChainReportEntry { uint64_t ip = 0; const Symbol* symbol = nullptr; @@ -32,6 +40,7 @@ struct CallChainReportEntry { const char* dso_name = nullptr; uint64_t vaddr_in_file = 0; const MapEntry* map = nullptr; + CallChainExecutionType execution_type = CallChainExecutionType::NATIVE_METHOD; }; class CallChainReportBuilder { @@ -53,6 +62,7 @@ class CallChainReportBuilder { JavaMethod(Dso* dso, const Symbol* symbol) : dso(dso), symbol(symbol) {} }; + void MarkArtFrame(std::vector<CallChainReportEntry>& callchain); void ConvertJITFrame(std::vector<CallChainReportEntry>& callchain); void CollectJavaMethods(); |