summaryrefslogtreecommitdiff
path: root/runtime/java_frame_root_info.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2019-09-10 16:46:48 -0700
committer Alex Light <allight@google.com> 2019-09-11 17:17:22 +0000
commit0054aa59c50374751cc65e8de31a1d813912e67d (patch)
treee09f2fdc04fdfda86b2c7ecb3b980a3687323597 /runtime/java_frame_root_info.cc
parent4945b29e6ea494fffc924f5940601af58d2b28ab (diff)
Have JavaFrameRootInfo give more info about provenance of root.
It can be useful to differentiate between java frame roots being the methods declaring class, from a proxy method, being unknown due to an imprecise walk or being indeterminable. This passes that information with the Vreg. Test: ./test.py --host Bug: 134162467 Change-Id: I74842d3eeedee5c836511e046652502a53de0f7e
Diffstat (limited to 'runtime/java_frame_root_info.cc')
-rw-r--r--runtime/java_frame_root_info.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/java_frame_root_info.cc b/runtime/java_frame_root_info.cc
index dd3be5d415..9a0f184a83 100644
--- a/runtime/java_frame_root_info.cc
+++ b/runtime/java_frame_root_info.cc
@@ -24,7 +24,18 @@ void JavaFrameRootInfo::Describe(std::ostream& os) const {
const StackVisitor* visitor = stack_visitor_;
CHECK(visitor != nullptr);
os << "Type=" << GetType() << " thread_id=" << GetThreadId() << " location=" <<
- visitor->DescribeLocation() << " vreg=" << vreg_;
+ visitor->DescribeLocation() << " vreg=";
+ if (vreg_ == JavaFrameRootInfo::kUnknownVreg) {
+ os << "Unknown";
+ } else if (vreg_ == JavaFrameRootInfo::kImpreciseVreg) {
+ os << "imprecise";
+ } else if (vreg_ == JavaFrameRootInfo::kProxyReferenceArgument) {
+ os << "Proxy reference argument";
+ } else if (vreg_ == JavaFrameRootInfo::kMethodDeclaringClass) {
+ os << "method declaring class";
+ } else {
+ os << vreg_;
+ }
}
} // namespace art