summaryrefslogtreecommitdiff
path: root/openjdkjvmti/transform.h
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2019-10-15 15:46:07 -0700
committer Alex Light <allight@google.com> 2019-10-30 16:53:25 -0700
commitd55b844e39c4d5eb1a56de6cb95c891659f8a27f (patch)
treeed2f7809528e8b44985edc12d75fb0965806045f /openjdkjvmti/transform.h
parent436c6f5fae95aae332361060778599d0ef24a167 (diff)
Add more standard structural redefinition entrypoints
Add structural redefinition extension function and event that mirror the 'RedefineClasses' function and 'ClassFileLoadHook' event. The new extension function is called 'com.android.art.class.structurally_redefine_classes' and the new extension event is called 'com.android.art.class.structural_dex_file_load_hook'. These extensions are the preferred way to use structural redefinition. Like the standard 'RedefineClasses' multiple classes may be redefined at a time. The structural_dex_file_load_hook is triggered prior to the can_retransform_classes ClassFileLoadHook. It is triggered on all classes, even ones that cannot be structurally changed by class-loading, class redefinition or by calling the RetransformClasses function. Calling 'structurally_redefine_classes' with new definitions that do not require structural changes will fall back to non-structural redefinition. Test: ./test.py --host Bug: 134162467 Change-Id: If4810930470c5c6509cf6db779910006e114b39f
Diffstat (limited to 'openjdkjvmti/transform.h')
-rw-r--r--openjdkjvmti/transform.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/openjdkjvmti/transform.h b/openjdkjvmti/transform.h
index 40c7267ad1..a58b50ea10 100644
--- a/openjdkjvmti/transform.h
+++ b/openjdkjvmti/transform.h
@@ -39,6 +39,7 @@
#include "art_jvmti.h"
#include "ti_class_definition.h"
+#include "ti_redefine.h"
namespace openjdkjvmti {
@@ -56,6 +57,7 @@ class Transformer {
art::Thread* self,
/*in-out*/ArtClassDefinition* def);
+ template<RedefinitionType kType>
static void RetransformClassesDirect(
art::Thread* self,
/*in-out*/std::vector<ArtClassDefinition>* definitions);