diff options
author | 2019-10-29 11:15:05 -0700 | |
---|---|---|
committer | 2019-11-16 00:26:03 +0000 | |
commit | 283bb322de84ac570b987c65a1015e2dbcbfad7c (patch) | |
tree | 18f5d68c78e56a2d398192c8340269a60706b7a0 /openjdkjvmti/OpenjdkJvmTi.cc | |
parent | 2c5dfe16ab2b0f8fbd14dedc161eb4658a8673fc (diff) |
Initial support for adding virtuals with structural redefinition
Initial implementation of adding virtual methods and non-static fields
using structural redefinition. Currently this is limited to 'final',
non-finalizable classes. These restrictions will be removed or
loosened in the future.
All non-collected instances of the redefined class will be made
obsolete and reallocated. This can cause significant GC load.
This feature does not work with any of the -quick opcodes and should
only be used with dex files that haven't undergone dex2dex
compilation (that is --debuggable and BCP dex files).
Test: ./test.py --host
Bug: 134162467
Bug: 144168550
Change-Id: Ia401d97395cfe498eb849a661ea9a900dfaa6da3
Diffstat (limited to 'openjdkjvmti/OpenjdkJvmTi.cc')
-rw-r--r-- | openjdkjvmti/OpenjdkJvmTi.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/openjdkjvmti/OpenjdkJvmTi.cc b/openjdkjvmti/OpenjdkJvmTi.cc index 665fa9f496..4ce376ff9b 100644 --- a/openjdkjvmti/OpenjdkJvmTi.cc +++ b/openjdkjvmti/OpenjdkJvmTi.cc @@ -40,6 +40,7 @@ #include "jvmti.h" +#include "alloc_manager.h" #include "art_jvmti.h" #include "base/logging.h" // For gLogVerbosity. #include "base/mutex.h" @@ -79,6 +80,7 @@ namespace openjdkjvmti { // These should never be null. EventHandler* gEventHandler; DeoptManager* gDeoptManager; +AllocationManager* gAllocManager; #define ENSURE_NON_NULL(n) \ do { \ @@ -1497,6 +1499,7 @@ static jint GetEnvHandler(art::JavaVMExt* vm, /*out*/void** env, jint version) { extern "C" bool ArtPlugin_Initialize() { art::Runtime* runtime = art::Runtime::Current(); + gAllocManager = new AllocationManager; gDeoptManager = new DeoptManager; gEventHandler = new EventHandler; |