diff options
author | 2023-06-01 23:39:50 +0000 | |
---|---|---|
committer | 2023-06-02 20:36:05 +0000 | |
commit | 65247c459b4d373807530bef1fdb63455b701c2c (patch) | |
tree | 8e7ed73186fb2c0f8cb879690dceb88a82dfa5ef | |
parent | e83a973d4cf136705b833f50b64e003f083f2746 (diff) |
Fix code for bugprone-argument-comment clang-tidy warning
After clang-r498229, we got the below error:
art/runtime/instrumentation.cc:723:29: error: argument name 'force_deopt' in comment
does not match parameter name 'deopt_all_frames' [bugprone-argument-comment,-warnings-as-errors]
InstrumentAllThreadStacks(/* force_deopt= */ true);
^
Bug: 285008446
Test: build with WITH_TIDY=1
Change-Id: Iddc9e4574cc6402d102bdcf6b5941fe7f6630bd2
-rw-r--r-- | openjdkjvmti/deopt_manager.cc | 5 | ||||
-rw-r--r-- | openjdkjvmti/ti_heap.cc | 2 | ||||
-rw-r--r-- | runtime/instrumentation.h | 6 | ||||
-rw-r--r-- | test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/openjdkjvmti/deopt_manager.cc b/openjdkjvmti/deopt_manager.cc index 978843c6ea..025bed53b2 100644 --- a/openjdkjvmti/deopt_manager.cc +++ b/openjdkjvmti/deopt_manager.cc @@ -510,9 +510,8 @@ void DeoptManager::DeoptimizeThread(art::Thread* target) { // Prepare the stack so methods can be deoptimized as and when required. // This by itself doesn't cause any methods to deoptimize but enables // deoptimization on demand. - art::Runtime::Current()->GetInstrumentation()->InstrumentThreadStack( - target, - /* deopt_all_frames= */ false); + art::Runtime::Current()->GetInstrumentation()->InstrumentThreadStack(target, + /* force_deopt= */ false); } extern DeoptManager* gDeoptManager; diff --git a/openjdkjvmti/ti_heap.cc b/openjdkjvmti/ti_heap.cc index 4be7922e70..662f464ad2 100644 --- a/openjdkjvmti/ti_heap.cc +++ b/openjdkjvmti/ti_heap.cc @@ -1780,7 +1780,7 @@ static void ReplaceStrongRoots(art::Thread* self, const ObjectMap& map) // already have. // TODO We technically only need to do this if the frames are not already being interpreted. // The cost for doing an extra stack walk is unlikely to be worth it though. - instr->InstrumentThreadStack(t, /* deopt_all_frames= */ true); + instr->InstrumentThreadStack(t, /* force_deopt= */ true); } } } diff --git a/runtime/instrumentation.h b/runtime/instrumentation.h index 7676080efe..fde3f1a4c5 100644 --- a/runtime/instrumentation.h +++ b/runtime/instrumentation.h @@ -557,9 +557,9 @@ class Instrumentation { // example, after updating local variables) // - to call method entry / exit hooks for tracing. For this we instrument // the stack frame to run entry / exit hooks but we don't need to deoptimize. - // deopt_all_frames indicates whether the frames need to deoptimize or not. - void InstrumentThreadStack(Thread* thread, bool deopt_all_frames) REQUIRES(Locks::mutator_lock_); - void InstrumentAllThreadStacks(bool deopt_all_frames) REQUIRES(Locks::mutator_lock_) + // force_deopt indicates whether the frames need to deoptimize or not. + void InstrumentThreadStack(Thread* thread, bool force_deopt) REQUIRES(Locks::mutator_lock_); + void InstrumentAllThreadStacks(bool force_deopt) REQUIRES(Locks::mutator_lock_) REQUIRES(!Locks::thread_list_lock_); // Force all currently running frames to be deoptimized back to interpreter. This should only be diff --git a/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc b/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc index 78bb772893..ae1d8306d1 100644 --- a/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc +++ b/test/2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc @@ -88,7 +88,7 @@ extern "C" JNIEXPORT void JNICALL Java_Main_waitAndInstrumentStack(JNIEnv*, CHECK(other != nullptr); ScopedSuspendAll ssa(__FUNCTION__); Runtime::Current()->GetInstrumentation()->InstrumentThreadStack(other, - /* deopt_all_frames= */ false); + /* force_deopt= */ false); bool resumed = art::Runtime::Current()->GetThreadList()->Resume(other, SuspendReason::kInternal); CHECK(resumed); instrumented = true; |