Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 0be27bf

Browse files
SendaoYanshipilev
authored andcommitted
8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code
Backport-of: d636e0d
1 parent 9fdcee9 commit 0be27bf

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, 2023, 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"
@@ -67,7 +68,7 @@
6768
// Max size with JVMTI
6869
int TemplateInterpreter::InterpreterCodeSize = 200 * 1024;
6970

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

7273
//-----------------------------------------------------------------------------
7374

@@ -2011,13 +2012,21 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
20112012
address& vep) {
20122013
assert(t->is_valid() && t->tos_in() == vtos, "illegal template");
20132014
Label L;
2014-
aep = __ pc(); __ push_ptr(); __ b(L);
2015-
fep = __ pc(); __ push_f(); __ b(L);
2016-
dep = __ pc(); __ push_d(); __ b(L);
2017-
lep = __ pc(); __ push_l(); __ b(L);
2018-
bep = cep = sep =
2019-
iep = __ pc(); __ push_i();
2020-
vep = __ pc();
2015+
aep = __ pc(); // atos entry point
2016+
__ push_ptr();
2017+
__ b(L);
2018+
fep = __ pc(); // ftos entry point
2019+
__ push_f();
2020+
__ b(L);
2021+
dep = __ pc(); // dtos entry point
2022+
__ push_d();
2023+
__ b(L);
2024+
lep = __ pc(); // ltos entry point
2025+
__ push_l();
2026+
__ b(L);
2027+
bep = cep = sep = iep = __ pc(); // [bcsi]tos entry point
2028+
__ push_i();
2029+
vep = __ pc(); // vtos entry point
20212030
__ bind(L);
20222031
generate_and_dispatch(t);
20232032
}

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 "compiler/compilerDefinitions.inline.hpp"
2930
#include "gc/shared/barrierSetAssembler.hpp"
3031
#include "gc/shared/collectedHeap.hpp"
@@ -49,7 +50,7 @@
4950
#include "runtime/synchronizer.hpp"
5051
#include "utilities/powerOfTwo.hpp"
5152

52-
#define __ _masm->
53+
#define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
5354

5455
// Address computation: local variables
5556

0 commit comments

Comments
 (0)