summaryrefslogtreecommitdiff
path: root/openjdkjvmti
diff options
context:
space:
mode:
Diffstat (limited to 'openjdkjvmti')
-rw-r--r--openjdkjvmti/deopt_manager.h6
-rw-r--r--openjdkjvmti/events-inl.h2
-rw-r--r--openjdkjvmti/events.cc50
-rw-r--r--openjdkjvmti/object_tagging.h10
-rw-r--r--openjdkjvmti/ti_class.cc8
-rw-r--r--openjdkjvmti/ti_dump.cc2
-rw-r--r--openjdkjvmti/ti_heap.cc10
-rw-r--r--openjdkjvmti/ti_method.cc14
-rw-r--r--openjdkjvmti/ti_phase.cc2
-rw-r--r--openjdkjvmti/ti_redefine.cc4
-rw-r--r--openjdkjvmti/ti_search.cc2
-rw-r--r--openjdkjvmti/ti_stack.cc16
-rw-r--r--openjdkjvmti/ti_thread.cc4
-rw-r--r--openjdkjvmti/transform.cc4
14 files changed, 67 insertions, 67 deletions
diff --git a/openjdkjvmti/deopt_manager.h b/openjdkjvmti/deopt_manager.h
index 6e991dee3d..d9f34a50db 100644
--- a/openjdkjvmti/deopt_manager.h
+++ b/openjdkjvmti/deopt_manager.h
@@ -58,13 +58,13 @@ struct JvmtiMethodInspectionCallback : public art::MethodInspectionCallback {
explicit JvmtiMethodInspectionCallback(DeoptManager* manager) : manager_(manager) {}
bool IsMethodBeingInspected(art::ArtMethod* method)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_);
+ override REQUIRES_SHARED(art::Locks::mutator_lock_);
bool IsMethodSafeToJit(art::ArtMethod* method)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_);
+ override REQUIRES_SHARED(art::Locks::mutator_lock_);
bool MethodNeedsDebugVersion(art::ArtMethod* method)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_);
+ override REQUIRES_SHARED(art::Locks::mutator_lock_);
private:
DeoptManager* manager_;
diff --git a/openjdkjvmti/events-inl.h b/openjdkjvmti/events-inl.h
index 6a8ba48109..e98517fdff 100644
--- a/openjdkjvmti/events-inl.h
+++ b/openjdkjvmti/events-inl.h
@@ -50,7 +50,7 @@ namespace impl {
// pending exceptions since they can cause new ones to be thrown. In accordance with the JVMTI
// specification we allow exceptions originating from events to overwrite the current exception,
// including exceptions originating from earlier events.
-class ScopedEventDispatchEnvironment FINAL : public art::ValueObject {
+class ScopedEventDispatchEnvironment final : public art::ValueObject {
public:
ScopedEventDispatchEnvironment() : env_(nullptr), throw_(nullptr, nullptr) {
DCHECK_EQ(art::Thread::Current()->GetState(), art::ThreadState::kNative);
diff --git a/openjdkjvmti/events.cc b/openjdkjvmti/events.cc
index f71a5dc72d..43d0b10914 100644
--- a/openjdkjvmti/events.cc
+++ b/openjdkjvmti/events.cc
@@ -265,7 +265,7 @@ class JvmtiDdmChunkListener : public art::DdmCallback {
explicit JvmtiDdmChunkListener(EventHandler* handler) : handler_(handler) {}
void DdmPublishChunk(uint32_t type, const art::ArrayRef<const uint8_t>& data)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kDdmPublishChunk)) {
art::Thread* self = art::Thread::Current();
handler_->DispatchEvent<ArtJvmtiEvent::kDdmPublishChunk>(
@@ -288,7 +288,7 @@ class JvmtiAllocationListener : public art::gc::AllocationListener {
explicit JvmtiAllocationListener(EventHandler* handler) : handler_(handler) {}
void ObjectAllocated(art::Thread* self, art::ObjPtr<art::mirror::Object>* obj, size_t byte_count)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
DCHECK_EQ(self, art::Thread::Current());
if (handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kVmObjectAlloc)) {
@@ -337,7 +337,7 @@ class JvmtiMonitorListener : public art::MonitorCallback {
explicit JvmtiMonitorListener(EventHandler* handler) : handler_(handler) {}
void MonitorContendedLocking(art::Monitor* m)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kMonitorContendedEnter)) {
art::Thread* self = art::Thread::Current();
art::JNIEnvExt* jnienv = self->GetJniEnv();
@@ -351,7 +351,7 @@ class JvmtiMonitorListener : public art::MonitorCallback {
}
void MonitorContendedLocked(art::Monitor* m)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kMonitorContendedEntered)) {
art::Thread* self = art::Thread::Current();
art::JNIEnvExt* jnienv = self->GetJniEnv();
@@ -365,7 +365,7 @@ class JvmtiMonitorListener : public art::MonitorCallback {
}
void ObjectWaitStart(art::Handle<art::mirror::Object> obj, int64_t timeout)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kMonitorWait)) {
art::Thread* self = art::Thread::Current();
art::JNIEnvExt* jnienv = self->GetJniEnv();
@@ -392,7 +392,7 @@ class JvmtiMonitorListener : public art::MonitorCallback {
//
// See b/65558434 for more discussion.
void MonitorWaitFinished(art::Monitor* m, bool timeout)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kMonitorWaited)) {
art::Thread* self = art::Thread::Current();
art::JNIEnvExt* jnienv = self->GetJniEnv();
@@ -429,11 +429,11 @@ class JvmtiGcPauseListener : public art::gc::GcPauseListener {
start_enabled_(false),
finish_enabled_(false) {}
- void StartPause() OVERRIDE {
+ void StartPause() override {
handler_->DispatchEvent<ArtJvmtiEvent::kGarbageCollectionStart>(art::Thread::Current());
}
- void EndPause() OVERRIDE {
+ void EndPause() override {
handler_->DispatchEvent<ArtJvmtiEvent::kGarbageCollectionFinish>(art::Thread::Current());
}
@@ -475,7 +475,7 @@ static void SetupGcPauseTracking(JvmtiGcPauseListener* listener, ArtJvmtiEvent e
}
}
-class JvmtiMethodTraceListener FINAL : public art::instrumentation::InstrumentationListener {
+class JvmtiMethodTraceListener final : public art::instrumentation::InstrumentationListener {
public:
explicit JvmtiMethodTraceListener(EventHandler* handler) : event_handler_(handler) {}
@@ -484,7 +484,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
art::Handle<art::mirror::Object> this_object ATTRIBUTE_UNUSED,
art::ArtMethod* method,
uint32_t dex_pc ATTRIBUTE_UNUSED)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
if (!method->IsRuntimeMethod() &&
event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kMethodEntry)) {
art::JNIEnvExt* jnienv = self->GetJniEnv();
@@ -501,7 +501,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
art::ArtMethod* method,
uint32_t dex_pc ATTRIBUTE_UNUSED,
art::Handle<art::mirror::Object> return_value)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
if (!method->IsRuntimeMethod() &&
event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kMethodExit)) {
DCHECK_EQ(
@@ -528,7 +528,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
art::ArtMethod* method,
uint32_t dex_pc ATTRIBUTE_UNUSED,
const art::JValue& return_value)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
if (!method->IsRuntimeMethod() &&
event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kMethodExit)) {
DCHECK_NE(
@@ -556,7 +556,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
art::Handle<art::mirror::Object> this_object ATTRIBUTE_UNUSED,
art::ArtMethod* method,
uint32_t dex_pc ATTRIBUTE_UNUSED)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
if (!method->IsRuntimeMethod() &&
event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kMethodExit)) {
jvalue val;
@@ -586,7 +586,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
art::Handle<art::mirror::Object> this_object ATTRIBUTE_UNUSED,
art::ArtMethod* method,
uint32_t new_dex_pc)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
DCHECK(!method->IsRuntimeMethod());
// Default methods might be copied to multiple classes. We need to get the canonical version of
// this method so that we can check for breakpoints correctly.
@@ -613,7 +613,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
art::ArtMethod* method,
uint32_t dex_pc,
art::ArtField* field)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
if (event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kFieldAccess)) {
art::JNIEnvExt* jnienv = self->GetJniEnv();
// DCHECK(!self->IsExceptionPending());
@@ -638,7 +638,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
uint32_t dex_pc,
art::ArtField* field,
art::Handle<art::mirror::Object> new_val)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
if (event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kFieldModification)) {
art::JNIEnvExt* jnienv = self->GetJniEnv();
// DCHECK(!self->IsExceptionPending());
@@ -670,7 +670,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
uint32_t dex_pc,
art::ArtField* field,
const art::JValue& field_value)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
if (event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kFieldModification)) {
art::JNIEnvExt* jnienv = self->GetJniEnv();
DCHECK(!self->IsExceptionPending());
@@ -700,7 +700,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
}
void WatchedFramePop(art::Thread* self, const art::ShadowFrame& frame)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
art::JNIEnvExt* jnienv = self->GetJniEnv();
jboolean is_exception_pending = self->IsExceptionPending();
RunEventCallback<ArtJvmtiEvent::kFramePop>(
@@ -720,7 +720,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
// Finds the location where this exception will most likely be caught. We ignore intervening
// native frames (which could catch the exception) and return the closest java frame with a
// compatible catch statement.
- class CatchLocationFinder FINAL : public art::StackVisitor {
+ class CatchLocationFinder final : public art::StackVisitor {
public:
CatchLocationFinder(art::Thread* target,
art::Handle<art::mirror::Class> exception_class,
@@ -733,7 +733,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
catch_method_ptr_(out_catch_method),
catch_dex_pc_ptr_(out_catch_pc) {}
- bool VisitFrame() OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ bool VisitFrame() override REQUIRES_SHARED(art::Locks::mutator_lock_) {
art::ArtMethod* method = GetMethod();
DCHECK(method != nullptr);
if (method->IsRuntimeMethod()) {
@@ -782,7 +782,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
// Call-back when an exception is thrown.
void ExceptionThrown(art::Thread* self, art::Handle<art::mirror::Throwable> exception_object)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
DCHECK(self->IsExceptionThrownByCurrentMethod(exception_object.Get()));
// The instrumentation events get rid of this for us.
DCHECK(!self->IsExceptionPending());
@@ -812,7 +812,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
// Call-back when an exception is handled.
void ExceptionHandled(art::Thread* self, art::Handle<art::mirror::Throwable> exception_object)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
// Since the exception has already been handled there shouldn't be one pending.
DCHECK(!self->IsExceptionPending());
if (event_handler_->IsEventEnabledAnywhere(ArtJvmtiEvent::kExceptionCatch)) {
@@ -839,7 +839,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
art::ArtMethod* method ATTRIBUTE_UNUSED,
uint32_t dex_pc ATTRIBUTE_UNUSED,
int32_t dex_pc_offset ATTRIBUTE_UNUSED)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
return;
}
@@ -849,7 +849,7 @@ class JvmtiMethodTraceListener FINAL : public art::instrumentation::Instrumentat
art::ArtMethod* caller ATTRIBUTE_UNUSED,
uint32_t dex_pc ATTRIBUTE_UNUSED,
art::ArtMethod* callee ATTRIBUTE_UNUSED)
- REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ REQUIRES_SHARED(art::Locks::mutator_lock_) override {
return;
}
@@ -959,7 +959,7 @@ void EventHandler::HandleLocalAccessCapabilityAdded() {
: runtime_(runtime) {}
bool operator()(art::ObjPtr<art::mirror::Class> klass)
- OVERRIDE REQUIRES(art::Locks::mutator_lock_) {
+ override REQUIRES(art::Locks::mutator_lock_) {
if (!klass->IsLoaded()) {
// Skip classes that aren't loaded since they might not have fully allocated and initialized
// their methods. Furthemore since the jvmti-plugin must have been loaded by this point
diff --git a/openjdkjvmti/object_tagging.h b/openjdkjvmti/object_tagging.h
index 1b8366a501..4181302f3a 100644
--- a/openjdkjvmti/object_tagging.h
+++ b/openjdkjvmti/object_tagging.h
@@ -45,15 +45,15 @@ namespace openjdkjvmti {
struct ArtJvmTiEnv;
class EventHandler;
-class ObjectTagTable FINAL : public JvmtiWeakTable<jlong> {
+class ObjectTagTable final : public JvmtiWeakTable<jlong> {
public:
ObjectTagTable(EventHandler* event_handler, ArtJvmTiEnv* env)
: event_handler_(event_handler), jvmti_env_(env) {}
- bool Set(art::mirror::Object* obj, jlong tag) OVERRIDE
+ bool Set(art::mirror::Object* obj, jlong tag) override
REQUIRES_SHARED(art::Locks::mutator_lock_)
REQUIRES(!allow_disallow_lock_);
- bool SetLocked(art::mirror::Object* obj, jlong tag) OVERRIDE
+ bool SetLocked(art::mirror::Object* obj, jlong tag) override
REQUIRES_SHARED(art::Locks::mutator_lock_)
REQUIRES(allow_disallow_lock_);
@@ -73,8 +73,8 @@ class ObjectTagTable FINAL : public JvmtiWeakTable<jlong> {
}
protected:
- bool DoesHandleNullOnSweep() OVERRIDE;
- void HandleNullSweep(jlong tag) OVERRIDE;
+ bool DoesHandleNullOnSweep() override;
+ void HandleNullSweep(jlong tag) override;
private:
EventHandler* event_handler_;
diff --git a/openjdkjvmti/ti_class.cc b/openjdkjvmti/ti_class.cc
index 209add36e1..f1d6fb0b5d 100644
--- a/openjdkjvmti/ti_class.cc
+++ b/openjdkjvmti/ti_class.cc
@@ -163,7 +163,7 @@ struct ClassCallback : public art::ClassLoadCallback {
const art::DexFile::ClassDef& initial_class_def ATTRIBUTE_UNUSED,
/*out*/art::DexFile const** final_dex_file,
/*out*/art::DexFile::ClassDef const** final_class_def)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
bool is_enabled =
event_handler->IsEventEnabledAnywhere(ArtJvmtiEvent::kClassFileLoadHookRetransformable) ||
event_handler->IsEventEnabledAnywhere(ArtJvmtiEvent::kClassFileLoadHookNonRetransformable);
@@ -381,7 +381,7 @@ struct ClassCallback : public art::ClassLoadCallback {
void VisitRoots(art::mirror::Object*** roots,
size_t count,
const art::RootInfo& info ATTRIBUTE_UNUSED)
- OVERRIDE {
+ override {
for (size_t i = 0; i != count; ++i) {
if (*roots[i] == input_) {
*roots[i] = output_;
@@ -392,7 +392,7 @@ struct ClassCallback : public art::ClassLoadCallback {
void VisitRoots(art::mirror::CompressedReference<art::mirror::Object>** roots,
size_t count,
const art::RootInfo& info ATTRIBUTE_UNUSED)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
for (size_t i = 0; i != count; ++i) {
if (roots[i]->AsMirrorPtr() == input_) {
roots[i]->Assign(output_);
@@ -418,7 +418,7 @@ struct ClassCallback : public art::ClassLoadCallback {
WeakGlobalUpdate(art::mirror::Class* root_input, art::mirror::Class* root_output)
: input_(root_input), output_(root_output) {}
- art::mirror::Object* IsMarked(art::mirror::Object* obj) OVERRIDE {
+ art::mirror::Object* IsMarked(art::mirror::Object* obj) override {
if (obj == input_) {
return output_;
}
diff --git a/openjdkjvmti/ti_dump.cc b/openjdkjvmti/ti_dump.cc
index 253580e0e1..c9abb71e4c 100644
--- a/openjdkjvmti/ti_dump.cc
+++ b/openjdkjvmti/ti_dump.cc
@@ -44,7 +44,7 @@
namespace openjdkjvmti {
struct DumpCallback : public art::RuntimeSigQuitCallback {
- void SigQuit() OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void SigQuit() override REQUIRES_SHARED(art::Locks::mutator_lock_) {
art::Thread* thread = art::Thread::Current();
art::ScopedThreadSuspension sts(thread, art::ThreadState::kNative);
event_handler->DispatchEvent<ArtJvmtiEvent::kDataDumpRequest>(art::Thread::Current());
diff --git a/openjdkjvmti/ti_heap.cc b/openjdkjvmti/ti_heap.cc
index d23370bc5c..85aa946356 100644
--- a/openjdkjvmti/ti_heap.cc
+++ b/openjdkjvmti/ti_heap.cc
@@ -760,7 +760,7 @@ jvmtiError HeapUtil::IterateThroughHeap(jvmtiEnv* env,
user_data);
}
-class FollowReferencesHelper FINAL {
+class FollowReferencesHelper final {
public:
FollowReferencesHelper(HeapUtil* h,
jvmtiEnv* jvmti_env,
@@ -828,7 +828,7 @@ class FollowReferencesHelper FINAL {
}
private:
- class CollectAndReportRootsVisitor FINAL : public art::RootVisitor {
+ class CollectAndReportRootsVisitor final : public art::RootVisitor {
public:
CollectAndReportRootsVisitor(FollowReferencesHelper* helper,
ObjectTagTable* tag_table,
@@ -841,7 +841,7 @@ class FollowReferencesHelper FINAL {
stop_reports_(false) {}
void VisitRoots(art::mirror::Object*** roots, size_t count, const art::RootInfo& info)
- OVERRIDE
+ override
REQUIRES_SHARED(art::Locks::mutator_lock_)
REQUIRES(!*helper_->tag_table_->GetAllowDisallowLock()) {
for (size_t i = 0; i != count; ++i) {
@@ -852,7 +852,7 @@ class FollowReferencesHelper FINAL {
void VisitRoots(art::mirror::CompressedReference<art::mirror::Object>** roots,
size_t count,
const art::RootInfo& info)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_)
+ override REQUIRES_SHARED(art::Locks::mutator_lock_)
REQUIRES(!*helper_->tag_table_->GetAllowDisallowLock()) {
for (size_t i = 0; i != count; ++i) {
AddRoot(roots[i]->AsMirrorPtr(), info);
@@ -1347,7 +1347,7 @@ jvmtiError HeapUtil::GetLoadedClasses(jvmtiEnv* env,
explicit ReportClassVisitor(art::Thread* self) : self_(self) {}
bool operator()(art::ObjPtr<art::mirror::Class> klass)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (klass->IsLoaded() || klass->IsErroneous()) {
classes_.push_back(self_->GetJniEnv()->AddLocalReference<jclass>(klass));
}
diff --git a/openjdkjvmti/ti_method.cc b/openjdkjvmti/ti_method.cc
index 87d832caec..1588df4086 100644
--- a/openjdkjvmti/ti_method.cc
+++ b/openjdkjvmti/ti_method.cc
@@ -66,7 +66,7 @@ struct TiMethodCallback : public art::MethodCallback {
void RegisterNativeMethod(art::ArtMethod* method,
const void* cur_method,
/*out*/void** new_method)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (event_handler->IsEventEnabledAnywhere(ArtJvmtiEvent::kNativeMethodBind)) {
art::Thread* thread = art::Thread::Current();
art::JNIEnvExt* jnienv = thread->GetJniEnv();
@@ -550,7 +550,7 @@ class CommonLocalVariableClosure : public art::Closure {
CommonLocalVariableClosure(jint depth, jint slot)
: result_(ERR(INTERNAL)), depth_(depth), slot_(slot) {}
- void Run(art::Thread* self) OVERRIDE REQUIRES(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES(art::Locks::mutator_lock_) {
art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
art::ScopedAssertNoThreadSuspension sants("CommonLocalVariableClosure::Run");
std::unique_ptr<art::Context> context(art::Context::Create());
@@ -702,7 +702,7 @@ class GetLocalVariableClosure : public CommonLocalVariableClosure {
jvmtiError GetTypeError(art::ArtMethod* method ATTRIBUTE_UNUSED,
art::Primitive::Type slot_type,
const std::string& descriptor ATTRIBUTE_UNUSED)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
switch (slot_type) {
case art::Primitive::kPrimByte:
case art::Primitive::kPrimChar:
@@ -722,7 +722,7 @@ class GetLocalVariableClosure : public CommonLocalVariableClosure {
}
jvmtiError Execute(art::ArtMethod* method, art::StackVisitor& visitor)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
switch (type_) {
case art::Primitive::kPrimNot: {
uint32_t ptr_val;
@@ -816,7 +816,7 @@ class SetLocalVariableClosure : public CommonLocalVariableClosure {
jvmtiError GetTypeError(art::ArtMethod* method,
art::Primitive::Type slot_type,
const std::string& descriptor)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
switch (slot_type) {
case art::Primitive::kPrimNot: {
if (type_ != art::Primitive::kPrimNot) {
@@ -852,7 +852,7 @@ class SetLocalVariableClosure : public CommonLocalVariableClosure {
}
jvmtiError Execute(art::ArtMethod* method, art::StackVisitor& visitor)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
switch (type_) {
case art::Primitive::kPrimNot: {
uint32_t ptr_val;
@@ -941,7 +941,7 @@ class GetLocalInstanceClosure : public art::Closure {
depth_(depth),
val_(nullptr) {}
- void Run(art::Thread* self) OVERRIDE REQUIRES(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES(art::Locks::mutator_lock_) {
art::ScopedAssertNoThreadSuspension sants("GetLocalInstanceClosure::Run");
art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
std::unique_ptr<art::Context> context(art::Context::Create());
diff --git a/openjdkjvmti/ti_phase.cc b/openjdkjvmti/ti_phase.cc
index 7157974c13..4fa97f10aa 100644
--- a/openjdkjvmti/ti_phase.cc
+++ b/openjdkjvmti/ti_phase.cc
@@ -56,7 +56,7 @@ struct PhaseUtil::PhaseCallback : public art::RuntimePhaseCallback {
return soa.AddLocalReference<jthread>(soa.Self()->GetPeer());
}
- void NextRuntimePhase(RuntimePhase phase) REQUIRES_SHARED(art::Locks::mutator_lock_) OVERRIDE {
+ void NextRuntimePhase(RuntimePhase phase) REQUIRES_SHARED(art::Locks::mutator_lock_) override {
art::Thread* self = art::Thread::Current();
switch (phase) {
case RuntimePhase::kInitialAgents:
diff --git a/openjdkjvmti/ti_redefine.cc b/openjdkjvmti/ti_redefine.cc
index 8707e272c6..2ec2f04e73 100644
--- a/openjdkjvmti/ti_redefine.cc
+++ b/openjdkjvmti/ti_redefine.cc
@@ -158,7 +158,7 @@ class ObsoleteMethodStackVisitor : public art::StackVisitor {
obsoleted_methods_(obsoleted_methods),
obsolete_maps_(obsolete_maps) { }
- ~ObsoleteMethodStackVisitor() OVERRIDE {}
+ ~ObsoleteMethodStackVisitor() override {}
public:
// Returns true if we successfully installed obsolete methods on this thread, filling
@@ -177,7 +177,7 @@ class ObsoleteMethodStackVisitor : public art::StackVisitor {
visitor.WalkStack();
}
- bool VisitFrame() OVERRIDE REQUIRES(art::Locks::mutator_lock_) {
+ bool VisitFrame() override REQUIRES(art::Locks::mutator_lock_) {
art::ScopedAssertNoThreadSuspension snts("Fixing up the stack for obsolete methods.");
art::ArtMethod* old_method = GetMethod();
if (obsoleted_methods_.find(old_method) != obsoleted_methods_.end()) {
diff --git a/openjdkjvmti/ti_search.cc b/openjdkjvmti/ti_search.cc
index bcbab14cdd..1189b1dec5 100644
--- a/openjdkjvmti/ti_search.cc
+++ b/openjdkjvmti/ti_search.cc
@@ -186,7 +186,7 @@ static void Update() REQUIRES_SHARED(art::Locks::mutator_lock_) {
}
struct SearchCallback : public art::RuntimePhaseCallback {
- void NextRuntimePhase(RuntimePhase phase) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void NextRuntimePhase(RuntimePhase phase) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (phase == RuntimePhase::kStart) {
// It's time to update the system properties.
Update();
diff --git a/openjdkjvmti/ti_stack.cc b/openjdkjvmti/ti_stack.cc
index 318d98d877..b6969afff1 100644
--- a/openjdkjvmti/ti_stack.cc
+++ b/openjdkjvmti/ti_stack.cc
@@ -128,7 +128,7 @@ struct GetStackTraceVectorClosure : public art::Closure {
start_result(0),
stop_result(0) {}
- void Run(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
auto frames_fn = [&](jvmtiFrameInfo info) {
frames.push_back(info);
};
@@ -195,7 +195,7 @@ struct GetStackTraceDirectClosure : public art::Closure {
DCHECK_GE(start_input, 0u);
}
- void Run(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
auto frames_fn = [&](jvmtiFrameInfo info) {
frame_buffer[index] = info;
++index;
@@ -287,7 +287,7 @@ struct GetAllStackTracesVectorClosure : public art::Closure {
GetAllStackTracesVectorClosure(size_t stop, Data* data_)
: barrier(0), stop_input(stop), data(data_) {}
- void Run(art::Thread* thread) OVERRIDE
+ void Run(art::Thread* thread) override
REQUIRES_SHARED(art::Locks::mutator_lock_)
REQUIRES(!data->mutex) {
art::Thread* self = art::Thread::Current();
@@ -678,7 +678,7 @@ struct GetFrameCountClosure : public art::Closure {
public:
GetFrameCountClosure() : count(0) {}
- void Run(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
GetFrameCountVisitor visitor(self);
visitor.WalkStack(false);
@@ -759,7 +759,7 @@ struct GetLocationClosure : public art::Closure {
public:
explicit GetLocationClosure(size_t n_in) : n(n_in), method(nullptr), dex_pc(0) {}
- void Run(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
GetLocationVisitor visitor(self, n);
visitor.WalkStack(false);
@@ -842,7 +842,7 @@ struct MonitorVisitor : public art::StackVisitor, public art::SingleRootVisitor
delete context_;
}
- bool VisitFrame() OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ bool VisitFrame() override REQUIRES_SHARED(art::Locks::mutator_lock_) {
art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
if (!GetMethod()->IsRuntimeMethod()) {
art::Monitor::VisitLocks(this, AppendOwnedMonitors, this);
@@ -867,7 +867,7 @@ struct MonitorVisitor : public art::StackVisitor, public art::SingleRootVisitor
}
void VisitRoot(art::mirror::Object* obj, const art::RootInfo& info ATTRIBUTE_UNUSED)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
for (const art::Handle<art::mirror::Object>& m : monitors) {
if (m.Get() == obj) {
return;
@@ -889,7 +889,7 @@ struct MonitorInfoClosure : public art::Closure {
explicit MonitorInfoClosure(Fn handle_results)
: err_(OK), handle_results_(handle_results) {}
- void Run(art::Thread* target) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* target) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
// Find the monitors on the stack.
MonitorVisitor visitor(target);
diff --git a/openjdkjvmti/ti_thread.cc b/openjdkjvmti/ti_thread.cc
index 949b566860..e53309445d 100644
--- a/openjdkjvmti/ti_thread.cc
+++ b/openjdkjvmti/ti_thread.cc
@@ -82,7 +82,7 @@ struct ThreadCallback : public art::ThreadLifecycleCallback {
thread.get());
}
- void ThreadStart(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void ThreadStart(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
if (!started) {
// Runtime isn't started. We only expect at most the signal handler or JIT threads to be
// started here.
@@ -101,7 +101,7 @@ struct ThreadCallback : public art::ThreadLifecycleCallback {
Post<ArtJvmtiEvent::kThreadStart>(self);
}
- void ThreadDeath(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void ThreadDeath(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
Post<ArtJvmtiEvent::kThreadEnd>(self);
}
diff --git a/openjdkjvmti/transform.cc b/openjdkjvmti/transform.cc
index 8797553b07..d87ca56b85 100644
--- a/openjdkjvmti/transform.cc
+++ b/openjdkjvmti/transform.cc
@@ -68,7 +68,7 @@
namespace openjdkjvmti {
// A FaultHandler that will deal with initializing ClassDefinitions when they are actually needed.
-class TransformationFaultHandler FINAL : public art::FaultHandler {
+class TransformationFaultHandler final : public art::FaultHandler {
public:
explicit TransformationFaultHandler(art::FaultManager* manager)
: art::FaultHandler(manager),
@@ -84,7 +84,7 @@ class TransformationFaultHandler FINAL : public art::FaultHandler {
uninitialized_class_definitions_.clear();
}
- bool Action(int sig, siginfo_t* siginfo, void* context ATTRIBUTE_UNUSED) OVERRIDE {
+ bool Action(int sig, siginfo_t* siginfo, void* context ATTRIBUTE_UNUSED) override {
DCHECK_EQ(sig, SIGSEGV);
art::Thread* self = art::Thread::Current();
if (UNLIKELY(uninitialized_class_definitions_lock_.IsExclusiveHeld(self))) {