8004128: NPG: remove stackwalking in Threads::gc_prologue and gc_epilogue code
Remove bcx and mdx handling. We no longer have to convert bytecode pointers to indices for GC since Methods aren't moved. Reviewed-by: mgerdin, kvn
This commit is contained in:
parent
79eab12bba
commit
3f0a945468
@ -155,15 +155,6 @@ void frame::patch_pc(Thread* thread, address pc) {
|
||||
}
|
||||
}
|
||||
|
||||
void frame::pd_gc_epilog() {
|
||||
if (is_interpreted_frame()) {
|
||||
// Set constant pool cache entry for interpreter.
|
||||
Method* m = interpreter_frame_method();
|
||||
|
||||
*interpreter_frame_cpoolcache_addr() = m->constants()->cache();
|
||||
}
|
||||
}
|
||||
|
||||
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
// Is there anything to do?
|
||||
assert(is_interpreted_frame(), "Not an interpreted frame");
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2012, 2014 SAP AG. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -134,12 +134,12 @@ inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
return (intptr_t**)&istate->_locals;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t*)&istate->_bcp;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t*)&istate->_mdx;
|
||||
}
|
||||
@ -209,10 +209,10 @@ inline frame::ijava_state* frame::get_ijava_state() const {
|
||||
inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
return (intptr_t**) &(get_ijava_state()->locals);
|
||||
}
|
||||
inline intptr_t* frame::interpreter_frame_bcx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
return (intptr_t*) &(get_ijava_state()->bcp);
|
||||
}
|
||||
inline intptr_t* frame::interpreter_frame_mdx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
return (intptr_t*) &(get_ijava_state()->mdx);
|
||||
}
|
||||
// Pointer beyond the "oldest/deepest" BasicObjectLock on stack.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -593,17 +593,6 @@ bool frame::interpreter_frame_equals_unpacked_fp(intptr_t* fp) {
|
||||
return this->fp() == fp;
|
||||
}
|
||||
|
||||
|
||||
void frame::pd_gc_epilog() {
|
||||
if (is_interpreted_frame()) {
|
||||
// set constant pool cache entry for interpreter
|
||||
Method* m = interpreter_frame_method();
|
||||
|
||||
*interpreter_frame_cpoolcache_addr() = m->constants()->cache();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
#ifdef CC_INTERP
|
||||
// Is there anything to do?
|
||||
@ -641,10 +630,10 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
// validate bci/bcx
|
||||
// validate bci/bcp
|
||||
|
||||
intptr_t bcx = interpreter_frame_bcx();
|
||||
if (m->validate_bci_from_bcx(bcx) < 0) {
|
||||
address bcp = interpreter_frame_bcp();
|
||||
if (m->validate_bci_from_bcp(bcp) < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -78,7 +78,6 @@
|
||||
// Lesp first free element of expression stack
|
||||
// (which grows towards __higher__ addresses)
|
||||
// Lbcp is set to address of bytecode to execute
|
||||
// It is accessed in the frame under the name "bcx".
|
||||
// It may at times (during GC) be an index instead.
|
||||
// Lmethod the method being interpreted
|
||||
// Llocals the base pointer for accessing the locals array
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -98,12 +98,12 @@ inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
return (intptr_t**) &istate->_locals;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t*) &istate->_bcp;
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
interpreterState istate = get_interpreterState();
|
||||
return (intptr_t*) &istate->_mdx;
|
||||
}
|
||||
@ -165,12 +165,11 @@ inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
return (intptr_t**) sp_addr_at( Llocals->sp_offset_in_saved_window());
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcx_addr() const {
|
||||
// %%%%% reinterpreting Lbcp as a bcx
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
return (intptr_t*) sp_addr_at( Lbcp->sp_offset_in_saved_window());
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
// %%%%% reinterpreting ImethodDataPtr as a mdx
|
||||
return (intptr_t*) sp_addr_at( ImethodDataPtr->sp_offset_in_saved_window());
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -186,8 +186,7 @@ REGISTER_DECLARATION(Register, ImethodDataPtr , I2); // Pointer to the current
|
||||
// the interpreter to work right
|
||||
// (These assignments must be compatible with L7_thread_cache; see above.)
|
||||
|
||||
// Since Lbcp points into the middle of the method object,
|
||||
// it is temporarily converted into a "bcx" during GC.
|
||||
// Lbcp points into the middle of the method object.
|
||||
|
||||
// Exception processing
|
||||
// These registers are passed into exception handlers.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1785,7 +1785,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
|
||||
__ verify_thread();
|
||||
// expression stack is undefined here
|
||||
// O0: exception, i.e. Oexception
|
||||
// Lbcp: exception bcx
|
||||
// Lbcp: exception bcp
|
||||
__ verify_oop(Oexception);
|
||||
|
||||
|
||||
|
@ -537,10 +537,6 @@ bool frame::interpreter_frame_equals_unpacked_fp(intptr_t* fp) {
|
||||
return _fp == (fp - diff);
|
||||
}
|
||||
|
||||
void frame::pd_gc_epilog() {
|
||||
// nothing done here now
|
||||
}
|
||||
|
||||
bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
// QQQ
|
||||
#ifdef CC_INTERP
|
||||
@ -577,10 +573,10 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
// validate bci/bcx
|
||||
// validate bci/bcp
|
||||
|
||||
intptr_t bcx = interpreter_frame_bcx();
|
||||
if (m->validate_bci_from_bcx(bcx) < 0) {
|
||||
address bcp = interpreter_frame_bcp();
|
||||
if (m->validate_bci_from_bcp(bcp) < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -692,10 +688,10 @@ void frame::describe_pd(FrameValues& values, int frame_no) {
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_sender_sp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_last_sp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_method);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_mdx);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_mdp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_cache);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_locals);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_bcx);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_bcp);
|
||||
DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp);
|
||||
#endif
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -40,7 +40,7 @@
|
||||
// ... | monitor block size
|
||||
// [monitors ] /
|
||||
// [monitor block size ]
|
||||
// [byte code index/pointr] = bcx() bcx_offset
|
||||
// [byte code pointer ] = bcp() bcp_offset
|
||||
// [pointer to locals ] = locals() locals_offset
|
||||
// [constant pool cache ] = cache() cache_offset
|
||||
// [methodData ] = mdp() mdx_offset
|
||||
@ -111,11 +111,11 @@
|
||||
// outgoing sp before a call to an invoked method
|
||||
interpreter_frame_last_sp_offset = interpreter_frame_sender_sp_offset - 1,
|
||||
interpreter_frame_method_offset = interpreter_frame_last_sp_offset - 1,
|
||||
interpreter_frame_mdx_offset = interpreter_frame_method_offset - 1,
|
||||
interpreter_frame_cache_offset = interpreter_frame_mdx_offset - 1,
|
||||
interpreter_frame_mdp_offset = interpreter_frame_method_offset - 1,
|
||||
interpreter_frame_cache_offset = interpreter_frame_mdp_offset - 1,
|
||||
interpreter_frame_locals_offset = interpreter_frame_cache_offset - 1,
|
||||
interpreter_frame_bcx_offset = interpreter_frame_locals_offset - 1,
|
||||
interpreter_frame_initial_sp_offset = interpreter_frame_bcx_offset - 1,
|
||||
interpreter_frame_bcp_offset = interpreter_frame_locals_offset - 1,
|
||||
interpreter_frame_initial_sp_offset = interpreter_frame_bcp_offset - 1,
|
||||
|
||||
interpreter_frame_monitor_block_top_offset = interpreter_frame_initial_sp_offset,
|
||||
interpreter_frame_monitor_block_bottom_offset = interpreter_frame_initial_sp_offset,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -168,7 +168,7 @@ inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
return &(get_interpreterState()->_locals);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return (intptr_t*) &(get_interpreterState()->_bcp);
|
||||
}
|
||||
@ -188,7 +188,7 @@ inline Method** frame::interpreter_frame_method_addr() const {
|
||||
return &(get_interpreterState()->_method);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
assert(is_interpreted_frame(), "must be interpreted");
|
||||
return (intptr_t*) &(get_interpreterState()->_mdx);
|
||||
}
|
||||
@ -210,13 +210,13 @@ inline intptr_t* frame::interpreter_frame_last_sp() const {
|
||||
return *(intptr_t**)addr_at(interpreter_frame_last_sp_offset);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcx_addr() const {
|
||||
return (intptr_t*)addr_at(interpreter_frame_bcx_offset);
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
return (intptr_t*)addr_at(interpreter_frame_bcp_offset);
|
||||
}
|
||||
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdx_addr() const {
|
||||
return (intptr_t*)addr_at(interpreter_frame_mdx_offset);
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
return (intptr_t*)addr_at(interpreter_frame_mdp_offset);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -134,7 +134,7 @@ void InterpreterMacroAssembler::profile_arguments_type(Register mdp, Register ca
|
||||
shll(tmp, exact_log2(DataLayout::cell_size));
|
||||
addptr(mdp, tmp);
|
||||
}
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp);
|
||||
} else {
|
||||
assert(MethodData::profile_return(), "either profile call args or call ret");
|
||||
update_mdp_by_constant(mdp, in_bytes(TypeEntriesAtCall::return_only_size()));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -826,7 +826,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) {
|
||||
// Test ImethodDataPtr. If it is null, continue at the specified label
|
||||
void InterpreterMacroAssembler::test_method_data_pointer(Register mdp, Label& zero_continue) {
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
|
||||
movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
|
||||
testptr(mdp, mdp);
|
||||
jcc(Assembler::zero, zero_continue);
|
||||
}
|
||||
@ -853,7 +853,7 @@ void InterpreterMacroAssembler::set_method_data_pointer_for_bcp() {
|
||||
addptr(rbx, in_bytes(MethodData::data_offset()));
|
||||
addptr(rax, rbx);
|
||||
bind(set_mdp);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
|
||||
pop(rbx);
|
||||
pop(rax);
|
||||
}
|
||||
@ -975,7 +975,7 @@ void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in, int offset
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
Address disp_address(mdp_in, offset_of_disp);
|
||||
addptr(mdp_in,disp_address);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
|
||||
}
|
||||
|
||||
|
||||
@ -983,14 +983,14 @@ void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in, Register r
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
|
||||
addptr(mdp_in, disp_address);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
|
||||
}
|
||||
|
||||
|
||||
void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in, int constant) {
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
addptr(mdp_in, constant);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -61,8 +61,8 @@
|
||||
|
||||
#else
|
||||
|
||||
void save_bcp() { movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), rsi); }
|
||||
void restore_bcp() { movptr(rsi, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize)); }
|
||||
void save_bcp() { movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), rsi); }
|
||||
void restore_bcp() { movptr(rsi, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize)); }
|
||||
void restore_locals() { movptr(rdi, Address(rbp, frame::interpreter_frame_locals_offset * wordSize)); }
|
||||
|
||||
// Helpers for runtime call arguments/results
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -841,7 +841,7 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg) {
|
||||
void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
|
||||
Label& zero_continue) {
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
|
||||
movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
|
||||
testptr(mdp, mdp);
|
||||
jcc(Assembler::zero, zero_continue);
|
||||
}
|
||||
@ -868,7 +868,7 @@ void InterpreterMacroAssembler::set_method_data_pointer_for_bcp() {
|
||||
addptr(rbx, in_bytes(MethodData::data_offset()));
|
||||
addptr(rax, rbx);
|
||||
bind(set_mdp);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
|
||||
pop(rbx);
|
||||
pop(rax);
|
||||
}
|
||||
@ -991,7 +991,7 @@ void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in,
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
Address disp_address(mdp_in, offset_of_disp);
|
||||
addptr(mdp_in, disp_address);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
|
||||
}
|
||||
|
||||
|
||||
@ -1001,7 +1001,7 @@ void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in,
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
|
||||
addptr(mdp_in, disp_address);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
|
||||
}
|
||||
|
||||
|
||||
@ -1009,7 +1009,7 @@ void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in,
|
||||
int constant) {
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
addptr(mdp_in, constant);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
|
||||
movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -58,11 +58,11 @@
|
||||
|
||||
// Interpreter-specific registers
|
||||
void save_bcp() {
|
||||
movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), r13);
|
||||
movptr(Address(rbp, frame::interpreter_frame_bcp_offset * wordSize), r13);
|
||||
}
|
||||
|
||||
void restore_bcp() {
|
||||
movptr(r13, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize));
|
||||
movptr(r13, Address(rbp, frame::interpreter_frame_bcp_offset * wordSize));
|
||||
}
|
||||
|
||||
void restore_locals() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,7 +51,7 @@
|
||||
|
||||
#ifndef CC_INTERP
|
||||
const int method_offset = frame::interpreter_frame_method_offset * wordSize;
|
||||
const int bci_offset = frame::interpreter_frame_bcx_offset * wordSize;
|
||||
const int bcp_offset = frame::interpreter_frame_bcp_offset * wordSize;
|
||||
const int locals_offset = frame::interpreter_frame_locals_offset * wordSize;
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,7 +51,7 @@
|
||||
#ifndef CC_INTERP
|
||||
|
||||
const int method_offset = frame::interpreter_frame_method_offset * wordSize;
|
||||
const int bci_offset = frame::interpreter_frame_bcx_offset * wordSize;
|
||||
const int bcp_offset = frame::interpreter_frame_bcp_offset * wordSize;
|
||||
const int locals_offset = frame::interpreter_frame_locals_offset * wordSize;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -119,9 +119,6 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void frame::pd_gc_epilog() {
|
||||
}
|
||||
|
||||
bool frame::is_interpreted_frame_valid(JavaThread *thread) const {
|
||||
ShouldNotCallThis();
|
||||
return false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -101,7 +101,7 @@ inline intptr_t** frame::interpreter_frame_locals_addr() const {
|
||||
return &(get_interpreterState()->_locals);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_bcx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_bcp_addr() const {
|
||||
return (intptr_t*) &(get_interpreterState()->_bcp);
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ inline Method** frame::interpreter_frame_method_addr() const {
|
||||
return &(get_interpreterState()->_method);
|
||||
}
|
||||
|
||||
inline intptr_t* frame::interpreter_frame_mdx_addr() const {
|
||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||
return (intptr_t*) &(get_interpreterState()->_mdx);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -202,11 +202,11 @@ int generateJvmOffsets(GEN_variant gen_variant) {
|
||||
GEN_VALUE(OFFSET_interpreter_frame_method, 2 * pointer_size); /* L2 in saved window */
|
||||
GEN_VALUE(OFFSET_interpreter_frame_sender_sp, 13 * pointer_size); /* I5 in saved window */
|
||||
// Fake value for consistency. It is not going to be used.
|
||||
GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, 0xFFFF);
|
||||
GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, 0xFFFF);
|
||||
#elif defined(i386) || defined(__i386) || defined(__amd64)
|
||||
GEN_VALUE(OFFSET_interpreter_frame_sender_sp, -1 * pointer_size);
|
||||
GEN_VALUE(OFFSET_interpreter_frame_method, -3 * pointer_size);
|
||||
GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, -7 * pointer_size);
|
||||
GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, -7 * pointer_size);
|
||||
#endif
|
||||
|
||||
GEN_OFFS(Klass, _name);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -164,7 +164,7 @@ struct jvm_agent {
|
||||
int32_t SIZE_CodeCache_log2_segment;
|
||||
|
||||
uint64_t methodPtr;
|
||||
uint64_t bcx;
|
||||
uint64_t bcp;
|
||||
|
||||
Nmethod_t *N; /*Inlined methods support */
|
||||
Frame_t prev_fr;
|
||||
@ -1068,19 +1068,9 @@ name_for_nmethod(jvm_agent_t* J,
|
||||
return err;
|
||||
}
|
||||
|
||||
int is_bci(intptr_t bcx) {
|
||||
switch (DATA_MODEL) {
|
||||
case PR_MODEL_LP64:
|
||||
return ((uintptr_t) bcx) <= ((uintptr_t) MAX_METHOD_CODE_SIZE) ;
|
||||
case PR_MODEL_ILP32:
|
||||
default:
|
||||
return 0 <= bcx && bcx <= MAX_METHOD_CODE_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
name_for_imethod(jvm_agent_t* J,
|
||||
uint64_t bcx,
|
||||
uint64_t bcp,
|
||||
uint64_t method,
|
||||
char *result,
|
||||
size_t size,
|
||||
@ -1095,7 +1085,7 @@ name_for_imethod(jvm_agent_t* J,
|
||||
err = read_pointer(J, method + OFFSET_Method_constMethod, &constMethod);
|
||||
CHECK_FAIL(err);
|
||||
|
||||
bci = is_bci(bcx) ? bcx : bcx - (constMethod + (uint64_t) SIZE_ConstMethod);
|
||||
bci = bcp - (constMethod + (uint64_t) SIZE_ConstMethod);
|
||||
|
||||
if (debug)
|
||||
fprintf(stderr, "\t name_for_imethod: BEGIN: method: %#llx\n", method);
|
||||
@ -1169,7 +1159,7 @@ name_for_codecache(jvm_agent_t* J, uint64_t fp, uint64_t pc, char * result,
|
||||
if (err == PS_OK && strncmp(name, "Interpreter", 11) == 0) {
|
||||
*is_interpreted = 1;
|
||||
if (is_method(J, J->methodPtr)) {
|
||||
return name_for_imethod(J, J->bcx, J->methodPtr, result, size, jframe);
|
||||
return name_for_imethod(J, J->bcp, J->methodPtr, result, size, jframe);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1326,7 +1316,7 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
/* arguments given to read_pointer need to be worst case sized */
|
||||
uint64_t methodPtr = 0;
|
||||
uint64_t sender_sp;
|
||||
uint64_t bcx = 0;
|
||||
uint64_t bcp = 0;
|
||||
int is_interpreted = 0;
|
||||
int result = PS_OK;
|
||||
int err = PS_OK;
|
||||
@ -1357,7 +1347,7 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
* regs[R_PC] contains a CALL instruction pc offset.
|
||||
*/
|
||||
pc += 8;
|
||||
bcx = (uintptr_t) regs[R_L1];
|
||||
bcp = (uintptr_t) regs[R_L1];
|
||||
methodPtr = (uintptr_t) regs[R_L2];
|
||||
sender_sp = regs[R_I5];
|
||||
if (debug > 2) {
|
||||
@ -1385,13 +1375,13 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
if (read_pointer(J, fp + OFFSET_interpreter_frame_sender_sp, &sender_sp) != PS_OK) {
|
||||
sender_sp = 0;
|
||||
}
|
||||
if (read_pointer(J, fp + OFFSET_interpreter_frame_bcx_offset, &bcx) != PS_OK) {
|
||||
bcx = 0;
|
||||
if (read_pointer(J, fp + OFFSET_interpreter_frame_bcp_offset, &bcp) != PS_OK) {
|
||||
bcp = 0;
|
||||
}
|
||||
#endif /* i386 */
|
||||
|
||||
J->methodPtr = methodPtr;
|
||||
J->bcx = bcx;
|
||||
J->bcp = bcp;
|
||||
|
||||
/* On x86 with C2 JVM: native frame may have wrong regs[R_FP]
|
||||
* For example: JVM_SuspendThread frame poins to the top interpreted frame.
|
||||
@ -1402,7 +1392,7 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
*/
|
||||
#ifndef X86_COMPILER2
|
||||
if (is_method(J, J->methodPtr)) {
|
||||
result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
|
||||
result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
|
||||
/* If the methodPtr is a method then this is highly likely to be
|
||||
an interpreter frame */
|
||||
if (result >= 0) {
|
||||
@ -1416,7 +1406,7 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
}
|
||||
#ifdef X86_COMPILER2
|
||||
else if (is_method(J, J->methodPtr)) {
|
||||
result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
|
||||
result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
|
||||
/* If the methodPtr is a method then this is highly likely to be
|
||||
an interpreter frame */
|
||||
if (result >= 0) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -197,11 +197,11 @@ int generateJvmOffsets(GEN_variant gen_variant) {
|
||||
GEN_VALUE(OFFSET_interpreter_frame_method, 2 * pointer_size); /* L2 in saved window */
|
||||
GEN_VALUE(OFFSET_interpreter_frame_sender_sp, 13 * pointer_size); /* I5 in saved window */
|
||||
// Fake value for consistency. It is not going to be used.
|
||||
GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, 0xFFFF);
|
||||
GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, 0xFFFF);
|
||||
#elif defined(i386) || defined(__i386) || defined(__amd64)
|
||||
GEN_VALUE(OFFSET_interpreter_frame_sender_sp, -1 * pointer_size);
|
||||
GEN_VALUE(OFFSET_interpreter_frame_method, -3 * pointer_size);
|
||||
GEN_VALUE(OFFSET_interpreter_frame_bcx_offset, -7 * pointer_size);
|
||||
GEN_VALUE(OFFSET_interpreter_frame_bcp_offset, -7 * pointer_size);
|
||||
#endif
|
||||
|
||||
GEN_OFFS(Klass, _name);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -164,7 +164,7 @@ struct jvm_agent {
|
||||
int32_t SIZE_CodeCache_log2_segment;
|
||||
|
||||
uint64_t methodPtr;
|
||||
uint64_t bcx;
|
||||
uint64_t bcp;
|
||||
|
||||
Nmethod_t *N; /*Inlined methods support */
|
||||
Frame_t prev_fr;
|
||||
@ -1068,19 +1068,9 @@ name_for_nmethod(jvm_agent_t* J,
|
||||
return err;
|
||||
}
|
||||
|
||||
int is_bci(intptr_t bcx) {
|
||||
switch (DATA_MODEL) {
|
||||
case PR_MODEL_LP64:
|
||||
return ((uintptr_t) bcx) <= ((uintptr_t) MAX_METHOD_CODE_SIZE) ;
|
||||
case PR_MODEL_ILP32:
|
||||
default:
|
||||
return 0 <= bcx && bcx <= MAX_METHOD_CODE_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
name_for_imethod(jvm_agent_t* J,
|
||||
uint64_t bcx,
|
||||
uint64_t bcp,
|
||||
uint64_t method,
|
||||
char *result,
|
||||
size_t size,
|
||||
@ -1095,7 +1085,7 @@ name_for_imethod(jvm_agent_t* J,
|
||||
err = read_pointer(J, method + OFFSET_Method_constMethod, &constMethod);
|
||||
CHECK_FAIL(err);
|
||||
|
||||
bci = is_bci(bcx) ? bcx : bcx - (constMethod + (uint64_t) SIZE_ConstMethod);
|
||||
bci = bcp - (constMethod + (uint64_t) SIZE_ConstMethod);
|
||||
|
||||
if (debug)
|
||||
fprintf(stderr, "\t name_for_imethod: BEGIN: method: %#llx\n", method);
|
||||
@ -1169,7 +1159,7 @@ name_for_codecache(jvm_agent_t* J, uint64_t fp, uint64_t pc, char * result,
|
||||
if (err == PS_OK && strncmp(name, "Interpreter", 11) == 0) {
|
||||
*is_interpreted = 1;
|
||||
if (is_method(J, J->methodPtr)) {
|
||||
return name_for_imethod(J, J->bcx, J->methodPtr, result, size, jframe);
|
||||
return name_for_imethod(J, J->bcp, J->methodPtr, result, size, jframe);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1326,7 +1316,7 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
/* arguments given to read_pointer need to be worst case sized */
|
||||
uint64_t methodPtr = 0;
|
||||
uint64_t sender_sp;
|
||||
uint64_t bcx = 0;
|
||||
uint64_t bcp = 0;
|
||||
int is_interpreted = 0;
|
||||
int result = PS_OK;
|
||||
int err = PS_OK;
|
||||
@ -1357,7 +1347,7 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
* regs[R_PC] contains a CALL instruction pc offset.
|
||||
*/
|
||||
pc += 8;
|
||||
bcx = (uintptr_t) regs[R_L1];
|
||||
bcp = (uintptr_t) regs[R_L1];
|
||||
methodPtr = (uintptr_t) regs[R_L2];
|
||||
sender_sp = regs[R_I5];
|
||||
if (debug > 2) {
|
||||
@ -1385,13 +1375,13 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
if (read_pointer(J, fp + OFFSET_interpreter_frame_sender_sp, &sender_sp) != PS_OK) {
|
||||
sender_sp = 0;
|
||||
}
|
||||
if (read_pointer(J, fp + OFFSET_interpreter_frame_bcx_offset, &bcx) != PS_OK) {
|
||||
bcx = 0;
|
||||
if (read_pointer(J, fp + OFFSET_interpreter_frame_bcp_offset, &bcp) != PS_OK) {
|
||||
bcp = 0;
|
||||
}
|
||||
#endif /* i386 */
|
||||
|
||||
J->methodPtr = methodPtr;
|
||||
J->bcx = bcx;
|
||||
J->bcp = bcp;
|
||||
|
||||
/* On x86 with C2 JVM: native frame may have wrong regs[R_FP]
|
||||
* For example: JVM_SuspendThread frame poins to the top interpreted frame.
|
||||
@ -1402,7 +1392,7 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
*/
|
||||
#ifndef X86_COMPILER2
|
||||
if (is_method(J, J->methodPtr)) {
|
||||
result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
|
||||
result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
|
||||
/* If the methodPtr is a method then this is highly likely to be
|
||||
an interpreter frame */
|
||||
if (result >= 0) {
|
||||
@ -1416,7 +1406,7 @@ int Jlookup_by_regs(jvm_agent_t* J, const prgregset_t regs, char *name,
|
||||
}
|
||||
#ifdef X86_COMPILER2
|
||||
else if (is_method(J, J->methodPtr)) {
|
||||
result = name_for_imethod(J, bcx, J->methodPtr, name, size, jframe);
|
||||
result = name_for_imethod(J, bcp, J->methodPtr, name, size, jframe);
|
||||
/* If the methodPtr is a method then this is highly likely to be
|
||||
an interpreter frame */
|
||||
if (result >= 0) {
|
||||
|
@ -1639,9 +1639,9 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, methodHandle met
|
||||
if (fr.is_first_frame()) break;
|
||||
address pc = fr.pc();
|
||||
if (fr.is_interpreted_frame()) {
|
||||
intptr_t bcx = fr.interpreter_frame_bcx();
|
||||
address bcp = fr.interpreter_frame_bcp();
|
||||
method = fr.interpreter_frame_method();
|
||||
bci = fr.is_bci(bcx) ? bcx : method->bci_from((address)bcx);
|
||||
bci = method->bci_from(bcp);
|
||||
fr = fr.sender(&map);
|
||||
} else {
|
||||
CodeBlob* cb = fr.cb();
|
||||
|
@ -439,7 +439,7 @@ void ErrorContext::location_details(outputStream* ss, const Method* method) cons
|
||||
if (_bci != -1 && method != NULL) {
|
||||
streamIndentor si(ss);
|
||||
const char* bytecode_name = "<invalid>";
|
||||
if (method->validate_bci_from_bcx(_bci) != -1) {
|
||||
if (method->validate_bci(_bci) != -1) {
|
||||
Bytecodes::Code code = Bytecodes::code_or_bp_at(method->bcp_from(_bci));
|
||||
if (Bytecodes::is_defined(code)) {
|
||||
bytecode_name = Bytecodes::name(code);
|
||||
|
@ -76,7 +76,6 @@ void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp,
|
||||
// When collecting the permanent generation Method*s may be moving,
|
||||
// so we either have to flush all bcp data or convert it into bci.
|
||||
CodeCache::gc_prologue();
|
||||
Threads::gc_prologue();
|
||||
|
||||
bool marked_for_unloading = false;
|
||||
|
||||
@ -106,7 +105,6 @@ void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp,
|
||||
// Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity());
|
||||
// Universe::set_heap_used_at_last_gc(Universe::heap()->used());
|
||||
|
||||
Threads::gc_epilogue();
|
||||
CodeCache::gc_epilogue();
|
||||
JvmtiExport::gc_epilogue();
|
||||
|
||||
|
@ -180,7 +180,6 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
|
||||
size_policy->major_collection_begin();
|
||||
|
||||
CodeCache::gc_prologue();
|
||||
Threads::gc_prologue();
|
||||
BiasedLocking::preserve_marks();
|
||||
|
||||
// Capture heap size before collection for printing.
|
||||
@ -251,7 +250,6 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
|
||||
MetaspaceAux::verify_metrics();
|
||||
|
||||
BiasedLocking::restore_marks();
|
||||
Threads::gc_epilogue();
|
||||
CodeCache::gc_epilogue();
|
||||
JvmtiExport::gc_epilogue();
|
||||
|
||||
|
@ -1066,7 +1066,6 @@ void PSParallelCompact::post_compact()
|
||||
ClassLoaderDataGraph::purge();
|
||||
MetaspaceAux::verify_metrics();
|
||||
|
||||
Threads::gc_epilogue();
|
||||
CodeCache::gc_epilogue();
|
||||
JvmtiExport::gc_epilogue();
|
||||
|
||||
@ -2068,7 +2067,6 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
|
||||
size_policy->major_collection_begin();
|
||||
|
||||
CodeCache::gc_prologue();
|
||||
Threads::gc_prologue();
|
||||
|
||||
COMPILER2_PRESENT(DerivedPointerTable::clear());
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -76,7 +76,6 @@ void GenMarkSweep::invoke_at_safepoint(int level, ReferenceProcessor* rp, bool c
|
||||
// When collecting the permanent generation Method*s may be moving,
|
||||
// so we either have to flush all bcp data or convert it into bci.
|
||||
CodeCache::gc_prologue();
|
||||
Threads::gc_prologue();
|
||||
|
||||
// Increment the invocation count
|
||||
_total_invocations++;
|
||||
@ -132,7 +131,6 @@ void GenMarkSweep::invoke_at_safepoint(int level, ReferenceProcessor* rp, bool c
|
||||
rs->invalidate_or_clear(old_gen);
|
||||
}
|
||||
|
||||
Threads::gc_epilogue();
|
||||
CodeCache::gc_epilogue();
|
||||
JvmtiExport::gc_epilogue();
|
||||
|
||||
|
@ -240,6 +240,9 @@ void Method::mask_for(int bci, InterpreterOopMap* mask) {
|
||||
|
||||
|
||||
int Method::bci_from(address bcp) const {
|
||||
if (is_native() && bcp == 0) {
|
||||
return 0;
|
||||
}
|
||||
#ifdef ASSERT
|
||||
{ ResourceMark rm;
|
||||
assert(is_native() && bcp == code_base() || contains(bcp) || is_error_reported(),
|
||||
@ -250,24 +253,23 @@ int Method::bci_from(address bcp) const {
|
||||
}
|
||||
|
||||
|
||||
// Return (int)bcx if it appears to be a valid BCI.
|
||||
// Return bci_from((address)bcx) if it appears to be a valid BCP.
|
||||
int Method::validate_bci(int bci) const {
|
||||
return (bci == 0 || bci < code_size()) ? bci : -1;
|
||||
}
|
||||
|
||||
// Return bci if it appears to be a valid bcp
|
||||
// Return -1 otherwise.
|
||||
// Used by profiling code, when invalid data is a possibility.
|
||||
// The caller is responsible for validating the Method* itself.
|
||||
int Method::validate_bci_from_bcx(intptr_t bcx) const {
|
||||
int Method::validate_bci_from_bcp(address bcp) const {
|
||||
// keep bci as -1 if not a valid bci
|
||||
int bci = -1;
|
||||
if (bcx == 0 || (address)bcx == code_base()) {
|
||||
if (bcp == 0 || bcp == code_base()) {
|
||||
// code_size() may return 0 and we allow 0 here
|
||||
// the method may be native
|
||||
bci = 0;
|
||||
} else if (frame::is_bci(bcx)) {
|
||||
if (bcx < code_size()) {
|
||||
bci = (int)bcx;
|
||||
}
|
||||
} else if (contains((address)bcx)) {
|
||||
bci = (address)bcx - code_base();
|
||||
} else if (contains(bcp)) {
|
||||
bci = bcp - code_base();
|
||||
}
|
||||
// Assert that if we have dodged any asserts, bci is negative.
|
||||
assert(bci == -1 || bci == bci_from(bcp_from(bci)), "sane bci if >=0");
|
||||
|
@ -649,7 +649,8 @@ class Method : public Metadata {
|
||||
// Returns the byte code index from the byte code pointer
|
||||
int bci_from(address bcp) const;
|
||||
address bcp_from(int bci) const;
|
||||
int validate_bci_from_bcx(intptr_t bcx) const;
|
||||
int validate_bci_from_bcp(address bcp) const;
|
||||
int validate_bci(int bci) const;
|
||||
|
||||
// Returns the line number for a bci if debugging information for the method is prowided,
|
||||
// -1 is returned otherwise.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -2338,10 +2338,6 @@ public:
|
||||
return dp - ((address)_data);
|
||||
}
|
||||
|
||||
address di_to_dp(int di) {
|
||||
return (address)data_layout_at(di);
|
||||
}
|
||||
|
||||
// bci to di/dp conversion.
|
||||
address bci_to_dp(int bci);
|
||||
int bci_to_di(int bci) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -234,9 +234,8 @@ static bool is_decipherable_interpreted_frame(JavaThread* thread,
|
||||
*method_p = method;
|
||||
if (!method->is_valid_method()) return false;
|
||||
|
||||
intptr_t bcx = fr->interpreter_frame_bcx();
|
||||
|
||||
int bci = method->validate_bci_from_bcx(bcx);
|
||||
address bcp = fr->interpreter_frame_bcp();
|
||||
int bci = method->validate_bci_from_bcp(bcp);
|
||||
|
||||
// note: bci is set to -1 if not a valid bci
|
||||
*bci_p = bci;
|
||||
|
@ -412,91 +412,32 @@ void frame::interpreter_frame_set_method(Method* method) {
|
||||
*interpreter_frame_method_addr() = method;
|
||||
}
|
||||
|
||||
void frame::interpreter_frame_set_bcx(intptr_t bcx) {
|
||||
assert(is_interpreted_frame(), "Not an interpreted frame");
|
||||
if (ProfileInterpreter) {
|
||||
bool formerly_bci = is_bci(interpreter_frame_bcx());
|
||||
bool is_now_bci = is_bci(bcx);
|
||||
*interpreter_frame_bcx_addr() = bcx;
|
||||
|
||||
intptr_t mdx = interpreter_frame_mdx();
|
||||
|
||||
if (mdx != 0) {
|
||||
if (formerly_bci) {
|
||||
if (!is_now_bci) {
|
||||
// The bcx was just converted from bci to bcp.
|
||||
// Convert the mdx in parallel.
|
||||
MethodData* mdo = interpreter_frame_method()->method_data();
|
||||
assert(mdo != NULL, "");
|
||||
int mdi = mdx - 1; // We distinguish valid mdi from zero by adding one.
|
||||
address mdp = mdo->di_to_dp(mdi);
|
||||
interpreter_frame_set_mdx((intptr_t)mdp);
|
||||
}
|
||||
} else {
|
||||
if (is_now_bci) {
|
||||
// The bcx was just converted from bcp to bci.
|
||||
// Convert the mdx in parallel.
|
||||
MethodData* mdo = interpreter_frame_method()->method_data();
|
||||
assert(mdo != NULL, "");
|
||||
int mdi = mdo->dp_to_di((address)mdx);
|
||||
interpreter_frame_set_mdx((intptr_t)mdi + 1); // distinguish valid from 0.
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
*interpreter_frame_bcx_addr() = bcx;
|
||||
}
|
||||
}
|
||||
|
||||
jint frame::interpreter_frame_bci() const {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
intptr_t bcx = interpreter_frame_bcx();
|
||||
return is_bci(bcx) ? bcx : interpreter_frame_method()->bci_from((address)bcx);
|
||||
}
|
||||
|
||||
void frame::interpreter_frame_set_bci(jint bci) {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
assert(!is_bci(interpreter_frame_bcx()), "should not set bci during GC");
|
||||
interpreter_frame_set_bcx((intptr_t)interpreter_frame_method()->bcp_from(bci));
|
||||
address bcp = interpreter_frame_bcp();
|
||||
return interpreter_frame_method()->bci_from(bcp);
|
||||
}
|
||||
|
||||
address frame::interpreter_frame_bcp() const {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
intptr_t bcx = interpreter_frame_bcx();
|
||||
return is_bci(bcx) ? interpreter_frame_method()->bcp_from(bcx) : (address)bcx;
|
||||
return (address)*interpreter_frame_bcp_addr();
|
||||
}
|
||||
|
||||
void frame::interpreter_frame_set_bcp(address bcp) {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
assert(!is_bci(interpreter_frame_bcx()), "should not set bcp during GC");
|
||||
interpreter_frame_set_bcx((intptr_t)bcp);
|
||||
}
|
||||
|
||||
void frame::interpreter_frame_set_mdx(intptr_t mdx) {
|
||||
assert(is_interpreted_frame(), "Not an interpreted frame");
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
*interpreter_frame_mdx_addr() = mdx;
|
||||
*interpreter_frame_bcp_addr() = (intptr_t)bcp;
|
||||
}
|
||||
|
||||
address frame::interpreter_frame_mdp() const {
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
intptr_t bcx = interpreter_frame_bcx();
|
||||
intptr_t mdx = interpreter_frame_mdx();
|
||||
|
||||
assert(!is_bci(bcx), "should not access mdp during GC");
|
||||
return (address)mdx;
|
||||
return (address)*interpreter_frame_mdp_addr();
|
||||
}
|
||||
|
||||
void frame::interpreter_frame_set_mdp(address mdp) {
|
||||
assert(is_interpreted_frame(), "interpreted frame expected");
|
||||
if (mdp == NULL) {
|
||||
// Always allow the mdp to be cleared.
|
||||
interpreter_frame_set_mdx((intptr_t)mdp);
|
||||
}
|
||||
intptr_t bcx = interpreter_frame_bcx();
|
||||
assert(!is_bci(bcx), "should not set mdp during GC");
|
||||
interpreter_frame_set_mdx((intptr_t)mdp);
|
||||
assert(ProfileInterpreter, "must be profiling interpreter");
|
||||
*interpreter_frame_mdp_addr() = (intptr_t)mdp;
|
||||
}
|
||||
|
||||
BasicObjectLock* frame::next_monitor_in_interpreter_frame(BasicObjectLock* current) const {
|
||||
@ -1182,24 +1123,6 @@ void frame::metadata_do(void f(Metadata*)) {
|
||||
}
|
||||
}
|
||||
|
||||
void frame::gc_prologue() {
|
||||
if (is_interpreted_frame()) {
|
||||
// set bcx to bci to become Method* position independent during GC
|
||||
interpreter_frame_set_bcx(interpreter_frame_bci());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void frame::gc_epilogue() {
|
||||
if (is_interpreted_frame()) {
|
||||
// set bcx back to bcp for interpreter
|
||||
interpreter_frame_set_bcx((intptr_t)interpreter_frame_bcp());
|
||||
}
|
||||
// call processor specific epilog function
|
||||
pd_gc_epilog();
|
||||
}
|
||||
|
||||
|
||||
# ifdef ENABLE_ZAP_DEAD_LOCALS
|
||||
|
||||
void frame::CheckValueClosure::do_oop(oop* p) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -241,8 +241,8 @@ class frame VALUE_OBJ_CLASS_SPEC {
|
||||
|
||||
private:
|
||||
intptr_t** interpreter_frame_locals_addr() const;
|
||||
intptr_t* interpreter_frame_bcx_addr() const;
|
||||
intptr_t* interpreter_frame_mdx_addr() const;
|
||||
intptr_t* interpreter_frame_bcp_addr() const;
|
||||
intptr_t* interpreter_frame_mdp_addr() const;
|
||||
|
||||
public:
|
||||
// Locals
|
||||
@ -252,23 +252,13 @@ class frame VALUE_OBJ_CLASS_SPEC {
|
||||
|
||||
void interpreter_frame_set_locals(intptr_t* locs);
|
||||
|
||||
// byte code index/pointer (use these functions for unchecked frame access only!)
|
||||
intptr_t interpreter_frame_bcx() const { return *interpreter_frame_bcx_addr(); }
|
||||
void interpreter_frame_set_bcx(intptr_t bcx);
|
||||
|
||||
// byte code index
|
||||
jint interpreter_frame_bci() const;
|
||||
void interpreter_frame_set_bci(jint bci);
|
||||
|
||||
// byte code pointer
|
||||
address interpreter_frame_bcp() const;
|
||||
void interpreter_frame_set_bcp(address bcp);
|
||||
|
||||
// Unchecked access to the method data index/pointer.
|
||||
// Only use this if you know what you are doing.
|
||||
intptr_t interpreter_frame_mdx() const { return *interpreter_frame_mdx_addr(); }
|
||||
void interpreter_frame_set_mdx(intptr_t mdx);
|
||||
|
||||
// method data pointer
|
||||
address interpreter_frame_mdp() const;
|
||||
void interpreter_frame_set_mdp(address dp);
|
||||
@ -437,10 +427,6 @@ class frame VALUE_OBJ_CLASS_SPEC {
|
||||
// RedefineClasses support for finding live interpreted methods on the stack
|
||||
void metadata_do(void f(Metadata*));
|
||||
|
||||
void gc_prologue();
|
||||
void gc_epilogue();
|
||||
void pd_gc_epilog();
|
||||
|
||||
# ifdef ENABLE_ZAP_DEAD_LOCALS
|
||||
private:
|
||||
class CheckValueClosure: public OopClosure {
|
||||
@ -477,7 +463,6 @@ class frame VALUE_OBJ_CLASS_SPEC {
|
||||
// Verification
|
||||
void verify(const RegisterMap* map);
|
||||
static bool verify_return_pc(address x);
|
||||
static bool is_bci(intptr_t bcx);
|
||||
// Usage:
|
||||
// assert(frame::verify_return_pc(return_address), "must be a return pc");
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -55,26 +55,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// This file holds platform-independent bodies of inline functions for frames.
|
||||
|
||||
// Note: The bcx usually contains the bcp; however during GC it contains the bci
|
||||
// (changed by gc_prologue() and gc_epilogue()) to be Method* position
|
||||
// independent. These accessors make sure the correct value is returned
|
||||
// by testing the range of the bcx value. bcp's are guaranteed to be above
|
||||
// max_method_code_size, since methods are always allocated in OldSpace and
|
||||
// Eden is allocated before OldSpace.
|
||||
//
|
||||
// The bcp is accessed sometimes during GC for ArgumentDescriptors; than
|
||||
// the correct translation has to be performed (was bug).
|
||||
|
||||
inline bool frame::is_bci(intptr_t bcx) {
|
||||
#ifdef _LP64
|
||||
return ((uintptr_t) bcx) <= ((uintptr_t) max_method_code_size) ;
|
||||
#else
|
||||
return 0 <= bcx && bcx <= max_method_code_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool frame::is_entry_frame() const {
|
||||
return StubRoutines::returns_to_call_stub(pc());
|
||||
}
|
||||
|
@ -2647,20 +2647,6 @@ void JavaThread::deoptimized_wrt_marked_nmethods() {
|
||||
}
|
||||
|
||||
|
||||
// GC support
|
||||
static void frame_gc_epilogue(frame* f, const RegisterMap* map) { f->gc_epilogue(); }
|
||||
|
||||
void JavaThread::gc_epilogue() {
|
||||
frames_do(frame_gc_epilogue);
|
||||
}
|
||||
|
||||
|
||||
static void frame_gc_prologue(frame* f, const RegisterMap* map) { f->gc_prologue(); }
|
||||
|
||||
void JavaThread::gc_prologue() {
|
||||
frames_do(frame_gc_prologue);
|
||||
}
|
||||
|
||||
// If the caller is a NamedThread, then remember, in the current scope,
|
||||
// the given JavaThread in its _processed_thread field.
|
||||
class RememberProcessedThread: public StackObj {
|
||||
@ -4149,18 +4135,6 @@ void Threads::metadata_do(void f(Metadata*)) {
|
||||
}
|
||||
}
|
||||
|
||||
void Threads::gc_epilogue() {
|
||||
ALL_JAVA_THREADS(p) {
|
||||
p->gc_epilogue();
|
||||
}
|
||||
}
|
||||
|
||||
void Threads::gc_prologue() {
|
||||
ALL_JAVA_THREADS(p) {
|
||||
p->gc_prologue();
|
||||
}
|
||||
}
|
||||
|
||||
void Threads::deoptimized_wrt_marked_nmethods() {
|
||||
ALL_JAVA_THREADS(p) {
|
||||
p->deoptimized_wrt_marked_nmethods();
|
||||
|
@ -1416,10 +1416,6 @@ class JavaThread: public Thread {
|
||||
// RedefineClasses Support
|
||||
void metadata_do(void f(Metadata*));
|
||||
|
||||
// Memory management operations
|
||||
void gc_epilogue();
|
||||
void gc_prologue();
|
||||
|
||||
// Misc. operations
|
||||
char* name() const { return (char*)get_thread_name(); }
|
||||
void print_on(outputStream* st) const;
|
||||
@ -1899,8 +1895,6 @@ class Threads: AllStatic {
|
||||
// RedefineClasses support
|
||||
static void metadata_do(void f(Metadata*));
|
||||
|
||||
static void gc_epilogue();
|
||||
static void gc_prologue();
|
||||
#ifdef ASSERT
|
||||
static bool is_vm_complete() { return _vm_complete; }
|
||||
#endif
|
||||
|
@ -511,8 +511,8 @@ inline bool vframeStreamCommon::fill_from_frame() {
|
||||
|
||||
inline void vframeStreamCommon::fill_from_interpreter_frame() {
|
||||
Method* method = _frame.interpreter_frame_method();
|
||||
intptr_t bcx = _frame.interpreter_frame_bcx();
|
||||
int bci = method->validate_bci_from_bcx(bcx);
|
||||
address bcp = _frame.interpreter_frame_bcp();
|
||||
int bci = method->validate_bci_from_bcp(bcp);
|
||||
// 6379830 AsyncGetCallTrace sometimes feeds us wild frames.
|
||||
if (bci < 0) {
|
||||
found_bad_method_frame();
|
||||
|
@ -296,9 +296,9 @@ void vframeArrayElement::unpack_on_stack(int caller_actual_parameters,
|
||||
src->lock()->move_to(src->obj(), top->lock());
|
||||
}
|
||||
if (ProfileInterpreter) {
|
||||
iframe()->interpreter_frame_set_mdx(0); // clear out the mdp.
|
||||
iframe()->interpreter_frame_set_mdp(0); // clear out the mdp.
|
||||
}
|
||||
iframe()->interpreter_frame_set_bcx((intptr_t)bcp); // cannot use bcp because frame is not initialized yet
|
||||
iframe()->interpreter_frame_set_bcp(bcp);
|
||||
if (ProfileInterpreter) {
|
||||
MethodData* mdo = method()->method_data();
|
||||
if (mdo != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user