Skip to content

Commit d636e0d

Browse files
author
SendaoYan
committed
8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code
Reviewed-by: aph, jsjolen, jwaters
1 parent d3f3c6a commit d636e0d

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
address TemplateInterpreterGenerator::generate_slow_signature_handler() {
7374
address entry = __ pc();
@@ -1998,13 +1999,21 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
19981999
address& vep) {
19992000
assert(t->is_valid() && t->tos_in() == vtos, "illegal template");
20002001
Label L;
2001-
aep = __ pc(); __ push_ptr(); __ b(L);
2002-
fep = __ pc(); __ push_f(); __ b(L);
2003-
dep = __ pc(); __ push_d(); __ b(L);
2004-
lep = __ pc(); __ push_l(); __ b(L);
2005-
bep = cep = sep =
2006-
iep = __ pc(); __ push_i();
2007-
vep = __ pc();
2002+
aep = __ pc(); // atos entry point
2003+
__ push_ptr();
2004+
__ b(L);
2005+
fep = __ pc(); // ftos entry point
2006+
__ push_f();
2007+
__ b(L);
2008+
dep = __ pc(); // dtos entry point
2009+
__ push_d();
2010+
__ b(L);
2011+
lep = __ pc(); // ltos entry point
2012+
__ push_l();
2013+
__ b(L);
2014+
bep = cep = sep = iep = __ pc(); // [bcsi]tos entry point
2015+
__ push_i();
2016+
vep = __ pc(); // vtos entry point
20082017
__ bind(L);
20092018
generate_and_dispatch(t);
20102019
}

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)