diff options
author | 2017-12-02 01:34:18 +0000 | |
---|---|---|
committer | 2017-12-02 01:34:18 +0000 | |
commit | c3f35f2f008737bc455b16af12b32e2a03eb9cd0 (patch) | |
tree | 343283451278af29c244983d0ae72eeda5f9a2d8 /openjdkjvmti/events.h | |
parent | 38af096a2fe0f2c0edb22bfca74d05c1aeeedaee (diff) | |
parent | 74c84408ad56606514304c9ecc643bebbf11d73e (diff) |
Merge "Ensure that updates to the global event mask are atomic"
Diffstat (limited to 'openjdkjvmti/events.h')
-rw-r--r-- | openjdkjvmti/events.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/openjdkjvmti/events.h b/openjdkjvmti/events.h index b05136661b..7bdd9a58ec 100644 --- a/openjdkjvmti/events.h +++ b/openjdkjvmti/events.h @@ -149,8 +149,16 @@ struct EventMasks { EventMask& GetEventMask(art::Thread* thread); EventMask* GetEventMaskOrNull(art::Thread* thread); - void EnableEvent(art::Thread* thread, ArtJvmtiEvent event); - void DisableEvent(art::Thread* thread, ArtJvmtiEvent event); + // Circular dependencies mean we cannot see the definition of ArtJvmTiEnv so the mutex is simply + // asserted in the function. + // Note that the 'env' passed in must be the same env this EventMasks is associated with. + void EnableEvent(ArtJvmTiEnv* env, art::Thread* thread, ArtJvmtiEvent event); + // REQUIRES(env->event_info_mutex_); + // Circular dependencies mean we cannot see the definition of ArtJvmTiEnv so the mutex is simply + // asserted in the function. + // Note that the 'env' passed in must be the same env this EventMasks is associated with. + void DisableEvent(ArtJvmTiEnv* env, art::Thread* thread, ArtJvmtiEvent event); + // REQUIRES(env->event_info_mutex_); bool IsEnabledAnywhere(ArtJvmtiEvent event); // Make any changes to event masks needed for the given capability changes. If caps_added is true // then caps is all the newly set capabilities of the jvmtiEnv. If it is false then caps is the |