summaryrefslogtreecommitdiffstats
path: root/runtime/stack.h
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2016-12-15 01:05:52 +0000
committerAlex Light <allight@google.com>2016-12-19 14:26:18 -0800
commitce77fc0e7f60a15354bb20c356537cbf8b53b722 (patch)
treeb4301967c423ab190a4274409d99a3d6e23f0e8a /runtime/stack.h
parentd54f43ca39dfa92f08c2d760123f185f0f65fb86 (diff)
downloadart-ce77fc0e7f60a15354bb20c356537cbf8b53b722.tar.gz
art-ce77fc0e7f60a15354bb20c356537cbf8b53b722.tar.bz2
art-ce77fc0e7f60a15354bb20c356537cbf8b53b722.zip
Revert "Revert "Basic obsolete methods support""
This reverts commit b81a9840b44480bfeacd74b8d9f51e06f295411d. There were 2 issues with the original CL's test 916-obsolete-jit that caused it to sporadically fail. First, when checking if we had jitted the function under test in 916-obsolete-jit we failed to check to see if the function 'doCall', which is used to work-around bugs in our deoptimization & compilation systems, had also been jitted. In the case where the 'sayHi' function had been jitted but the 'doCall' function had not we would (correctly) fail to redefine the 'Transform' class since we would not be able to deoptimize the 'sayHi' function since it is under a quick_to_interpreter_bridge (runtime) frame. Secondly, the function Main.isInterpretedFunction was incorrect and would always return false, regardless of the actual state of the function. This would cause the test to fail as the quick_to_interpreter_bridge frame prevented deoptimization of the obsoleted function. Usually the warm-up period was enough to make sure the methods were jitted anyway but this was not guaranteed. Both of these problems become more likely to occur on systems with more cpu contention such as the buildbots. Test: stress --cpu 60 &; while ./test/run-test --host --jit 916; do ; done Reason for revert: Fixed bug in test that was causing failures. Original Tests: Test: ./test/run-test --host 914 Test: ./test/run-test --host 915 Test: ./test/run-test --host 916 Test: mma -j40 test-art-host Test: ART_TEST_JIT=true \ ART_TEST_INTERPRETER=true mma -j40 test-art-host Test: ./art/tools/run-jdwp-tests.sh --mode=host --variant=X64 Test: ./art/tools/run-jdwp-tests.sh --mode=host --variant=X64 --no-jit Bug: 32369913 Bug: 33630159 Change-Id: If1a92e47b90965a7dc21c5826185debe62bd1554
Diffstat (limited to 'runtime/stack.h')
-rw-r--r--runtime/stack.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/stack.h b/runtime/stack.h
index b1e99e5fd0..9dceb2931d 100644
--- a/runtime/stack.h
+++ b/runtime/stack.h
@@ -327,6 +327,12 @@ class ShadowFrame {
}
}
+ void SetMethod(ArtMethod* method) REQUIRES(Locks::mutator_lock_) {
+ DCHECK(method != nullptr);
+ DCHECK(method_ != nullptr);
+ method_ = method;
+ }
+
ArtMethod* GetMethod() const REQUIRES_SHARED(Locks::mutator_lock_) {
DCHECK(method_ != nullptr);
return method_;
@@ -610,6 +616,10 @@ class StackVisitor {
ArtMethod* GetMethod() const REQUIRES_SHARED(Locks::mutator_lock_);
+ // Sets this stack frame's method pointer. This requires a full lock of the MutatorLock. This
+ // doesn't work with inlined methods.
+ void SetMethod(ArtMethod* method) REQUIRES(Locks::mutator_lock_);
+
ArtMethod* GetOuterMethod() const {
return *GetCurrentQuickFrame();
}