summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-04-14 21:49:33 -0700
committer Andreas Gampe <agampe@google.com> 2017-04-14 21:52:45 -0700
commitf040be6668b6566066fc4bf7c447569b5b46d670 (patch)
tree1d0ab31a540a33947d44a2f06d1224a387506d3f
parent39d562895ab3ff835003fe3df6c13a93db492aa8 (diff)
ART: Tentative fix for stack count issue in test 913
Use kCountTransition == kNo to also skip runtime methods in the cur_depth_ count of a StackVisitor. Currently this is only used in the VisitRoots function of Thread. If the additional load is too expensive, we can make this dependent on the requested precision (and thus revert "regular" visits to the old scheme of also counting transitions between managed stack frames and shadow frames, which is only an increment of a field). Bug: 31385354 Bug: 32072923 Test: m test-art-host Change-Id: Ief951585407dd6e03f8050774fe612e7b204247e
-rw-r--r--runtime/stack.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc
index 333128b8c0..5c6eead34b 100644
--- a/runtime/stack.cc
+++ b/runtime/stack.cc
@@ -913,7 +913,9 @@ void StackVisitor::WalkStack(bool include_transitions) {
<< " next=" << *cur_quick_frame_;
}
- cur_depth_++;
+ if (kCount == CountTransitions::kYes || !method->IsRuntimeMethod()) {
+ cur_depth_++;
+ }
method = *cur_quick_frame_;
}
} else if (cur_shadow_frame_ != nullptr) {