Skip to content

Commit 94eaaa8

Browse files
SendaoYanTheRealMDoerr
authored andcommitted
8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code
Backport-of: 3fc07f2963d4caf7e18232933719d10ad6981047
1 parent b6685aa commit 94eaaa8

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -27,6 +27,7 @@
2727
#include "asm/macroAssembler.hpp"
2828
#include "classfile/javaClasses.inline.hpp"
2929
#include "classfile/vmClasses.hpp"
30+
#include "compiler/disassembler.hpp"
3031
#include "interpreter/interpreter.hpp"
3132
#include "interpreter/interpreterRuntime.hpp"
3233
#include "memory/allocation.inline.hpp"
@@ -36,7 +37,7 @@
3637
#include "runtime/frame.inline.hpp"
3738
#include "runtime/stubRoutines.hpp"
3839

39-
#define __ _masm->
40+
#define __ Disassembler::hook<MacroAssembler>(__FILE__, __LINE__, _masm)->
4041

4142
#ifdef PRODUCT
4243
#define BLOCK_COMMENT(str) /* nothing */

src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "precompiled.hpp"
2727
#include "asm/macroAssembler.inline.hpp"
2828
#include "classfile/javaClasses.hpp"
29+
#include "compiler/disassembler.hpp"
2930
#include "compiler/compiler_globals.hpp"
3031
#include "gc/shared/barrierSetAssembler.hpp"
3132
#include "interpreter/bytecodeHistogram.hpp"
@@ -66,7 +67,7 @@
6667
// Max size with JVMTI
6768
int TemplateInterpreter::InterpreterCodeSize = 200 * 1024;
6869

69-
#define __ _masm->
70+
#define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
7071

7172
//-----------------------------------------------------------------------------
7273

@@ -1919,13 +1920,21 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
19191920
address& vep) {
19201921
assert(t->is_valid() && t->tos_in() == vtos, "illegal template");
19211922
Label L;
1922-
aep = __ pc(); __ push_ptr(); __ b(L);
1923-
fep = __ pc(); __ push_f(); __ b(L);
1924-
dep = __ pc(); __ push_d(); __ b(L);
1925-
lep = __ pc(); __ push_l(); __ b(L);
1926-
bep = cep = sep =
1927-
iep = __ pc(); __ push_i();
1928-
vep = __ pc();
1923+
aep = __ pc(); // atos entry point
1924+
__ push_ptr();
1925+
__ b(L);
1926+
fep = __ pc(); // ftos entry point
1927+
__ push_f();
1928+
__ b(L);
1929+
dep = __ pc(); // dtos entry point
1930+
__ push_d();
1931+
__ b(L);
1932+
lep = __ pc(); // ltos entry point
1933+
__ push_l();
1934+
__ b(L);
1935+
bep = cep = sep = iep = __ pc(); // [bcsi]tos entry point
1936+
__ push_i();
1937+
vep = __ pc(); // vtos entry point
19291938
__ bind(L);
19301939
generate_and_dispatch(t);
19311940
}

src/hotspot/cpu/aarch64/templateTable_aarch64.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include "precompiled.hpp"
2727
#include "asm/macroAssembler.inline.hpp"
28+
#include "compiler/disassembler.hpp"
2829
#include "gc/shared/barrierSetAssembler.hpp"
2930
#include "gc/shared/collectedHeap.hpp"
3031
#include "gc/shared/tlab_globals.hpp"
@@ -45,7 +46,7 @@
4546
#include "runtime/synchronizer.hpp"
4647
#include "utilities/powerOfTwo.hpp"
4748

48-
#define __ _masm->
49+
#define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
4950

5051
// Address computation: local variables
5152

0 commit comments

Comments
 (0)