Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/hotspot/share/c1/c1_LIRGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "ci/ciObjArray.hpp"
#include "ci/ciUtilities.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
#include "compiler/compilerOracle.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/c1/barrierSetC1.hpp"
#include "oops/klass.inline.hpp"
Expand Down Expand Up @@ -3216,7 +3217,7 @@ void LIRGenerator::do_ProfileInvoke(ProfileInvoke* x) {
// Notify the runtime very infrequently only to take care of counter overflows
int freq_log = Tier23InlineeNotifyFreqLog;
double scale;
if (_method->has_option_value(CompileCommand::CompileThresholdScaling, scale)) {
if (_method->has_option_value(CompileCommandEnum::CompileThresholdScaling, scale)) {
freq_log = CompilerConfig::scaled_freq_log(freq_log, scale);
}
increment_event_counter_impl(info, x->inlinee(), LIR_OprFact::intConst(InvocationCounter::count_increment), right_n_bits(freq_log), InvocationEntryBci, false, true);
Expand Down Expand Up @@ -3257,7 +3258,7 @@ void LIRGenerator::increment_event_counter(CodeEmitInfo* info, LIR_Opr step, int
}
// Increment the appropriate invocation/backedge counter and notify the runtime.
double scale;
if (_method->has_option_value(CompileCommand::CompileThresholdScaling, scale)) {
if (_method->has_option_value(CompileCommandEnum::CompileThresholdScaling, scale)) {
freq_log = CompilerConfig::scaled_freq_log(freq_log, scale);
}
increment_event_counter_impl(info, info->scope()->method(), step, right_n_bits(freq_log), bci, backedge, true);
Expand Down
5 changes: 3 additions & 2 deletions src/hotspot/share/ci/ciMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "ci/ciUtilities.inline.hpp"
#include "compiler/abstractCompiler.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
#include "compiler/compilerOracle.hpp"
#include "compiler/methodLiveness.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/linkResolver.hpp"
Expand Down Expand Up @@ -1062,7 +1063,7 @@ MethodCounters* ciMethod::ensure_method_counters() {
// ------------------------------------------------------------------
// ciMethod::has_option
//
bool ciMethod::has_option(enum CompileCommand option) {
bool ciMethod::has_option(CompileCommandEnum option) {
check_is_loaded();
VM_ENTRY_MARK;
methodHandle mh(THREAD, get_Method());
Expand All @@ -1072,7 +1073,7 @@ bool ciMethod::has_option(enum CompileCommand option) {
// ------------------------------------------------------------------
// ciMethod::has_option_value
//
bool ciMethod::has_option_value(enum CompileCommand option, double& value) {
bool ciMethod::has_option_value(CompileCommandEnum option, double& value) {
check_is_loaded();
VM_ENTRY_MARK;
methodHandle mh(THREAD, get_Method());
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/share/ci/ciMethod.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -31,10 +31,10 @@
#include "ci/ciSignature.hpp"
#include "classfile/vmIntrinsics.hpp"
#include "compiler/methodLiveness.hpp"
#include "compiler/compilerOracle.hpp"
#include "oops/method.hpp"
#include "runtime/handles.hpp"
#include "utilities/bitMap.hpp"
#include "utilities/vmEnums.hpp"

class ciMethodBlocks;
class MethodLiveness;
Expand Down Expand Up @@ -303,8 +303,8 @@ class ciMethod : public ciMetadata {
// Find the proper vtable index to invoke this method.
int resolve_vtable_index(ciKlass* caller, ciKlass* receiver);

bool has_option(enum CompileCommand option);
bool has_option_value(enum CompileCommand option, double& value);
bool has_option(CompileCommandEnum option);
bool has_option_value(CompileCommandEnum option, double& value);
bool can_be_compiled();
bool can_be_parsed() const { return _can_be_parsed; }
bool has_compiled_code();
Expand Down
7 changes: 4 additions & 3 deletions src/hotspot/share/code/nmethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "compiler/compileLog.hpp"
#include "compiler/compileTask.hpp"
#include "compiler/compilerDirectives.hpp"
#include "compiler/compilerOracle.hpp"
#include "compiler/directivesParser.hpp"
#include "compiler/disassembler.hpp"
#include "compiler/oopMap.inline.hpp"
Expand Down Expand Up @@ -1615,15 +1616,15 @@ void nmethod::print_nmethod(bool printmethod) {
#if defined(SUPPORT_DATA_STRUCTS)
if (AbstractDisassembler::show_structs()) {
methodHandle mh(Thread::current(), _method);
if (printmethod || PrintDebugInfo || CompilerOracle::has_option(mh, CompileCommand::PrintDebugInfo)) {
if (printmethod || PrintDebugInfo || CompilerOracle::has_option(mh, CompileCommandEnum::PrintDebugInfo)) {
print_scopes();
tty->print_cr("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
}
if (printmethod || PrintRelocations || CompilerOracle::has_option(mh, CompileCommand::PrintRelocations)) {
if (printmethod || PrintRelocations || CompilerOracle::has_option(mh, CompileCommandEnum::PrintRelocations)) {
print_relocations();
tty->print_cr("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
}
if (printmethod || PrintDependencies || CompilerOracle::has_option(mh, CompileCommand::PrintDependencies)) {
if (printmethod || PrintDependencies || CompilerOracle::has_option(mh, CompileCommandEnum::PrintDependencies)) {
print_dependencies_on(tty);
tty->print_cr("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ");
}
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/compiler/compilationPolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class LoopPredicate : AllStatic {
public:
static bool apply_scaled(const methodHandle& method, CompLevel cur_level, int i, int b, double scale) {
double threshold_scaling;
if (CompilerOracle::has_option_value(method, CompileCommand::CompileThresholdScaling, threshold_scaling)) {
if (CompilerOracle::has_option_value(method, CompileCommandEnum::CompileThresholdScaling, threshold_scaling)) {
scale *= threshold_scaling;
}
switch(cur_level) {
Expand Down Expand Up @@ -267,7 +267,7 @@ class CallPredicate : AllStatic {
public:
static bool apply_scaled(const methodHandle& method, CompLevel cur_level, int i, int b, double scale) {
double threshold_scaling;
if (CompilerOracle::has_option_value(method, CompileCommand::CompileThresholdScaling, threshold_scaling)) {
if (CompilerOracle::has_option_value(method, CompileCommandEnum::CompileThresholdScaling, threshold_scaling)) {
scale *= threshold_scaling;
}
switch(cur_level) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/compiler/compileBroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ bool CompileBroker::compilation_is_prohibited(const methodHandle& method, int os

// The method may be explicitly excluded by the user.
double scale;
if (excluded || (CompilerOracle::has_option_value(method, CompileCommand::CompileThresholdScaling, scale) && scale == 0)) {
if (excluded || (CompilerOracle::has_option_value(method, CompileCommandEnum::CompileThresholdScaling, scale) && scale == 0)) {
bool quietly = CompilerOracle::be_quiet();
if (PrintCompilation && !quietly) {
// This does not happen quietly...
Expand Down
10 changes: 5 additions & 5 deletions src/hotspot/share/compiler/compilerDirectives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle
}

// inline and dontinline (including exclude) are implemented in the directiveset accessors
#define init_default_cc(name, type, dvalue, cc_flag) { type v; if (!_modified[name##Index] && CompileCommand::cc_flag != CompileCommand::Unknown && CompilerOracle::has_option_value(method, CompileCommand::cc_flag, v) && v != this->name##Option) { set.cloned()->name##Option = v; } }
#define init_default_cc(name, type, dvalue, cc_flag) { type v; if (!_modified[name##Index] && CompileCommandEnum::cc_flag != CompileCommandEnum::Unknown && CompilerOracle::has_option_value(method, CompileCommandEnum::cc_flag, v) && v != this->name##Option) { set.cloned()->name##Option = v; } }
compilerdirectives_common_flags(init_default_cc)
compilerdirectives_c2_flags(init_default_cc)
compilerdirectives_c1_flags(init_default_cc)
Expand All @@ -438,7 +438,7 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle
if (!_modified[TraceAutoVectorizationIndex]) {
// Parse ccstr and create mask
ccstrlist option;
if (CompilerOracle::has_option_value(method, CompileCommand::TraceAutoVectorization, option)) {
if (CompilerOracle::has_option_value(method, CompileCommandEnum::TraceAutoVectorization, option)) {
TraceAutoVectorizationTagValidator validator(option, false);
if (validator.is_valid()) {
set.cloned()->set_trace_auto_vectorization_tags(validator.tags());
Expand All @@ -448,7 +448,7 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle
if (!_modified[PrintIdealPhaseIndex]) {
// Parse ccstr and create set
ccstrlist option;
if (CompilerOracle::has_option_value(method, CompileCommand::PrintIdealPhase, option)) {
if (CompilerOracle::has_option_value(method, CompileCommandEnum::PrintIdealPhase, option)) {
PhaseNameValidator validator(option);
if (validator.is_valid()) {
assert(!validator.phase_name_set().is_empty(), "Phase name set must be non-empty");
Expand All @@ -464,7 +464,7 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle
bool need_reset = true; // if Control/DisableIntrinsic redefined, only need to reset control_words once

if (!_modified[ControlIntrinsicIndex] &&
CompilerOracle::has_option_value(method, CompileCommand::ControlIntrinsic, option_value)) {
CompilerOracle::has_option_value(method, CompileCommandEnum::ControlIntrinsic, option_value)) {
ControlIntrinsicIter iter(option_value);

if (need_reset) {
Expand All @@ -484,7 +484,7 @@ DirectiveSet* DirectiveSet::compilecommand_compatibility_init(const methodHandle


if (!_modified[DisableIntrinsicIndex] &&
CompilerOracle::has_option_value(method, CompileCommand::DisableIntrinsic, option_value)) {
CompilerOracle::has_option_value(method, CompileCommandEnum::DisableIntrinsic, option_value)) {
ControlIntrinsicIter iter(option_value, true/*disable_all*/);

if (need_reset) {
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/compiler/compilerDirectives.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "ci/ciMethod.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/methodMatcher.hpp"
#include "compiler/compilerOracle.hpp"
#include "opto/phasetype.hpp"
#include "utilities/bitMap.hpp"
#include "utilities/exceptions.hpp"
Expand Down
Loading