8250042: Clean up methodOop and method_oop names from the code

Reviewed-by: dholmes, sspitsyn, cjplummer, chagedorn
This commit is contained in:
Coleen Phillimore 2020-07-28 07:33:51 -04:00
parent 0ebcf5c59d
commit 42ac8e1856
26 changed files with 137 additions and 137 deletions

View file

@ -3702,7 +3702,7 @@ frame %{
// These three registers define part of the calling convention // These three registers define part of the calling convention
// between compiled code and the interpreter. // between compiled code and the interpreter.
// Inline Cache Register or methodOop for I2C. // Inline Cache Register or Method for I2C.
inline_cache_reg(R12); inline_cache_reg(R12);
// Method Oop Register when calling interpreter. // Method Oop Register when calling interpreter.
@ -15570,13 +15570,13 @@ instruct CallLeafNoFPDirect(method meth)
// Also known as an 'interprocedural jump'. // Also known as an 'interprocedural jump'.
// Target of jump will eventually return to caller. // Target of jump will eventually return to caller.
// TailJump below removes the return address. // TailJump below removes the return address.
instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_oop) instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_ptr)
%{ %{
match(TailCall jump_target method_oop); match(TailCall jump_target method_ptr);
ins_cost(CALL_COST); ins_cost(CALL_COST);
format %{ "br $jump_target\t# $method_oop holds method oop" %} format %{ "br $jump_target\t# $method_ptr holds method" %}
ins_encode(aarch64_enc_tail_call(jump_target)); ins_encode(aarch64_enc_tail_call(jump_target));

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved. * Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -50,7 +50,7 @@
// [padding ] // [padding ]
// [methodData ] = mdp() mdx_offset // [methodData ] = mdp() mdx_offset
// [methodOop ] = method() method_offset // [Method ] = method() method_offset
// [last esp ] = last_sp() last_sp_offset // [last esp ] = last_sp() last_sp_offset
// [old stack pointer ] (sender_sp) sender_sp_offset // [old stack pointer ] (sender_sp) sender_sp_offset

View file

@ -3286,7 +3286,7 @@ void TemplateTable::invokevirtual_helper(Register index,
const Register method = index; // method must be rmethod const Register method = index; // method must be rmethod
assert(method == rmethod, assert(method == rmethod,
"methodOop must be rmethod for interpreter calling convention"); "Method must be rmethod for interpreter calling convention");
// do the call - the index is actually the method to call // do the call - the index is actually the method to call
// that is, f2 is a vtable index if !is_vfinal, else f2 is a Method* // that is, f2 is a vtable index if !is_vfinal, else f2 is a Method*
@ -3309,7 +3309,7 @@ void TemplateTable::invokevirtual_helper(Register index,
// profile this call // profile this call
__ profile_virtual_call(r0, rlocals, r3); __ profile_virtual_call(r0, rlocals, r3);
// get target methodOop & entry point // get target Method & entry point
__ lookup_virtual_method(r0, index, method); __ lookup_virtual_method(r0, index, method);
__ profile_arguments_type(r3, method, r4, true); __ profile_arguments_type(r3, method, r4, true);
// FIXME -- this looks completely redundant. is it? // FIXME -- this looks completely redundant. is it?
@ -3444,7 +3444,7 @@ void TemplateTable::invokeinterface(int byte_no) {
rmethod, r13, rmethod, r13,
no_such_interface); no_such_interface);
// rmethod,: methodOop to call // rmethod,: Method to call
// r2: receiver // r2: receiver
// Check for abstract method error // Check for abstract method error
// Note: This should be done more efficiently via a throw_abstract_method_error // Note: This should be done more efficiently via a throw_abstract_method_error
@ -3456,7 +3456,7 @@ void TemplateTable::invokeinterface(int byte_no) {
// do the call // do the call
// r2: receiver // r2: receiver
// rmethod,: methodOop // rmethod,: Method
__ jump_from_interpreted(rmethod, r3); __ jump_from_interpreted(rmethod, r3);
__ should_not_reach_here(); __ should_not_reach_here();

View file

@ -8869,12 +8869,12 @@ instruct CallLeafNoFPDirect(method meth) %{
// Also known as an 'interprocedural jump'. // Also known as an 'interprocedural jump'.
// Target of jump will eventually return to caller. // Target of jump will eventually return to caller.
// TailJump below removes the return address. // TailJump below removes the return address.
instruct TailCalljmpInd(IPRegP jump_target, inline_cache_regP method_oop) %{ instruct TailCalljmpInd(IPRegP jump_target, inline_cache_regP method_ptr) %{
match(TailCall jump_target method_oop ); match(TailCall jump_target method_ptr);
ins_cost(CALL_COST); ins_cost(CALL_COST);
format %{ "MOV Rexception_pc, LR\n\t" format %{ "MOV Rexception_pc, LR\n\t"
"jump $jump_target \t! $method_oop holds method oop" %} "jump $jump_target \t! $method_ptr holds method" %}
ins_encode %{ ins_encode %{
__ mov(Rexception_pc, LR); // this is used only to call __ mov(Rexception_pc, LR); // this is used only to call
// StubRoutines::forward_exception_entry() // StubRoutines::forward_exception_entry()

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,7 +42,7 @@ public:
// Similar to InterpreterMacroAssembler::jump_from_interpreted. // Similar to InterpreterMacroAssembler::jump_from_interpreted.
// Takes care of special dispatch from single stepping too. // Takes care of special dispatch from single stepping too.
// Rmethod should contain target methodOop. // Rmethod should contain target Method.
static void jump_from_method_handle(MacroAssembler* _masm, bool for_compiler_entry); static void jump_from_method_handle(MacroAssembler* _masm, bool for_compiler_entry);
static void jump_to_lambda_form(MacroAssembler* _masm, static void jump_to_lambda_form(MacroAssembler* _masm,

View file

@ -3940,7 +3940,7 @@ encode %{
int entry_offset = in_bytes(Klass::vtable_start_offset()) + _vtable_index * vtableEntry::size_in_bytes(); int entry_offset = in_bytes(Klass::vtable_start_offset()) + _vtable_index * vtableEntry::size_in_bytes();
int v_off = entry_offset + vtableEntry::method_offset_in_bytes(); int v_off = entry_offset + vtableEntry::method_offset_in_bytes();
__ li(R19_method, v_off); __ li(R19_method, v_off);
__ ldx(R19_method/*method oop*/, R19_method/*method offset*/, R11_scratch1/*class*/); __ ldx(R19_method/*method*/, R19_method/*method offset*/, R11_scratch1/*class*/);
// NOTE: for vtable dispatches, the vtable entry will never be // NOTE: for vtable dispatches, the vtable entry will never be
// null. However it may very well end up in handle_wrong_method // null. However it may very well end up in handle_wrong_method
// if the method is abstract for the particular class. // if the method is abstract for the particular class.
@ -15124,11 +15124,11 @@ instruct CallLeafNoFPDirect_Ex(method meth) %{
// Also known as an 'interprocedural jump'. // Also known as an 'interprocedural jump'.
// Target of jump will eventually return to caller. // Target of jump will eventually return to caller.
// TailJump below removes the return address. // TailJump below removes the return address.
instruct TailCalljmpInd(iRegPdstNoScratch jump_target, inline_cache_regP method_oop) %{ instruct TailCalljmpInd(iRegPdstNoScratch jump_target, inline_cache_regP method_ptr) %{
match(TailCall jump_target method_oop); match(TailCall jump_target method_ptr);
ins_cost(CALL_COST); ins_cost(CALL_COST);
format %{ "MTCTR $jump_target \t// $method_oop holds method oop\n\t" format %{ "MTCTR $jump_target \t// $method_ptr holds method\n\t"
"BCTR \t// tail call" %} "BCTR \t// tail call" %}
size(8); size(8);
ins_encode %{ ins_encode %{

View file

@ -9830,11 +9830,11 @@ instruct CallLeafNoFPDirect(method meth) %{
// Also known as an 'interprocedural jump'. // Also known as an 'interprocedural jump'.
// Target of jump will eventually return to caller. // Target of jump will eventually return to caller.
// TailJump below removes the return address. // TailJump below removes the return address.
instruct TailCalljmpInd(iRegP jump_target, inline_cache_regP method_oop) %{ instruct TailCalljmpInd(iRegP jump_target, inline_cache_regP method_ptr) %{
match(TailCall jump_target method_oop); match(TailCall jump_target method_ptr);
ins_cost(CALL_COST); ins_cost(CALL_COST);
size(2); size(2);
format %{ "Jmp $jump_target\t # $method_oop holds method oop" %} format %{ "Jmp $jump_target\t # $method_ptr holds method" %}
ins_encode %{ __ z_br($jump_target$$Register); %} ins_encode %{ __ z_br($jump_target$$Register); %}
ins_pipe(pipe_class_dummy); ins_pipe(pipe_class_dummy);
%} %}

View file

@ -2625,10 +2625,10 @@ void SharedRuntime::gen_i2c_adapter(MacroAssembler *masm,
} }
// Jump to the compiled code just as if compiled code was doing it. // Jump to the compiled code just as if compiled code was doing it.
// load target address from method oop: // load target address from method:
__ z_lg(Z_R1_scratch, Address(Z_method, Method::from_compiled_offset())); __ z_lg(Z_R1_scratch, Address(Z_method, Method::from_compiled_offset()));
// Store method oop into thread->callee_target. // Store method into thread->callee_target.
// 6243940: We might end up in handle_wrong_method if // 6243940: We might end up in handle_wrong_method if
// the callee is deoptimized as we race thru here. If that // the callee is deoptimized as we race thru here. If that
// happens we don't want to take a safepoint because the // happens we don't want to take a safepoint because the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved. * Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
@ -117,14 +117,14 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) {
// Set method (in case of interpreted method), and destination address. // Set method (in case of interpreted method), and destination address.
// Duplicate safety code from enc_class Java_Dynamic_Call_dynTOC. // Duplicate safety code from enc_class Java_Dynamic_Call_dynTOC.
if (Displacement::is_validDisp(v_off)) { if (Displacement::is_validDisp(v_off)) {
__ z_lg(Z_method/*method oop*/, v_off, rcvr_klass/*class oop*/); __ z_lg(Z_method/*method*/, v_off, rcvr_klass/*class*/);
// Account for the load_const in the else path. // Account for the load_const in the else path.
slop_delta = __ load_const_size(); slop_delta = __ load_const_size();
} else { } else {
// Worse case, offset does not fit in displacement field. // Worse case, offset does not fit in displacement field.
// worst case actual size // worst case actual size
slop_delta = __ load_const_size() - __ load_const_optimized_rtn_len(Z_method, v_off, true); slop_delta = __ load_const_size() - __ load_const_optimized_rtn_len(Z_method, v_off, true);
__ z_lg(Z_method/*method oop*/, 0, Z_method/*method offset*/, rcvr_klass/*class oop*/); __ z_lg(Z_method/*method*/, 0, Z_method/*method offset*/, rcvr_klass/*class*/);
} }
slop_bytes += slop_delta; slop_bytes += slop_delta;

View file

@ -953,7 +953,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
assert(InterpreterRuntime::SignatureHandlerGenerator::temp() == NOT_LP64(t) LP64_ONLY(rscratch1), assert(InterpreterRuntime::SignatureHandlerGenerator::temp() == NOT_LP64(t) LP64_ONLY(rscratch1),
"adjust this code"); "adjust this code");
// The generated handlers do not touch RBX (the method oop). // The generated handlers do not touch RBX (the method).
// However, large signatures cannot be cached and are generated // However, large signatures cannot be cached and are generated
// each time here. The slow-path generator can do a GC on return, // each time here. The slow-path generator can do a GC on return,
// so we must reload it after the call. // so we must reload it after the call.

View file

@ -1934,9 +1934,9 @@ encode %{
// // int imo_reg = Matcher::interpreter_method_oop_reg(); // // int imo_reg = Matcher::interpreter_method_oop_reg();
// // int imo_encode = Matcher::_regEncode[imo_reg]; // // int imo_encode = Matcher::_regEncode[imo_reg];
// //
// // // Interpreter expects method_oop in EBX, currently a callee-saved register, // // // Interpreter expects method_ptr in EBX, currently a callee-saved register,
// // // so we load it immediately before the call // // // so we load it immediately before the call
// // emit_opcode(cbuf, 0x8B); // MOV imo_reg,ic_reg # method_oop // // emit_opcode(cbuf, 0x8B); // MOV imo_reg,ic_reg # method_ptr
// // emit_rm(cbuf, 0x03, imo_encode, ic_encode ); // R/M byte // // emit_rm(cbuf, 0x03, imo_encode, ic_encode ); // R/M byte
// //
// // xor rbp,ebp // // xor rbp,ebp
@ -13317,10 +13317,10 @@ instruct Ret() %{
// Also known as an 'interprocedural jump'. // Also known as an 'interprocedural jump'.
// Target of jump will eventually return to caller. // Target of jump will eventually return to caller.
// TailJump below removes the return address. // TailJump below removes the return address.
instruct TailCalljmpInd(eRegP_no_EBP jump_target, eBXRegP method_oop) %{ instruct TailCalljmpInd(eRegP_no_EBP jump_target, eBXRegP method_ptr) %{
match(TailCall jump_target method_oop ); match(TailCall jump_target method_ptr);
ins_cost(300); ins_cost(300);
format %{ "JMP $jump_target \t# EBX holds method oop" %} format %{ "JMP $jump_target \t# EBX holds method" %}
opcode(0xFF, 0x4); /* Opcode FF /4 */ opcode(0xFF, 0x4); /* Opcode FF /4 */
ins_encode( OpcP, RegOpc(jump_target) ); ins_encode( OpcP, RegOpc(jump_target) );
ins_pipe( pipe_jmp ); ins_pipe( pipe_jmp );

View file

@ -12587,12 +12587,12 @@ instruct Ret()
// Also known as an 'interprocedural jump'. // Also known as an 'interprocedural jump'.
// Target of jump will eventually return to caller. // Target of jump will eventually return to caller.
// TailJump below removes the return address. // TailJump below removes the return address.
instruct TailCalljmpInd(no_rbp_RegP jump_target, rbx_RegP method_oop) instruct TailCalljmpInd(no_rbp_RegP jump_target, rbx_RegP method_ptr)
%{ %{
match(TailCall jump_target method_oop); match(TailCall jump_target method_ptr);
ins_cost(300); ins_cost(300);
format %{ "jmp $jump_target\t# rbx holds method oop" %} format %{ "jmp $jump_target\t# rbx holds method" %}
opcode(0xFF, 0x4); /* Opcode FF /4 */ opcode(0xFF, 0x4); /* Opcode FF /4 */
ins_encode(REX_reg(jump_target), OpcP, reg_opc(jump_target)); ins_encode(REX_reg(jump_target), OpcP, reg_opc(jump_target));
ins_pipe(pipe_jmp); ins_pipe(pipe_jmp);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1150,7 +1150,7 @@ void ADLParser::inline_cache_parse(FrameForm *frame, bool native) {
//------------------------------interpreter_method_oop_parse------------------ //------------------------------interpreter_method_oop_parse------------------
void ADLParser::interpreter_method_oop_parse(FrameForm *frame, bool native) { void ADLParser::interpreter_method_oop_parse(FrameForm *frame, bool native) {
frame->_interpreter_method_oop_reg = parse_one_arg("method oop reg entry"); frame->_interpreter_method_oop_reg = parse_one_arg("method reg entry");
} }
//------------------------------cisc_spilling_operand_parse--------------------- //------------------------------cisc_spilling_operand_parse---------------------

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -383,7 +383,7 @@ class PatchingStub: public CodeStub {
Label _patch_site_continuation; Label _patch_site_continuation;
Register _obj; Register _obj;
CodeEmitInfo* _info; CodeEmitInfo* _info;
int _index; // index of the patchable oop or Klass* in nmethod oop or metadata table if needed int _index; // index of the patchable oop or Klass* in nmethod or metadata table if needed
static int _patch_info_offset; static int _patch_info_offset;
void align_patch_site(MacroAssembler* masm); void align_patch_site(MacroAssembler* masm);

View file

@ -429,7 +429,7 @@ JRT_END
// counter_overflow() is called from within C1-compiled methods. The enclosing method is the method // counter_overflow() is called from within C1-compiled methods. The enclosing method is the method
// associated with the top activation record. The inlinee (that is possibly included in the enclosing // associated with the top activation record. The inlinee (that is possibly included in the enclosing
// method) method oop is passed as an argument. In order to do that it is embedded in the code as // method) method is passed as an argument. In order to do that it is embedded in the code as
// a constant. // a constant.
static nmethod* counter_overflow_helper(JavaThread* THREAD, int branch_bci, Method* m) { static nmethod* counter_overflow_helper(JavaThread* THREAD, int branch_bci, Method* m) {
nmethod* osr_nm = NULL; nmethod* osr_nm = NULL;

View file

@ -627,7 +627,7 @@ class CompileReplay : public StackObj {
// method to be rewritten (number of arguments at a call for // method to be rewritten (number of arguments at a call for
// instance) // instance)
method->method_holder()->link_class(CHECK); method->method_holder()->link_class(CHECK);
// methodOopDesc::build_interpreter_method_data(method, CHECK); // Method::build_interpreter_method_data(method, CHECK);
{ {
// Grab a lock here to prevent multiple // Grab a lock here to prevent multiple
// MethodData*s from being created. // MethodData*s from being created.

View file

@ -2330,7 +2330,7 @@ void GenerateOopMap::rewrite_refval_conflict(int from, int to) {
bool startOver; bool startOver;
do { do {
// Make sure that the BytecodeStream is constructed in the loop, since // Make sure that the BytecodeStream is constructed in the loop, since
// during rewriting a new method oop is going to be used, and the next time // during rewriting a new method is going to be used, and the next time
// around we want to use that. // around we want to use that.
BytecodeStream bcs(_method); BytecodeStream bcs(_method);
startOver = false; startOver = false;
@ -2467,7 +2467,7 @@ void GenerateOopMap::expand_current_instr(int bci, int ilen, int newIlen, u_char
return; return;
} }
// Relocator returns a new method oop. // Relocator returns a new method.
_did_relocation = true; _did_relocation = true;
_method = m; _method = m;
} }

View file

@ -350,7 +350,7 @@ void Method::metaspace_pointers_do(MetaspaceClosure* it) {
it->push_method_entry(&this_ptr, (intptr_t*)&_from_interpreted_entry); it->push_method_entry(&this_ptr, (intptr_t*)&_from_interpreted_entry);
} }
// Attempt to return method oop to original state. Clear any pointers // Attempt to return method to original state. Clear any pointers
// (to objects outside the shared spaces). We won't be able to predict // (to objects outside the shared spaces). We won't be able to predict
// where they should point in a new JVM. Further initialize some // where they should point in a new JVM. Further initialize some
// entries now in order allow them to be write protected later. // entries now in order allow them to be write protected later.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -1955,7 +1955,7 @@ bool Matcher::clone_base_plus_offset_address(AddPNode* m, Matcher::MStack& mstac
} }
// A method-klass-holder may be passed in the inline_cache_reg // A method-klass-holder may be passed in the inline_cache_reg
// and then expanded into the inline_cache_reg and a method_oop register // and then expanded into the inline_cache_reg and a method_ptr register
// defined in ad_<arch>.cpp // defined in ad_<arch>.cpp
//------------------------------find_shared------------------------------------ //------------------------------find_shared------------------------------------

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -408,7 +408,7 @@ public:
static int number_of_saved_registers(); static int number_of_saved_registers();
// The Method-klass-holder may be passed in the inline_cache_reg // The Method-klass-holder may be passed in the inline_cache_reg
// and then expanded into the inline_cache_reg and a method_oop register // and then expanded into the inline_cache_reg and a method_ptr register
static OptoReg::Name interpreter_method_oop_reg(); static OptoReg::Name interpreter_method_oop_reg();
static int interpreter_method_oop_reg_encode(); static int interpreter_method_oop_reg_encode();

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -887,10 +887,10 @@ static jvmtiError JNICALL
<xsl:template match="jmethodID" mode="dochecks"> <xsl:template match="jmethodID" mode="dochecks">
<xsl:param name="name"/> <xsl:param name="name"/>
<xsl:text> Method* method_oop = Method::checked_resolve_jmethod_id(</xsl:text> <xsl:text> Method* checked_method = Method::checked_resolve_jmethod_id(</xsl:text>
<xsl:value-of select="$name"/> <xsl:value-of select="$name"/>
<xsl:text>);&#xA;</xsl:text> <xsl:text>);&#xA;</xsl:text>
<xsl:text> if (method_oop == NULL) {&#xA;</xsl:text> <xsl:text> if (checked_method == NULL) {&#xA;</xsl:text>
<xsl:apply-templates select=".." mode="traceError"> <xsl:apply-templates select=".." mode="traceError">
<xsl:with-param name="err">JVMTI_ERROR_INVALID_METHODID</xsl:with-param> <xsl:with-param name="err">JVMTI_ERROR_INVALID_METHODID</xsl:with-param>
<xsl:with-param name="comment"></xsl:with-param> <xsl:with-param name="comment"></xsl:with-param>
@ -899,7 +899,7 @@ static jvmtiError JNICALL
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
<xsl:text> }&#xA;</xsl:text> <xsl:text> }&#xA;</xsl:text>
<xsl:if test="count(@native)=1 and contains(@native,'error')"> <xsl:if test="count(@native)=1 and contains(@native,'error')">
<xsl:text> if (method_oop->is_native()) {&#xA;</xsl:text> <xsl:text> if (checked_method->is_native()) {&#xA;</xsl:text>
<xsl:text> return JVMTI_ERROR_NATIVE_METHOD;&#xA;</xsl:text> <xsl:text> return JVMTI_ERROR_NATIVE_METHOD;&#xA;</xsl:text>
<xsl:text> }&#xA;</xsl:text> <xsl:text> }&#xA;</xsl:text>
</xsl:if> </xsl:if>
@ -1152,8 +1152,8 @@ static jvmtiError JNICALL
<xsl:template match="jmethodID" mode="traceInValue"> <xsl:template match="jmethodID" mode="traceInValue">
<xsl:param name="name"/> <xsl:param name="name"/>
<xsl:text>, <xsl:text>,
method_oop == NULL? "NULL" : method_oop->klass_name()->as_C_string(), checked_method == NULL? "NULL" : checked_method->klass_name()->as_C_string(),
method_oop == NULL? "NULL" : method_oop->name()->as_C_string() checked_method == NULL? "NULL" : checked_method->name()->as_C_string()
</xsl:text> </xsl:text>
</xsl:template> </xsl:template>

View file

@ -2250,20 +2250,20 @@ JvmtiEnv::SetLocalDouble(JavaThread* java_thread, jint depth, jint slot, jdouble
// Breakpoint functions // Breakpoint functions
// //
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
jvmtiError jvmtiError
JvmtiEnv::SetBreakpoint(Method* method_oop, jlocation location) { JvmtiEnv::SetBreakpoint(Method* method, jlocation location) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
if (location < 0) { // simple invalid location check first if (location < 0) { // simple invalid location check first
return JVMTI_ERROR_INVALID_LOCATION; return JVMTI_ERROR_INVALID_LOCATION;
} }
// verify that the breakpoint is not past the end of the method // verify that the breakpoint is not past the end of the method
if (location >= (jlocation) method_oop->code_size()) { if (location >= (jlocation) method->code_size()) {
return JVMTI_ERROR_INVALID_LOCATION; return JVMTI_ERROR_INVALID_LOCATION;
} }
ResourceMark rm; ResourceMark rm;
JvmtiBreakpoint bp(method_oop, location); JvmtiBreakpoint bp(method, location);
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints(); JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
if (jvmti_breakpoints.set(bp) == JVMTI_ERROR_DUPLICATE) if (jvmti_breakpoints.set(bp) == JVMTI_ERROR_DUPLICATE)
return JVMTI_ERROR_DUPLICATE; return JVMTI_ERROR_DUPLICATE;
@ -2276,21 +2276,21 @@ JvmtiEnv::SetBreakpoint(Method* method_oop, jlocation location) {
} /* end SetBreakpoint */ } /* end SetBreakpoint */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
jvmtiError jvmtiError
JvmtiEnv::ClearBreakpoint(Method* method_oop, jlocation location) { JvmtiEnv::ClearBreakpoint(Method* method, jlocation location) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
if (location < 0) { // simple invalid location check first if (location < 0) { // simple invalid location check first
return JVMTI_ERROR_INVALID_LOCATION; return JVMTI_ERROR_INVALID_LOCATION;
} }
// verify that the breakpoint is not past the end of the method // verify that the breakpoint is not past the end of the method
if (location >= (jlocation) method_oop->code_size()) { if (location >= (jlocation) method->code_size()) {
return JVMTI_ERROR_INVALID_LOCATION; return JVMTI_ERROR_INVALID_LOCATION;
} }
JvmtiBreakpoint bp(method_oop, location); JvmtiBreakpoint bp(method, location);
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints(); JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
if (jvmti_breakpoints.clear(bp) == JVMTI_ERROR_NOT_FOUND) if (jvmti_breakpoints.clear(bp) == JVMTI_ERROR_NOT_FOUND)
@ -2945,34 +2945,34 @@ JvmtiEnv::IsFieldSynthetic(fieldDescriptor* fdesc_ptr, jboolean* is_synthetic_pt
// Method functions // Method functions
// //
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// name_ptr - NULL is a valid value, must be checked // name_ptr - NULL is a valid value, must be checked
// signature_ptr - NULL is a valid value, must be checked // signature_ptr - NULL is a valid value, must be checked
// generic_ptr - NULL is a valid value, must be checked // generic_ptr - NULL is a valid value, must be checked
jvmtiError jvmtiError
JvmtiEnv::GetMethodName(Method* method_oop, char** name_ptr, char** signature_ptr, char** generic_ptr) { JvmtiEnv::GetMethodName(Method* method, char** name_ptr, char** signature_ptr, char** generic_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
JavaThread* current_thread = JavaThread::current(); JavaThread* current_thread = JavaThread::current();
ResourceMark rm(current_thread); // get the utf8 name and signature ResourceMark rm(current_thread); // get the utf8 name and signature
if (name_ptr == NULL) { if (name_ptr == NULL) {
// just don't return the name // just don't return the name
} else { } else {
const char* utf8_name = (const char *) method_oop->name()->as_utf8(); const char* utf8_name = (const char *) method->name()->as_utf8();
*name_ptr = (char *) jvmtiMalloc(strlen(utf8_name)+1); *name_ptr = (char *) jvmtiMalloc(strlen(utf8_name)+1);
strcpy(*name_ptr, utf8_name); strcpy(*name_ptr, utf8_name);
} }
if (signature_ptr == NULL) { if (signature_ptr == NULL) {
// just don't return the signature // just don't return the signature
} else { } else {
const char* utf8_signature = (const char *) method_oop->signature()->as_utf8(); const char* utf8_signature = (const char *) method->signature()->as_utf8();
*signature_ptr = (char *) jvmtiMalloc(strlen(utf8_signature) + 1); *signature_ptr = (char *) jvmtiMalloc(strlen(utf8_signature) + 1);
strcpy(*signature_ptr, utf8_signature); strcpy(*signature_ptr, utf8_signature);
} }
if (generic_ptr != NULL) { if (generic_ptr != NULL) {
*generic_ptr = NULL; *generic_ptr = NULL;
Symbol* soop = method_oop->generic_signature(); Symbol* soop = method->generic_signature();
if (soop != NULL) { if (soop != NULL) {
const char* gen_sig = soop->as_C_string(); const char* gen_sig = soop->as_C_string();
if (gen_sig != NULL) { if (gen_sig != NULL) {
@ -2988,56 +2988,56 @@ JvmtiEnv::GetMethodName(Method* method_oop, char** name_ptr, char** signature_pt
} /* end GetMethodName */ } /* end GetMethodName */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// declaring_class_ptr - pre-checked for NULL // declaring_class_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::GetMethodDeclaringClass(Method* method_oop, jclass* declaring_class_ptr) { JvmtiEnv::GetMethodDeclaringClass(Method* method, jclass* declaring_class_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
(*declaring_class_ptr) = get_jni_class_non_null(method_oop->method_holder()); (*declaring_class_ptr) = get_jni_class_non_null(method->method_holder());
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} /* end GetMethodDeclaringClass */ } /* end GetMethodDeclaringClass */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// modifiers_ptr - pre-checked for NULL // modifiers_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::GetMethodModifiers(Method* method_oop, jint* modifiers_ptr) { JvmtiEnv::GetMethodModifiers(Method* method, jint* modifiers_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
(*modifiers_ptr) = method_oop->access_flags().as_int() & JVM_RECOGNIZED_METHOD_MODIFIERS; (*modifiers_ptr) = method->access_flags().as_int() & JVM_RECOGNIZED_METHOD_MODIFIERS;
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} /* end GetMethodModifiers */ } /* end GetMethodModifiers */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// max_ptr - pre-checked for NULL // max_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::GetMaxLocals(Method* method_oop, jint* max_ptr) { JvmtiEnv::GetMaxLocals(Method* method, jint* max_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
// get max stack // get max stack
(*max_ptr) = method_oop->max_locals(); (*max_ptr) = method->max_locals();
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} /* end GetMaxLocals */ } /* end GetMaxLocals */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// size_ptr - pre-checked for NULL // size_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::GetArgumentsSize(Method* method_oop, jint* size_ptr) { JvmtiEnv::GetArgumentsSize(Method* method, jint* size_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
// get size of arguments // get size of arguments
(*size_ptr) = method_oop->size_of_parameters(); (*size_ptr) = method->size_of_parameters();
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} /* end GetArgumentsSize */ } /* end GetArgumentsSize */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// entry_count_ptr - pre-checked for NULL // entry_count_ptr - pre-checked for NULL
// table_ptr - pre-checked for NULL // table_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::GetLineNumberTable(Method* method_oop, jint* entry_count_ptr, jvmtiLineNumberEntry** table_ptr) { JvmtiEnv::GetLineNumberTable(Method* method, jint* entry_count_ptr, jvmtiLineNumberEntry** table_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
if (!method_oop->has_linenumber_table()) { if (!method->has_linenumber_table()) {
return (JVMTI_ERROR_ABSENT_INFORMATION); return (JVMTI_ERROR_ABSENT_INFORMATION);
} }
@ -3046,7 +3046,7 @@ JvmtiEnv::GetLineNumberTable(Method* method_oop, jint* entry_count_ptr, jvmtiLin
// Compute size of table // Compute size of table
jint num_entries = 0; jint num_entries = 0;
CompressedLineNumberReadStream stream(method_oop->compressed_linenumber_table()); CompressedLineNumberReadStream stream(method->compressed_linenumber_table());
while (stream.read_pair()) { while (stream.read_pair()) {
num_entries++; num_entries++;
} }
@ -3056,7 +3056,7 @@ JvmtiEnv::GetLineNumberTable(Method* method_oop, jint* entry_count_ptr, jvmtiLin
// Fill jvmti table // Fill jvmti table
if (num_entries > 0) { if (num_entries > 0) {
int index = 0; int index = 0;
CompressedLineNumberReadStream stream(method_oop->compressed_linenumber_table()); CompressedLineNumberReadStream stream(method->compressed_linenumber_table());
while (stream.read_pair()) { while (stream.read_pair()) {
jvmti_table[index].start_location = (jlocation) stream.bci(); jvmti_table[index].start_location = (jlocation) stream.bci();
jvmti_table[index].line_number = (jint) stream.line(); jvmti_table[index].line_number = (jint) stream.line();
@ -3073,16 +3073,16 @@ JvmtiEnv::GetLineNumberTable(Method* method_oop, jint* entry_count_ptr, jvmtiLin
} /* end GetLineNumberTable */ } /* end GetLineNumberTable */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// start_location_ptr - pre-checked for NULL // start_location_ptr - pre-checked for NULL
// end_location_ptr - pre-checked for NULL // end_location_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::GetMethodLocation(Method* method_oop, jlocation* start_location_ptr, jlocation* end_location_ptr) { JvmtiEnv::GetMethodLocation(Method* method, jlocation* start_location_ptr, jlocation* end_location_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
// get start and end location // get start and end location
(*end_location_ptr) = (jlocation) (method_oop->code_size() - 1); (*end_location_ptr) = (jlocation) (method->code_size() - 1);
if (method_oop->code_size() == 0) { if (method->code_size() == 0) {
// there is no code so there is no start location // there is no code so there is no start location
(*start_location_ptr) = (jlocation)(-1); (*start_location_ptr) = (jlocation)(-1);
} else { } else {
@ -3093,33 +3093,33 @@ JvmtiEnv::GetMethodLocation(Method* method_oop, jlocation* start_location_ptr, j
} /* end GetMethodLocation */ } /* end GetMethodLocation */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// entry_count_ptr - pre-checked for NULL // entry_count_ptr - pre-checked for NULL
// table_ptr - pre-checked for NULL // table_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::GetLocalVariableTable(Method* method_oop, jint* entry_count_ptr, jvmtiLocalVariableEntry** table_ptr) { JvmtiEnv::GetLocalVariableTable(Method* method, jint* entry_count_ptr, jvmtiLocalVariableEntry** table_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
JavaThread* current_thread = JavaThread::current(); JavaThread* current_thread = JavaThread::current();
// does the klass have any local variable information? // does the klass have any local variable information?
InstanceKlass* ik = method_oop->method_holder(); InstanceKlass* ik = method->method_holder();
if (!ik->access_flags().has_localvariable_table()) { if (!ik->access_flags().has_localvariable_table()) {
return (JVMTI_ERROR_ABSENT_INFORMATION); return (JVMTI_ERROR_ABSENT_INFORMATION);
} }
ConstantPool* constants = method_oop->constants(); ConstantPool* constants = method->constants();
NULL_CHECK(constants, JVMTI_ERROR_ABSENT_INFORMATION); NULL_CHECK(constants, JVMTI_ERROR_ABSENT_INFORMATION);
// in the vm localvariable table representation, 6 consecutive elements in the table // in the vm localvariable table representation, 6 consecutive elements in the table
// represent a 6-tuple of shorts // represent a 6-tuple of shorts
// [start_pc, length, name_index, descriptor_index, signature_index, index] // [start_pc, length, name_index, descriptor_index, signature_index, index]
jint num_entries = method_oop->localvariable_table_length(); jint num_entries = method->localvariable_table_length();
jvmtiLocalVariableEntry *jvmti_table = (jvmtiLocalVariableEntry *) jvmtiLocalVariableEntry *jvmti_table = (jvmtiLocalVariableEntry *)
jvmtiMalloc(num_entries * (sizeof(jvmtiLocalVariableEntry))); jvmtiMalloc(num_entries * (sizeof(jvmtiLocalVariableEntry)));
if (num_entries > 0) { if (num_entries > 0) {
LocalVariableTableElement* table = method_oop->localvariable_table_start(); LocalVariableTableElement* table = method->localvariable_table_start();
for (int i = 0; i < num_entries; i++) { for (int i = 0; i < num_entries; i++) {
// get the 5 tuple information from the vm table // get the 5 tuple information from the vm table
jlocation start_location = (jlocation) table[i].start_bci; jlocation start_location = (jlocation) table[i].start_bci;
@ -3170,16 +3170,16 @@ JvmtiEnv::GetLocalVariableTable(Method* method_oop, jint* entry_count_ptr, jvmti
} /* end GetLocalVariableTable */ } /* end GetLocalVariableTable */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// bytecode_count_ptr - pre-checked for NULL // bytecode_count_ptr - pre-checked for NULL
// bytecodes_ptr - pre-checked for NULL // bytecodes_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::GetBytecodes(Method* method_oop, jint* bytecode_count_ptr, unsigned char** bytecodes_ptr) { JvmtiEnv::GetBytecodes(Method* method, jint* bytecode_count_ptr, unsigned char** bytecodes_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
HandleMark hm; HandleMark hm;
methodHandle method(Thread::current(), method_oop); methodHandle mh(Thread::current(), method);
jint size = (jint)method->code_size(); jint size = (jint)mh->code_size();
jvmtiError err = allocate(size, bytecodes_ptr); jvmtiError err = allocate(size, bytecodes_ptr);
if (err != JVMTI_ERROR_NONE) { if (err != JVMTI_ERROR_NONE) {
return err; return err;
@ -3187,36 +3187,36 @@ JvmtiEnv::GetBytecodes(Method* method_oop, jint* bytecode_count_ptr, unsigned ch
(*bytecode_count_ptr) = size; (*bytecode_count_ptr) = size;
// get byte codes // get byte codes
JvmtiClassFileReconstituter::copy_bytecodes(method, *bytecodes_ptr); JvmtiClassFileReconstituter::copy_bytecodes(mh, *bytecodes_ptr);
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} /* end GetBytecodes */ } /* end GetBytecodes */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// is_native_ptr - pre-checked for NULL // is_native_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::IsMethodNative(Method* method_oop, jboolean* is_native_ptr) { JvmtiEnv::IsMethodNative(Method* method, jboolean* is_native_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
(*is_native_ptr) = method_oop->is_native(); (*is_native_ptr) = method->is_native();
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} /* end IsMethodNative */ } /* end IsMethodNative */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// is_synthetic_ptr - pre-checked for NULL // is_synthetic_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::IsMethodSynthetic(Method* method_oop, jboolean* is_synthetic_ptr) { JvmtiEnv::IsMethodSynthetic(Method* method, jboolean* is_synthetic_ptr) {
NULL_CHECK(method_oop, JVMTI_ERROR_INVALID_METHODID); NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID);
(*is_synthetic_ptr) = method_oop->is_synthetic(); (*is_synthetic_ptr) = method->is_synthetic();
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} /* end IsMethodSynthetic */ } /* end IsMethodSynthetic */
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method // method - pre-checked for validity, but may be NULL meaning obsolete method
// is_obsolete_ptr - pre-checked for NULL // is_obsolete_ptr - pre-checked for NULL
jvmtiError jvmtiError
JvmtiEnv::IsMethodObsolete(Method* method_oop, jboolean* is_obsolete_ptr) { JvmtiEnv::IsMethodObsolete(Method* method, jboolean* is_obsolete_ptr) {
if (use_version_1_0_semantics() && if (use_version_1_0_semantics() &&
get_capabilities()->can_redefine_classes == 0) { get_capabilities()->can_redefine_classes == 0) {
// This JvmtiEnv requested version 1.0 semantics and this function // This JvmtiEnv requested version 1.0 semantics and this function
@ -3225,7 +3225,7 @@ JvmtiEnv::IsMethodObsolete(Method* method_oop, jboolean* is_obsolete_ptr) {
return JVMTI_ERROR_MUST_POSSESS_CAPABILITY; return JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
} }
if (method_oop == NULL || method_oop->is_obsolete()) { if (method == NULL || method->is_obsolete()) {
*is_obsolete_ptr = true; *is_obsolete_ptr = true;
} else { } else {
*is_obsolete_ptr = false; *is_obsolete_ptr = false;

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -139,7 +139,7 @@ JvmtiEnv::</xsl:text>
<xsl:template match="jmethodID" mode="advice"> <xsl:template match="jmethodID" mode="advice">
<xsl:param name="name"/> <xsl:param name="name"/>
<xsl:text> <xsl:text>
// method_oop - pre-checked for validity, but may be NULL meaning obsolete method</xsl:text> // method - pre-checked for validity, but may be NULL meaning obsolete method</xsl:text>
</xsl:template> </xsl:template>
<xsl:template match="jfieldID" mode="advice"> <xsl:template match="jfieldID" mode="advice">

View file

@ -531,15 +531,15 @@ bool VM_GetOrSetLocal::is_assignable(const char* ty_sign, Klass* klass, Thread*
// Returns: 'true' - everything is Ok, 'false' - error code // Returns: 'true' - everything is Ok, 'false' - error code
bool VM_GetOrSetLocal::check_slot_type_lvt(javaVFrame* jvf) { bool VM_GetOrSetLocal::check_slot_type_lvt(javaVFrame* jvf) {
Method* method_oop = jvf->method(); Method* method = jvf->method();
jint num_entries = method_oop->localvariable_table_length(); jint num_entries = method->localvariable_table_length();
if (num_entries == 0) { if (num_entries == 0) {
_result = JVMTI_ERROR_INVALID_SLOT; _result = JVMTI_ERROR_INVALID_SLOT;
return false; // There are no slots return false; // There are no slots
} }
int signature_idx = -1; int signature_idx = -1;
int vf_bci = jvf->bci(); int vf_bci = jvf->bci();
LocalVariableTableElement* table = method_oop->localvariable_table_start(); LocalVariableTableElement* table = method->localvariable_table_start();
for (int i = 0; i < num_entries; i++) { for (int i = 0; i < num_entries; i++) {
int start_bci = table[i].start_bci; int start_bci = table[i].start_bci;
int end_bci = start_bci + table[i].length; int end_bci = start_bci + table[i].length;
@ -555,7 +555,7 @@ bool VM_GetOrSetLocal::check_slot_type_lvt(javaVFrame* jvf) {
_result = JVMTI_ERROR_INVALID_SLOT; _result = JVMTI_ERROR_INVALID_SLOT;
return false; // Incorrect slot index return false; // Incorrect slot index
} }
Symbol* sign_sym = method_oop->constants()->symbol_at(signature_idx); Symbol* sign_sym = method->constants()->symbol_at(signature_idx);
BasicType slot_type = Signature::basic_type(sign_sym); BasicType slot_type = Signature::basic_type(sign_sym);
switch (slot_type) { switch (slot_type) {
@ -597,10 +597,10 @@ bool VM_GetOrSetLocal::check_slot_type_lvt(javaVFrame* jvf) {
} }
bool VM_GetOrSetLocal::check_slot_type_no_lvt(javaVFrame* jvf) { bool VM_GetOrSetLocal::check_slot_type_no_lvt(javaVFrame* jvf) {
Method* method_oop = jvf->method(); Method* method = jvf->method();
jint extra_slot = (_type == T_LONG || _type == T_DOUBLE) ? 1 : 0; jint extra_slot = (_type == T_LONG || _type == T_DOUBLE) ? 1 : 0;
if (_index < 0 || _index + extra_slot >= method_oop->max_locals()) { if (_index < 0 || _index + extra_slot >= method->max_locals()) {
_result = JVMTI_ERROR_INVALID_SLOT; _result = JVMTI_ERROR_INVALID_SLOT;
return false; return false;
} }
@ -633,16 +633,16 @@ bool VM_GetOrSetLocal::doit_prologue() {
_jvf = get_java_vframe(); _jvf = get_java_vframe();
NULL_CHECK(_jvf, false); NULL_CHECK(_jvf, false);
Method* method_oop = _jvf->method(); Method* method = _jvf->method();
if (getting_receiver()) { if (getting_receiver()) {
if (method_oop->is_static()) { if (method->is_static()) {
_result = JVMTI_ERROR_INVALID_SLOT; _result = JVMTI_ERROR_INVALID_SLOT;
return false; return false;
} }
return true; return true;
} }
if (method_oop->is_native()) { if (method->is_native()) {
_result = JVMTI_ERROR_OPAQUE_FRAME; _result = JVMTI_ERROR_OPAQUE_FRAME;
return false; return false;
} }
@ -650,7 +650,7 @@ bool VM_GetOrSetLocal::doit_prologue() {
if (!check_slot_type_no_lvt(_jvf)) { if (!check_slot_type_no_lvt(_jvf)) {
return false; return false;
} }
if (method_oop->has_localvariable_table()) { if (method->has_localvariable_table()) {
return check_slot_type_lvt(_jvf); return check_slot_type_lvt(_jvf);
} }
return true; return true;

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -932,7 +932,7 @@ typedef </xsl:text>
</xsl:template> </xsl:template>
<xsl:template match="jmethodID" mode="HotSpotName"> <xsl:template match="jmethodID" mode="HotSpotName">
<xsl:text>method_oop</xsl:text> <xsl:text>checked_method</xsl:text>
</xsl:template> </xsl:template>
<xsl:template match="jfieldID" mode="HotSpotName"> <xsl:template match="jfieldID" mode="HotSpotName">

View file

@ -868,7 +868,7 @@ const size_t minimumSymbolTableSize = 1024;
"Time calls to GenerateOopMap::compute_map() individually") \ "Time calls to GenerateOopMap::compute_map() individually") \
\ \
develop(bool, TraceOopMapRewrites, false, \ develop(bool, TraceOopMapRewrites, false, \
"Trace rewriting of method oops during oop map generation") \ "Trace rewriting of methods during oop map generation") \
\ \
develop(bool, TraceICBuffer, false, \ develop(bool, TraceICBuffer, false, \
"Trace usage of IC buffer") \ "Trace usage of IC buffer") \