Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
20 changes: 10 additions & 10 deletions src/hotspot/share/code/codeBlob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ BufferBlob* BufferBlob::create(const char* name, uint buffer_size) {
assert(name != nullptr, "must provide a name");
{
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
blob = new (size) BufferBlob(name, CodeBlobKind::Blob_Buffer, size);
blob = new (size) BufferBlob(name, CodeBlobKind::Buffer, size);
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();
Expand All @@ -286,7 +286,7 @@ BufferBlob* BufferBlob::create(const char* name, CodeBuffer* cb) {
assert(name != nullptr, "must provide a name");
{
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
blob = new (size) BufferBlob(name, CodeBlobKind::Blob_Buffer, cb, size);
blob = new (size) BufferBlob(name, CodeBlobKind::Buffer, cb, size);
}
// Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage();
Expand All @@ -307,7 +307,7 @@ void BufferBlob::free(BufferBlob *blob) {
// Implementation of AdapterBlob

AdapterBlob::AdapterBlob(int size, CodeBuffer* cb) :
BufferBlob("I2C/C2I adapters", CodeBlobKind::Blob_Adapter, cb, size) {
BufferBlob("I2C/C2I adapters", CodeBlobKind::Adapter, cb, size) {
CodeCache::commit(this);
}

Expand Down Expand Up @@ -342,7 +342,7 @@ void* VtableBlob::operator new(size_t s, unsigned size) throw() {
}

VtableBlob::VtableBlob(const char* name, int size) :
BufferBlob(name, CodeBlobKind::Blob_Vtable, size) {
BufferBlob(name, CodeBlobKind::Vtable, size) {
}

VtableBlob* VtableBlob::create(const char* name, int buffer_size) {
Expand Down Expand Up @@ -413,7 +413,7 @@ RuntimeStub::RuntimeStub(
OopMapSet* oop_maps,
bool caller_must_gc_arguments
)
: RuntimeBlob(name, CodeBlobKind::Blob_Runtime_Stub, cb, size, sizeof(RuntimeStub),
: RuntimeBlob(name, CodeBlobKind::Runtime_Stub, cb, size, sizeof(RuntimeStub),
frame_complete, frame_size, oop_maps, caller_must_gc_arguments)
{
}
Expand Down Expand Up @@ -470,7 +470,7 @@ DeoptimizationBlob::DeoptimizationBlob(
int unpack_with_reexecution_offset,
int frame_size
)
: SingletonBlob("DeoptimizationBlob", CodeBlobKind::Blob_Deoptimization, cb,
: SingletonBlob("DeoptimizationBlob", CodeBlobKind::Deoptimization, cb,
size, sizeof(DeoptimizationBlob), frame_size, oop_maps)
{
_unpack_offset = unpack_offset;
Expand Down Expand Up @@ -520,7 +520,7 @@ UncommonTrapBlob::UncommonTrapBlob(
OopMapSet* oop_maps,
int frame_size
)
: SingletonBlob("UncommonTrapBlob", CodeBlobKind::Blob_Uncommon_Trap, cb,
: SingletonBlob("UncommonTrapBlob", CodeBlobKind::Uncommon_Trap, cb,
size, sizeof(UncommonTrapBlob), frame_size, oop_maps)
{}

Expand Down Expand Up @@ -557,7 +557,7 @@ ExceptionBlob::ExceptionBlob(
OopMapSet* oop_maps,
int frame_size
)
: SingletonBlob("ExceptionBlob", CodeBlobKind::Blob_Exception, cb,
: SingletonBlob("ExceptionBlob", CodeBlobKind::Exception, cb,
size, sizeof(ExceptionBlob), frame_size, oop_maps)
{}

Expand Down Expand Up @@ -593,7 +593,7 @@ SafepointBlob::SafepointBlob(
OopMapSet* oop_maps,
int frame_size
)
: SingletonBlob("SafepointBlob", CodeBlobKind::Blob_Safepoint, cb,
: SingletonBlob("SafepointBlob", CodeBlobKind::Safepoint, cb,
size, sizeof(SafepointBlob), frame_size, oop_maps)
{}

Expand All @@ -620,7 +620,7 @@ SafepointBlob* SafepointBlob::create(
// Implementation of UpcallStub

UpcallStub::UpcallStub(const char* name, CodeBuffer* cb, int size, jobject receiver, ByteSize frame_data_offset) :
RuntimeBlob(name, CodeBlobKind::Blob_Upcall, cb, size, sizeof(UpcallStub),
RuntimeBlob(name, CodeBlobKind::Upcall, cb, size, sizeof(UpcallStub),
CodeOffsets::frame_never_safe, 0 /* no frame size */,
/* oop maps = */ nullptr, /* caller must gc arguments = */ false),
_receiver(receiver),
Expand Down
84 changes: 42 additions & 42 deletions src/hotspot/share/code/codeBlob.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ enum class CodeBlobType {
// - data space

enum class CodeBlobKind : u1 {
Blob_None,
Blob_Nmethod,
Blob_Buffer,
Blob_Adapter,
Blob_Vtable,
Blob_MH_Adapter,
Blob_Runtime_Stub,
Blob_Deoptimization,
Blob_Exception,
Blob_Safepoint,
Blob_Uncommon_Trap,
Blob_Upcall,
Blob_Number_Of_Kinds
None,
Nmethod,
Buffer,
Adapter,
Vtable,
MH_Adapter,
Runtime_Stub,
Deoptimization,
Exception,
Safepoint,
Uncommon_Trap,
Upcall,
Number_Of_Kinds
};

class UpcallStub; // for as_upcall_stub()
Expand Down Expand Up @@ -155,17 +155,17 @@ class CodeBlob {
virtual void purge(bool free_code_cache_data, bool unregister_nmethod);

// Typing
bool is_nmethod() const { return _kind == CodeBlobKind::Blob_Nmethod; }
bool is_buffer_blob() const { return _kind == CodeBlobKind::Blob_Buffer; }
bool is_runtime_stub() const { return _kind == CodeBlobKind::Blob_Runtime_Stub; }
bool is_deoptimization_stub() const { return _kind == CodeBlobKind::Blob_Deoptimization; }
bool is_uncommon_trap_stub() const { return _kind == CodeBlobKind::Blob_Uncommon_Trap; }
bool is_exception_stub() const { return _kind == CodeBlobKind::Blob_Exception; }
bool is_safepoint_stub() const { return _kind == CodeBlobKind::Blob_Safepoint; }
bool is_adapter_blob() const { return _kind == CodeBlobKind::Blob_Adapter; }
bool is_vtable_blob() const { return _kind == CodeBlobKind::Blob_Vtable; }
bool is_method_handles_adapter_blob() const { return _kind == CodeBlobKind::Blob_MH_Adapter; }
bool is_upcall_stub() const { return _kind == CodeBlobKind::Blob_Upcall; }
bool is_nmethod() const { return _kind == CodeBlobKind::Nmethod; }
bool is_buffer_blob() const { return _kind == CodeBlobKind::Buffer; }
bool is_runtime_stub() const { return _kind == CodeBlobKind::Runtime_Stub; }
bool is_deoptimization_stub() const { return _kind == CodeBlobKind::Deoptimization; }
bool is_uncommon_trap_stub() const { return _kind == CodeBlobKind::Uncommon_Trap; }
bool is_exception_stub() const { return _kind == CodeBlobKind::Exception; }
bool is_safepoint_stub() const { return _kind == CodeBlobKind::Safepoint; }
bool is_adapter_blob() const { return _kind == CodeBlobKind::Adapter; }
bool is_vtable_blob() const { return _kind == CodeBlobKind::Vtable; }
bool is_method_handles_adapter_blob() const { return _kind == CodeBlobKind::MH_Adapter; }
bool is_upcall_stub() const { return _kind == CodeBlobKind::Upcall; }

// Casting
nmethod* as_nmethod_or_null() { return is_nmethod() ? (nmethod*) this : nullptr; }
Expand Down Expand Up @@ -325,11 +325,11 @@ class BufferBlob: public RuntimeBlob {
static void free(BufferBlob* buf);

// GC/Verification support
virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) override { /* nothing to do */ }
void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) override { /* nothing to do */ }

virtual void verify() override;
virtual void print_on(outputStream* st) const override;
virtual void print_value_on(outputStream* st) const override;
void verify() override;
void print_on(outputStream* st) const override;
void print_value_on(outputStream* st) const override;
};


Expand Down Expand Up @@ -362,7 +362,7 @@ class VtableBlob: public BufferBlob {

class MethodHandlesAdapterBlob: public BufferBlob {
private:
MethodHandlesAdapterBlob(int size): BufferBlob("MethodHandles adapters", CodeBlobKind::Blob_MH_Adapter, size) {}
MethodHandlesAdapterBlob(int size): BufferBlob("MethodHandles adapters", CodeBlobKind::MH_Adapter, size) {}

public:
// Creation
Expand Down Expand Up @@ -406,11 +406,11 @@ class RuntimeStub: public RuntimeBlob {
address entry_point() const { return code_begin(); }

// GC/Verification support
virtual void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) override { /* nothing to do */ }
void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) override { /* nothing to do */ }

virtual void verify() override;
virtual void print_on(outputStream* st) const override;
virtual void print_value_on(outputStream* st) const override;
void verify() override;
void print_on(outputStream* st) const override;
void print_value_on(outputStream* st) const override;
};


Expand Down Expand Up @@ -439,10 +439,10 @@ class SingletonBlob: public RuntimeBlob {
address entry_point() { return code_begin(); }

// GC/Verification support
virtual void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) override { /* nothing to do */ }
virtual void verify() override; // does nothing
virtual void print_on(outputStream* st) const override;
virtual void print_value_on(outputStream* st) const override;
void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) override { /* nothing to do */ }
void verify() override; // does nothing
void print_on(outputStream* st) const override;
void print_value_on(outputStream* st) const override;
};


Expand Down Expand Up @@ -488,7 +488,7 @@ class DeoptimizationBlob: public SingletonBlob {
);

// Printing
virtual void print_value_on(outputStream* st) const override;
void print_value_on(outputStream* st) const override;

address unpack() const { return code_begin() + _unpack_offset; }
address unpack_with_exception() const { return code_begin() + _unpack_with_exception; }
Expand Down Expand Up @@ -632,12 +632,12 @@ class UpcallStub: public RuntimeBlob {

// GC/Verification support
void oops_do(OopClosure* f, const frame& frame);
virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) override;
virtual void verify() override;
void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) override;
void verify() override;

// Misc.
virtual void print_on(outputStream* st) const override;
virtual void print_value_on(outputStream* st) const override;
void print_on(outputStream* st) const override;
void print_value_on(outputStream* st) const override;
};

#endif // SHARE_CODE_CODEBLOB_HPP
4 changes: 2 additions & 2 deletions src/hotspot/share/code/nmethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ nmethod::nmethod(
ByteSize basic_lock_owner_sp_offset,
ByteSize basic_lock_sp_offset,
OopMapSet* oop_maps )
: CodeBlob("native nmethod", CodeBlobKind::Blob_Nmethod, code_buffer, nmethod_size, sizeof(nmethod),
: CodeBlob("native nmethod", CodeBlobKind::Nmethod, code_buffer, nmethod_size, sizeof(nmethod),
offsets->value(CodeOffsets::Frame_Complete), frame_size, oop_maps, false),
_deoptimization_generation(0),
_method(method),
Expand Down Expand Up @@ -1356,7 +1356,7 @@ nmethod::nmethod(
JVMCINMethodData* jvmci_data
#endif
)
: CodeBlob("nmethod", CodeBlobKind::Blob_Nmethod, code_buffer, nmethod_size, sizeof(nmethod),
: CodeBlob("nmethod", CodeBlobKind::Nmethod, code_buffer, nmethod_size, sizeof(nmethod),
offsets->value(CodeOffsets::Frame_Complete), frame_size, oop_maps, false),
_deoptimization_generation(0),
_method(method),
Expand Down
16 changes: 8 additions & 8 deletions src/hotspot/share/code/nmethod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ class nmethod : public CodeBlob {
return (addr >= code_begin() && addr < verified_entry_point());
}

virtual void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) override;
void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) override;

// implicit exceptions support
address continuation_for_implicit_div0_exception(address pc) { return continuation_for_implicit_exception(pc, true); }
Expand All @@ -768,7 +768,7 @@ class nmethod : public CodeBlob {
// Serial version used by whitebox test
void cleanup_inline_caches_whitebox();

virtual void clear_inline_caches();
void clear_inline_caches();

// Execute nmethod barrier code, as if entering through nmethod call.
void run_nmethod_entry_barrier();
Expand Down Expand Up @@ -801,7 +801,7 @@ class nmethod : public CodeBlob {
void unlink();

// Deallocate this nmethod - called by the GC
virtual void purge(bool free_code_cache_data, bool unregister_nmethod) override;
void purge(bool free_code_cache_data, bool unregister_nmethod) override;

// See comment at definition of _last_seen_on_stack
void mark_as_maybe_on_stack();
Expand Down Expand Up @@ -889,7 +889,7 @@ class nmethod : public CodeBlob {
void post_compiled_method_load_event(JvmtiThreadState* state = nullptr);

// verify operations
virtual void verify() override;
void verify() override;
void verify_scopes();
void verify_interrupt_point(address interrupt_point, bool is_inline_cache);

Expand All @@ -901,8 +901,8 @@ class nmethod : public CodeBlob {
void decode(outputStream* st) const { decode2(st); } // just delegate here.

// printing support
virtual void print() const override;
void print(outputStream* st) const;
void print() const override;
void print(outputStream* st) const;
void print_code();

#if defined(SUPPORT_DATA_STRUCTS)
Expand Down Expand Up @@ -931,7 +931,7 @@ class nmethod : public CodeBlob {
void print_nmethod(bool print_code);

// need to re-define this from CodeBlob else the overload hides it
virtual void print_on(outputStream* st) const override { CodeBlob::print_on(st); }
void print_on(outputStream* st) const override { CodeBlob::print_on(st); }
void print_on(outputStream* st, const char* msg) const;

// Logging
Expand All @@ -940,7 +940,7 @@ class nmethod : public CodeBlob {
void log_state_change() const;

// Prints block-level comments, including nmethod specific block labels:
virtual void print_block_comment(outputStream* stream, address block_begin) const override {
void print_block_comment(outputStream* stream, address block_begin) const override {
#if defined(SUPPORT_ASSEMBLY) || defined(SUPPORT_ABSTRACT_ASSEMBLY)
print_nmethod_labels(stream, block_begin);
CodeBlob::print_block_comment(stream, block_begin);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/code/nmethod.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ inline bool nmethod::is_deopt_mh_entry(address pc) {
// nmethod::get_deopt_original_pc
//
// Return the original PC for the given PC if:
// (a) the given PC belongs to a nmethod and
// (a) the given PC belongs to an nmethod and
// (b) it is a deopt PC

inline address nmethod::get_deopt_original_pc(const frame* fr) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/shared/gcBehaviours.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "memory/iterator.hpp"
#include "oops/oopsHierarchy.hpp"

// This is the behaviour for checking if a nmethod is unloading
// This is the behaviour for checking if an nmethod is unloading
// or has unloaded due to having phantomly dead oops in it after a GC.
class IsUnloadingBehaviour {
static IsUnloadingBehaviour* _current;
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/share/gc/shenandoah/shenandoahUnload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ShenandoahIsUnloadingOopClosure : public OopClosure {

class ShenandoahIsUnloadingBehaviour : public IsUnloadingBehaviour {
public:
virtual bool has_dead_oop(nmethod* const nm) const {
virtual bool has_dead_oop(nmethod* nm) const {
assert(ShenandoahHeap::heap()->is_concurrent_weak_root_in_progress(), "Only for this phase");
ShenandoahNMethod* data = ShenandoahNMethod::gc_data(nm);
ShenandoahReentrantLocker locker(data->lock());
Expand All @@ -90,20 +90,20 @@ class ShenandoahIsUnloadingBehaviour : public IsUnloadingBehaviour {

class ShenandoahCompiledICProtectionBehaviour : public CompiledICProtectionBehaviour {
public:
virtual bool lock(nmethod* const nm) {
virtual bool lock(nmethod* nm) {
ShenandoahReentrantLock* const lock = ShenandoahNMethod::lock_for_nmethod(nm);
assert(lock != nullptr, "Not yet registered?");
lock->lock();
return true;
}

virtual void unlock(nmethod* const nm) {
virtual void unlock(nmethod* nm) {
ShenandoahReentrantLock* const lock = ShenandoahNMethod::lock_for_nmethod(nm);
assert(lock != nullptr, "Not yet registered?");
lock->unlock();
}

virtual bool is_safe(nmethod* const nm) {
virtual bool is_safe(nmethod* nm) {
if (SafepointSynchronize::is_at_safepoint() || nm->is_unloading()) {
return true;
}
Expand Down
8 changes: 4 additions & 4 deletions src/hotspot/share/gc/x/xUnload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class XIsUnloadingOopClosure : public OopClosure {

class XIsUnloadingBehaviour : public IsUnloadingBehaviour {
public:
virtual bool has_dead_oop(nmethod* const nm) const {
virtual bool has_dead_oop(nmethod* nm) const {
XReentrantLock* const lock = XNMethod::lock_for_nmethod(nm);
XLocker<XReentrantLock> locker(lock);
XIsUnloadingOopClosure cl;
Expand All @@ -86,18 +86,18 @@ class XIsUnloadingBehaviour : public IsUnloadingBehaviour {

class XCompiledICProtectionBehaviour : public CompiledICProtectionBehaviour {
public:
virtual bool lock(nmethod* const nm) {
virtual bool lock(nmethod* nm) {
XReentrantLock* const lock = XNMethod::lock_for_nmethod(nm);
lock->lock();
return true;
}

virtual void unlock(nmethod* const nm) {
virtual void unlock(nmethod* nm) {
XReentrantLock* const lock = XNMethod::lock_for_nmethod(nm);
lock->unlock();
}

virtual bool is_safe(nmethod* const nm) {
virtual bool is_safe(nmethod* nm) {
if (SafepointSynchronize::is_at_safepoint() || nm->is_unloading()) {
return true;
}
Expand Down
Loading