Skip to content

Commit

Permalink
8291002: Rename Method::build_interpreter_method_data to Method::buil…
Browse files Browse the repository at this point in the history
…d_profiling_method_data

Reviewed-by: kvn, thartmann
  • Loading branch information
TheShermanTanker authored and TobiHartmann committed Jul 27, 2022
1 parent 61e072d commit 8ec3197
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/c1/c1_Runtime1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ JRT_ENTRY(void, Runtime1::predicate_failed_trap(JavaThread* current))
if (mdo == NULL && !HAS_PENDING_EXCEPTION) {
// Build an MDO. Ignore errors like OutOfMemory;
// that simply means we won't have an MDO to update.
Method::build_interpreter_method_data(m, THREAD);
Method::build_profiling_method_data(m, THREAD);
if (HAS_PENDING_EXCEPTION) {
// Only metaspace OOM is expected. No Java code executed.
assert((PENDING_EXCEPTION->is_a(vmClasses::OutOfMemoryError_klass())), "we expect only an OOM error here");
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/ci/ciMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ bool ciMethod::ensure_method_data(const methodHandle& h_m) {
return true;
}
if (h_m()->method_data() == NULL) {
Method::build_interpreter_method_data(h_m, THREAD);
Method::build_profiling_method_data(h_m, THREAD);
if (HAS_PENDING_EXCEPTION) {
CLEAR_PENDING_EXCEPTION;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/ci/ciReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ class CompileReplay : public StackObj {
// method to be rewritten (number of arguments at a call for
// instance)
method->method_holder()->link_class(CHECK);
// Method::build_interpreter_method_data(method, CHECK);
// Method::build_profiling_method_data(method, CHECK);
{
// Grab a lock here to prevent multiple
// MethodData*s from being created.
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/compiler/compilationPolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ void CompilationPolicy::create_mdo(const methodHandle& mh, JavaThread* THREAD) {
return;
}
if (mh->method_data() == NULL) {
Method::build_interpreter_method_data(mh, CHECK_AND_CLEAR);
Method::build_profiling_method_data(mh, CHECK_AND_CLEAR);
}
if (ProfileInterpreter) {
MethodData* mdo = mh->method_data();
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/interpreter/interpreterRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void InterpreterRuntime::note_trap_inner(JavaThread* current, int reason,
if (trap_mdo == NULL) {
ExceptionMark em(current);
JavaThread* THREAD = current; // For exception macros.
Method::build_interpreter_method_data(trap_method, THREAD);
Method::build_profiling_method_data(trap_method, THREAD);
if (HAS_PENDING_EXCEPTION) {
// Only metaspace OOM is expected. No Java code executed.
assert((PENDING_EXCEPTION->is_a(vmClasses::OutOfMemoryError_klass())),
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/share/oops/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,9 @@ void Method::print_invocation_count() {
#endif
}

// Build a MethodData* object to hold information about this method
// collected in the interpreter.
void Method::build_interpreter_method_data(const methodHandle& method, TRAPS) {
// Build a MethodData* object to hold profiling information collected on this
// method when requested.
void Method::build_profiling_method_data(const methodHandle& method, TRAPS) {
// Do not profile the method if metaspace has hit an OOM previously
// allocating profiling data. Callers clear pending exception so don't
// add one here.
Expand All @@ -599,7 +599,7 @@ void Method::build_interpreter_method_data(const methodHandle& method, TRAPS) {
method->set_method_data(method_data);
if (PrintMethodData && (Verbose || WizardMode)) {
ResourceMark rm(THREAD);
tty->print("build_interpreter_method_data for ");
tty->print("build_profiling_method_data for ");
method->print_name(tty);
tty->cr();
// At the end of the run, the MDO, full of data, will be dumped.
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/method.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ class Method : public Metadata {
bool was_executed_more_than(int n);
bool was_never_executed() { return !was_executed_more_than(0); }

static void build_interpreter_method_data(const methodHandle& method, TRAPS);
static void build_profiling_method_data(const methodHandle& method, TRAPS);

static MethodCounters* build_method_counters(Thread* current, Method* m);

Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/prims/whitebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ WB_ENTRY(void, WB_MarkMethodProfiled(JNIEnv* env, jobject o, jobject method))

MethodData* mdo = mh->method_data();
if (mdo == NULL) {
Method::build_interpreter_method_data(mh, CHECK_AND_CLEAR);
Method::build_profiling_method_data(mh, CHECK_AND_CLEAR);
mdo = mh->method_data();
}
mdo->init();
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/deoptimization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ Deoptimization::get_method_data(JavaThread* thread, const methodHandle& m,
if (mdo == NULL && create_if_missing && !HAS_PENDING_EXCEPTION) {
// Build an MDO. Ignore errors like OutOfMemory;
// that simply means we won't have an MDO to update.
Method::build_interpreter_method_data(m, THREAD);
Method::build_profiling_method_data(m, THREAD);
if (HAS_PENDING_EXCEPTION) {
// Only metaspace OOM is expected. No Java code executed.
assert((PENDING_EXCEPTION->is_a(vmClasses::OutOfMemoryError_klass())), "we expect only an OOM error here");
Expand Down

1 comment on commit 8ec3197

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.