diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-07-22 18:08:23 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-07-29 13:30:46 -0700 |
commit | 94f7b49578b6aaa80de8ffed230648d601393905 (patch) | |
tree | cfc69e453faefee38178ceb85378e1f0f1e17812 /runtime/instrumentation.h | |
parent | 8df73882c60451e7f789bf9b1f3db2d7dc228640 (diff) | |
download | art-94f7b49578b6aaa80de8ffed230648d601393905.zip art-94f7b49578b6aaa80de8ffed230648d601393905.tar.gz art-94f7b49578b6aaa80de8ffed230648d601393905.tar.bz2 |
Add GcRoot to clean up and enforce read barriers.
Introduce a value-type wrapper around Object* for GC roots so that 1)
we won't have to directly add the read barrier code in many places and
2) we can avoid accidentally bypassing/missing read barriers on GC
roots (the GcRoot interface ensures that the read barrier is executed
on a read).
The jdwp test passed.
Bug: 12687968
Change-Id: Ib167c7c325b3c7e3900133578815f04d219972a1
Diffstat (limited to 'runtime/instrumentation.h')
-rw-r--r-- | runtime/instrumentation.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/instrumentation.h b/runtime/instrumentation.h index cabb0e9..66c6b38 100644 --- a/runtime/instrumentation.h +++ b/runtime/instrumentation.h @@ -25,6 +25,7 @@ #include "instruction_set.h" #include "base/macros.h" #include "base/mutex.h" +#include "gc_root.h" #include "object_callbacks.h" namespace art { @@ -440,7 +441,8 @@ class Instrumentation { // The set of methods being deoptimized (by the debugger) which must be executed with interpreter // only. mutable ReaderWriterMutex deoptimized_methods_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER; - std::multimap<int32_t, mirror::ArtMethod*> deoptimized_methods_ GUARDED_BY(deoptimized_methods_lock_); + std::multimap<int32_t, GcRoot<mirror::ArtMethod>> deoptimized_methods_ + GUARDED_BY(deoptimized_methods_lock_); bool deoptimization_enabled_; // Current interpreter handler table. This is updated each time the thread state flags are |