Skip to content

Commit 3fc07f2

Browse files
SendaoYanPaul Hohensee
authored andcommitted
8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code
Backport-of: 0be27bf0c5227582ce184dde6fc5530198a50bf6
1 parent 27d2abe commit 3fc07f2

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"
@@ -63,7 +64,7 @@
6364
// Max size with JVMTI
6465
int TemplateInterpreter::InterpreterCodeSize = 200 * 1024;
6566

66-
#define __ _masm->
67+
#define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
6768

6869
//-----------------------------------------------------------------------------
6970

@@ -1992,13 +1993,21 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
19921993
address& vep) {
19931994
assert(t->is_valid() && t->tos_in() == vtos, "illegal template");
19941995
Label L;
1995-
aep = __ pc(); __ push_ptr(); __ b(L);
1996-
fep = __ pc(); __ push_f(); __ b(L);
1997-
dep = __ pc(); __ push_d(); __ b(L);
1998-
lep = __ pc(); __ push_l(); __ b(L);
1999-
bep = cep = sep =
2000-
iep = __ pc(); __ push_i();
2001-
vep = __ pc();
1996+
aep = __ pc(); // atos entry point
1997+
__ push_ptr();
1998+
__ b(L);
1999+
fep = __ pc(); // ftos entry point
2000+
__ push_f();
2001+
__ b(L);
2002+
dep = __ pc(); // dtos entry point
2003+
__ push_d();
2004+
__ b(L);
2005+
lep = __ pc(); // ltos entry point
2006+
__ push_l();
2007+
__ b(L);
2008+
bep = cep = sep = iep = __ pc(); // [bcsi]tos entry point
2009+
__ push_i();
2010+
vep = __ pc(); // vtos entry point
20022011
__ bind(L);
20032012
generate_and_dispatch(t);
20042013
}

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"
@@ -46,7 +47,7 @@
4647
#include "runtime/synchronizer.hpp"
4748
#include "utilities/powerOfTwo.hpp"
4849

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

5152
// Address computation: local variables
5253

0 commit comments

Comments
 (0)