Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8350893: Use generated names for hand generated opto runtime blobs #23829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions src/hotspot/cpu/aarch64/runtime_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ void OptoRuntime::generate_uncommon_trap_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer("uncommon_trap_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
CodeBuffer buffer(name, 2048, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);

assert(SimpleRuntimeFrame::framesize % 4 == 0, "sp not 16-byte aligned");
Expand Down Expand Up @@ -282,7 +283,8 @@ void OptoRuntime::generate_exception_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer("exception_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
CodeBuffer buffer(name, 2048, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);

// TODO check various assumptions made here
Expand Down
8 changes: 5 additions & 3 deletions src/hotspot/cpu/arm/runtime_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ void OptoRuntime::generate_uncommon_trap_blob() {
ResourceMark rm;

// setup code generation tools
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
#ifdef _LP64
CodeBuffer buffer("uncommon_trap_blob", 2700, 512);
CodeBuffer buffer(name, 2700, 512);
#else
// Measured 8/7/03 at 660 in 32bit debug build
CodeBuffer buffer("uncommon_trap_blob", 2000, 512);
CodeBuffer buffer(name, 2000, 512);
#endif
// bypassed when code generation useless
MacroAssembler* masm = new MacroAssembler(&buffer);
Expand Down Expand Up @@ -206,7 +207,8 @@ void OptoRuntime::generate_exception_blob() {

// setup code generation tools
// Measured 8/7/03 at 256 in 32bit debug build
CodeBuffer buffer("exception_blob", 600, 512);
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo. Should be exception_id

CodeBuffer buffer(name, 600, 512);
MacroAssembler* masm = new MacroAssembler(&buffer);

int framesize_in_words = 2; // FP + LR
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/cpu/ppc/runtime_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ void OptoRuntime::generate_exception_blob() {
// Allocate space for the code.
ResourceMark rm;
// Setup code generation tools.
CodeBuffer buffer("exception_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
CodeBuffer buffer(name, 2048, 1024);
InterpreterMacroAssembler* masm = new InterpreterMacroAssembler(&buffer);

address start = __ pc();
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3104,7 +3104,8 @@ void OptoRuntime::generate_uncommon_trap_blob() {
// Allocate space for the code.
ResourceMark rm;
// Setup code generation tools.
CodeBuffer buffer("uncommon_trap_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
CodeBuffer buffer(name, 2048, 1024);
InterpreterMacroAssembler* masm = new InterpreterMacroAssembler(&buffer);
address start = __ pc();

Expand Down
6 changes: 4 additions & 2 deletions src/hotspot/cpu/riscv/runtime_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ void OptoRuntime::generate_uncommon_trap_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer("uncommon_trap_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
CodeBuffer buffer(name, 2048, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);
assert_cond(masm != nullptr);

Expand Down Expand Up @@ -279,7 +280,8 @@ void OptoRuntime::generate_exception_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer("exception_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
CodeBuffer buffer(name, 2048, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);
assert_cond(masm != nullptr);

Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/cpu/s390/runtime_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ void OptoRuntime::generate_exception_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer("exception_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
CodeBuffer buffer(name, 2048, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);

Register handle_exception = Z_ARG5;
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/cpu/s390/sharedRuntime_s390.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2766,7 +2766,8 @@ void OptoRuntime::generate_uncommon_trap_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer("uncommon_trap_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
CodeBuffer buffer(name, 2048, 1024);
InterpreterMacroAssembler* masm = new InterpreterMacroAssembler(&buffer);

Register unroll_block_reg = Z_tmp_1;
Expand Down
6 changes: 4 additions & 2 deletions src/hotspot/cpu/x86/runtime_x86_32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ void OptoRuntime::generate_uncommon_trap_blob() {
// allocate space for the code
ResourceMark rm;
// setup code generation tools
CodeBuffer buffer("uncommon_trap_blob", 512, 512);
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
CodeBuffer buffer(name, 512, 512);
MacroAssembler* masm = new MacroAssembler(&buffer);

enum frame_layout {
Expand Down Expand Up @@ -255,7 +256,8 @@ void OptoRuntime::generate_exception_blob() {
// allocate space for the code
ResourceMark rm;
// setup code generation tools
CodeBuffer buffer("exception_blob", 512, 512);
const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
CodeBuffer buffer(name, 512, 512);
MacroAssembler* masm = new MacroAssembler(&buffer);

OopMapSet *oop_maps = new OopMapSet();
Expand Down
6 changes: 4 additions & 2 deletions src/hotspot/cpu/x86/runtime_x86_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ void OptoRuntime::generate_uncommon_trap_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer("uncommon_trap_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::uncommon_trap_id);
CodeBuffer buffer(name, 2048, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);

assert(SimpleRuntimeFrame::framesize % 4 == 0, "sp not 16-byte aligned");
Expand Down Expand Up @@ -264,7 +265,8 @@ void OptoRuntime::generate_exception_blob() {
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer("exception_blob", 2048, 1024);
const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
CodeBuffer buffer(name, 2048, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);


Expand Down