summaryrefslogtreecommitdiff
path: root/runtime/stack.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-11-08 16:01:00 -0800
committer Andreas Gampe <agampe@google.com> 2016-11-09 13:12:27 -0800
commit140da3bc84df5fff08f092b3143416e44319ebed (patch)
tree770a28f78f115755c3c32c050dcc29ef835ea3ff /runtime/stack.h
parent70bfc8a5783044762cab864fc0ba26d9cc821ee3 (diff)
ART: Expose vreg and visitor in RootInfo
Expose the register and visitor in JavaFrameRootInfo, to be able to investigate a root programmatically. Also mark StackVisitor::GetFrameDepth() as a const function. Bug: 31385354 Test: m test-art-host Change-Id: Ie05d2cfe3f4e9def89311bb18bd0c0bbf1a45625
Diffstat (limited to 'runtime/stack.h')
-rw-r--r--runtime/stack.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/runtime/stack.h b/runtime/stack.h
index 8a446ecfd4..992bda5a1e 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -469,14 +469,21 @@ struct ShadowFrameDeleter {
}
};
-class JavaFrameRootInfo : public RootInfo {
+class JavaFrameRootInfo FINAL : public RootInfo {
public:
JavaFrameRootInfo(uint32_t thread_id, const StackVisitor* stack_visitor, size_t vreg)
: RootInfo(kRootJavaFrame, thread_id), stack_visitor_(stack_visitor), vreg_(vreg) {
}
- virtual void Describe(std::ostream& os) const OVERRIDE
+ void Describe(std::ostream& os) const OVERRIDE
REQUIRES_SHARED(Locks::mutator_lock_);
+ size_t GetVReg() const {
+ return vreg_;
+ }
+ const StackVisitor* GetVisitor() const {
+ return stack_visitor_;
+ }
+
private:
const StackVisitor* const stack_visitor_;
const size_t vreg_;
@@ -623,7 +630,7 @@ class StackVisitor {
return num_frames_;
}
- size_t GetFrameDepth() REQUIRES_SHARED(Locks::mutator_lock_) {
+ size_t GetFrameDepth() const REQUIRES_SHARED(Locks::mutator_lock_) {
return cur_depth_;
}