8255617: Zero: purge the remaining bytecode interpreter profiling support
Reviewed-by: coleenp, sgehwolf, jiefu
This commit is contained in:
parent
4b88119b4b
commit
a5d8a9c211
@ -47,7 +47,6 @@ const char *BytecodeInterpreter::name_of_field_at_address(address addr) {
|
|||||||
DO(_constants);
|
DO(_constants);
|
||||||
DO(_method);
|
DO(_method);
|
||||||
DO(_mirror);
|
DO(_mirror);
|
||||||
DO(_mdx);
|
|
||||||
DO(_stack);
|
DO(_stack);
|
||||||
DO(_msg);
|
DO(_msg);
|
||||||
DO(_result);
|
DO(_result);
|
||||||
@ -84,7 +83,6 @@ void BytecodeInterpreter::layout_interpreterState(interpreterState istate,
|
|||||||
istate->set_msg(BytecodeInterpreter::method_resume);
|
istate->set_msg(BytecodeInterpreter::method_resume);
|
||||||
istate->set_bcp_advance(0);
|
istate->set_bcp_advance(0);
|
||||||
istate->set_oop_temp(NULL);
|
istate->set_oop_temp(NULL);
|
||||||
istate->set_mdx(NULL);
|
|
||||||
if (caller->is_interpreted_frame()) {
|
if (caller->is_interpreted_frame()) {
|
||||||
interpreterState prev = caller->get_interpreterState();
|
interpreterState prev = caller->get_interpreterState();
|
||||||
prev->set_callee(method);
|
prev->set_callee(method);
|
||||||
|
@ -107,7 +107,8 @@ inline oop* frame::interpreter_frame_mirror_addr() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
inline intptr_t* frame::interpreter_frame_mdp_addr() const {
|
||||||
return (intptr_t*) &(get_interpreterState()->_mdx);
|
fatal("Should not call this: Zero never profiles");
|
||||||
|
return NULL; // silence compiler warnings
|
||||||
}
|
}
|
||||||
|
|
||||||
inline intptr_t* frame::interpreter_frame_tos_address() const {
|
inline intptr_t* frame::interpreter_frame_tos_address() const {
|
||||||
|
@ -749,7 +749,6 @@ InterpreterFrame *InterpreterFrame::build(Method* const method, TRAPS) {
|
|||||||
istate->set_constants(method->constants()->cache());
|
istate->set_constants(method->constants()->cache());
|
||||||
istate->set_msg(BytecodeInterpreter::method_entry);
|
istate->set_msg(BytecodeInterpreter::method_entry);
|
||||||
istate->set_oop_temp(NULL);
|
istate->set_oop_temp(NULL);
|
||||||
istate->set_mdx(NULL);
|
|
||||||
istate->set_callee(NULL);
|
istate->set_callee(NULL);
|
||||||
|
|
||||||
istate->set_monitor_base((BasicObjectLock *) stack->sp());
|
istate->set_monitor_base((BasicObjectLock *) stack->sp());
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include "gc/shared/threadLocalAllocBuffer.inline.hpp"
|
#include "gc/shared/threadLocalAllocBuffer.inline.hpp"
|
||||||
#include "interpreter/bytecodeHistogram.hpp"
|
#include "interpreter/bytecodeHistogram.hpp"
|
||||||
#include "interpreter/zero/bytecodeInterpreter.inline.hpp"
|
#include "interpreter/zero/bytecodeInterpreter.inline.hpp"
|
||||||
#include "interpreter/zero/bytecodeInterpreterProfiling.hpp"
|
|
||||||
#include "interpreter/interpreter.hpp"
|
#include "interpreter/interpreter.hpp"
|
||||||
#include "interpreter/interpreterRuntime.hpp"
|
#include "interpreter/interpreterRuntime.hpp"
|
||||||
#include "logging/log.hpp"
|
#include "logging/log.hpp"
|
||||||
@ -422,8 +421,6 @@ BytecodeInterpreter::run(interpreterState istate) {
|
|||||||
static bool _jvmti_interp_events = 0;
|
static bool _jvmti_interp_events = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int _compiling; // (UseCompiler || CountCompiledCalls)
|
|
||||||
|
|
||||||
#ifdef ASSERT
|
#ifdef ASSERT
|
||||||
if (istate->_msg != initialize) {
|
if (istate->_msg != initialize) {
|
||||||
assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit");
|
assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit");
|
||||||
@ -552,12 +549,12 @@ BytecodeInterpreter::run(interpreterState istate) {
|
|||||||
topOfStack < istate->stack_base(),
|
topOfStack < istate->stack_base(),
|
||||||
"Stack top out of range");
|
"Stack top out of range");
|
||||||
|
|
||||||
const uint mdo_last_branch_taken_count = 0;
|
assert(!UseCompiler, "Zero does not support compilers");
|
||||||
|
assert(!CountCompiledCalls, "Zero does not support counting compiled calls");
|
||||||
|
|
||||||
switch (istate->msg()) {
|
switch (istate->msg()) {
|
||||||
case initialize: {
|
case initialize: {
|
||||||
if (initialized++) ShouldNotReachHere(); // Only one initialize call.
|
if (initialized++) ShouldNotReachHere(); // Only one initialize call.
|
||||||
_compiling = (UseCompiler || CountCompiledCalls);
|
|
||||||
#ifdef VM_JVMTI
|
#ifdef VM_JVMTI
|
||||||
_jvmti_interp_events = JvmtiExport::can_post_interpreter_events();
|
_jvmti_interp_events = JvmtiExport::can_post_interpreter_events();
|
||||||
#endif
|
#endif
|
||||||
@ -568,11 +565,6 @@ BytecodeInterpreter::run(interpreterState istate) {
|
|||||||
THREAD->set_do_not_unlock();
|
THREAD->set_do_not_unlock();
|
||||||
// count invocations
|
// count invocations
|
||||||
assert(initialized, "Interpreter not initialized");
|
assert(initialized, "Interpreter not initialized");
|
||||||
if (_compiling) {
|
|
||||||
// Get or create profile data. Check for pending (async) exceptions.
|
|
||||||
BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception);
|
|
||||||
SAFEPOINT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((istate->_stack_base - istate->_stack_limit) != istate->method()->max_stack() + 1) {
|
if ((istate->_stack_base - istate->_stack_limit) != istate->method()->max_stack() + 1) {
|
||||||
// initialize
|
// initialize
|
||||||
@ -695,12 +687,6 @@ BytecodeInterpreter::run(interpreterState istate) {
|
|||||||
// clear the message so we don't confuse ourselves later
|
// clear the message so we don't confuse ourselves later
|
||||||
assert(THREAD->pop_frame_in_process(), "wrong frame pop state");
|
assert(THREAD->pop_frame_in_process(), "wrong frame pop state");
|
||||||
istate->set_msg(no_request);
|
istate->set_msg(no_request);
|
||||||
if (_compiling) {
|
|
||||||
// Set MDX back to the ProfileData of the invoke bytecode that will be
|
|
||||||
// restarted.
|
|
||||||
SET_MDX(NULL);
|
|
||||||
BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception);
|
|
||||||
}
|
|
||||||
THREAD->clr_pop_frame_in_process();
|
THREAD->clr_pop_frame_in_process();
|
||||||
goto run;
|
goto run;
|
||||||
}
|
}
|
||||||
@ -722,11 +708,6 @@ BytecodeInterpreter::run(interpreterState istate) {
|
|||||||
if (THREAD->has_pending_exception()) goto handle_exception;
|
if (THREAD->has_pending_exception()) goto handle_exception;
|
||||||
// Update the pc by the saved amount of the invoke bytecode size
|
// Update the pc by the saved amount of the invoke bytecode size
|
||||||
UPDATE_PC(istate->bcp_advance());
|
UPDATE_PC(istate->bcp_advance());
|
||||||
|
|
||||||
if (_compiling) {
|
|
||||||
// Get or create profile data. Check for pending (async) exceptions.
|
|
||||||
BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception);
|
|
||||||
}
|
|
||||||
goto run;
|
goto run;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -734,11 +715,6 @@ BytecodeInterpreter::run(interpreterState istate) {
|
|||||||
// Returned from an opcode that will reexecute. Deopt was
|
// Returned from an opcode that will reexecute. Deopt was
|
||||||
// a result of a PopFrame request.
|
// a result of a PopFrame request.
|
||||||
//
|
//
|
||||||
|
|
||||||
if (_compiling) {
|
|
||||||
// Get or create profile data. Check for pending (async) exceptions.
|
|
||||||
BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception);
|
|
||||||
}
|
|
||||||
goto run;
|
goto run;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -761,11 +737,6 @@ BytecodeInterpreter::run(interpreterState istate) {
|
|||||||
}
|
}
|
||||||
UPDATE_PC(Bytecodes::length_at(METHOD, pc));
|
UPDATE_PC(Bytecodes::length_at(METHOD, pc));
|
||||||
if (THREAD->has_pending_exception()) goto handle_exception;
|
if (THREAD->has_pending_exception()) goto handle_exception;
|
||||||
|
|
||||||
if (_compiling) {
|
|
||||||
// Get or create profile data. Check for pending (async) exceptions.
|
|
||||||
BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception);
|
|
||||||
}
|
|
||||||
goto run;
|
goto run;
|
||||||
}
|
}
|
||||||
case got_monitors: {
|
case got_monitors: {
|
||||||
@ -1064,9 +1035,6 @@ run:
|
|||||||
UPDATE_PC_AND_CONTINUE(6);
|
UPDATE_PC_AND_CONTINUE(6);
|
||||||
}
|
}
|
||||||
case Bytecodes::_ret:
|
case Bytecodes::_ret:
|
||||||
// Profile ret.
|
|
||||||
BI_PROFILE_UPDATE_RET(/*bci=*/((int)(intptr_t)(LOCALS_ADDR(reg))));
|
|
||||||
// Now, update the pc.
|
|
||||||
pc = istate->method()->code_base() + (intptr_t)(LOCALS_ADDR(reg));
|
pc = istate->method()->code_base() + (intptr_t)(LOCALS_ADDR(reg));
|
||||||
UPDATE_PC_AND_CONTINUE(0);
|
UPDATE_PC_AND_CONTINUE(0);
|
||||||
default:
|
default:
|
||||||
@ -1376,23 +1344,17 @@ run:
|
|||||||
|
|
||||||
#define COMPARISON_OP(name, comparison) \
|
#define COMPARISON_OP(name, comparison) \
|
||||||
CASE(_if_icmp##name): { \
|
CASE(_if_icmp##name): { \
|
||||||
const bool cmp = (STACK_INT(-2) comparison STACK_INT(-1)); \
|
int skip = (STACK_INT(-2) comparison STACK_INT(-1)) \
|
||||||
int skip = cmp \
|
|
||||||
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
||||||
address branch_pc = pc; \
|
address branch_pc = pc; \
|
||||||
/* Profile branch. */ \
|
|
||||||
BI_PROFILE_UPDATE_BRANCH(/*is_taken=*/cmp); \
|
|
||||||
UPDATE_PC_AND_TOS(skip, -2); \
|
UPDATE_PC_AND_TOS(skip, -2); \
|
||||||
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
||||||
CONTINUE; \
|
CONTINUE; \
|
||||||
} \
|
} \
|
||||||
CASE(_if##name): { \
|
CASE(_if##name): { \
|
||||||
const bool cmp = (STACK_INT(-1) comparison 0); \
|
int skip = (STACK_INT(-1) comparison 0) \
|
||||||
int skip = cmp \
|
|
||||||
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
||||||
address branch_pc = pc; \
|
address branch_pc = pc; \
|
||||||
/* Profile branch. */ \
|
|
||||||
BI_PROFILE_UPDATE_BRANCH(/*is_taken=*/cmp); \
|
|
||||||
UPDATE_PC_AND_TOS(skip, -1); \
|
UPDATE_PC_AND_TOS(skip, -1); \
|
||||||
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
||||||
CONTINUE; \
|
CONTINUE; \
|
||||||
@ -1401,12 +1363,9 @@ run:
|
|||||||
#define COMPARISON_OP2(name, comparison) \
|
#define COMPARISON_OP2(name, comparison) \
|
||||||
COMPARISON_OP(name, comparison) \
|
COMPARISON_OP(name, comparison) \
|
||||||
CASE(_if_acmp##name): { \
|
CASE(_if_acmp##name): { \
|
||||||
const bool cmp = (STACK_OBJECT(-2) comparison STACK_OBJECT(-1)); \
|
int skip = (STACK_OBJECT(-2) comparison STACK_OBJECT(-1)) \
|
||||||
int skip = cmp \
|
|
||||||
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
||||||
address branch_pc = pc; \
|
address branch_pc = pc; \
|
||||||
/* Profile branch. */ \
|
|
||||||
BI_PROFILE_UPDATE_BRANCH(/*is_taken=*/cmp); \
|
|
||||||
UPDATE_PC_AND_TOS(skip, -2); \
|
UPDATE_PC_AND_TOS(skip, -2); \
|
||||||
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
||||||
CONTINUE; \
|
CONTINUE; \
|
||||||
@ -1414,12 +1373,9 @@ run:
|
|||||||
|
|
||||||
#define NULL_COMPARISON_NOT_OP(name) \
|
#define NULL_COMPARISON_NOT_OP(name) \
|
||||||
CASE(_if##name): { \
|
CASE(_if##name): { \
|
||||||
const bool cmp = (!(STACK_OBJECT(-1) == NULL)); \
|
int skip = (!(STACK_OBJECT(-1) == NULL)) \
|
||||||
int skip = cmp \
|
|
||||||
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
||||||
address branch_pc = pc; \
|
address branch_pc = pc; \
|
||||||
/* Profile branch. */ \
|
|
||||||
BI_PROFILE_UPDATE_BRANCH(/*is_taken=*/cmp); \
|
|
||||||
UPDATE_PC_AND_TOS(skip, -1); \
|
UPDATE_PC_AND_TOS(skip, -1); \
|
||||||
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
||||||
CONTINUE; \
|
CONTINUE; \
|
||||||
@ -1427,12 +1383,9 @@ run:
|
|||||||
|
|
||||||
#define NULL_COMPARISON_OP(name) \
|
#define NULL_COMPARISON_OP(name) \
|
||||||
CASE(_if##name): { \
|
CASE(_if##name): { \
|
||||||
const bool cmp = ((STACK_OBJECT(-1) == NULL)); \
|
int skip = ((STACK_OBJECT(-1) == NULL)) \
|
||||||
int skip = cmp \
|
|
||||||
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
? (int16_t)Bytes::get_Java_u2(pc + 1) : 3; \
|
||||||
address branch_pc = pc; \
|
address branch_pc = pc; \
|
||||||
/* Profile branch. */ \
|
|
||||||
BI_PROFILE_UPDATE_BRANCH(/*is_taken=*/cmp); \
|
|
||||||
UPDATE_PC_AND_TOS(skip, -1); \
|
UPDATE_PC_AND_TOS(skip, -1); \
|
||||||
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
DO_BACKEDGE_CHECKS(skip, branch_pc); \
|
||||||
CONTINUE; \
|
CONTINUE; \
|
||||||
@ -1456,13 +1409,10 @@ run:
|
|||||||
int32_t skip;
|
int32_t skip;
|
||||||
key -= low;
|
key -= low;
|
||||||
if (((uint32_t) key > (uint32_t)(high - low))) {
|
if (((uint32_t) key > (uint32_t)(high - low))) {
|
||||||
key = -1;
|
|
||||||
skip = Bytes::get_Java_u4((address)&lpc[0]);
|
skip = Bytes::get_Java_u4((address)&lpc[0]);
|
||||||
} else {
|
} else {
|
||||||
skip = Bytes::get_Java_u4((address)&lpc[key + 3]);
|
skip = Bytes::get_Java_u4((address)&lpc[key + 3]);
|
||||||
}
|
}
|
||||||
// Profile switch.
|
|
||||||
BI_PROFILE_UPDATE_SWITCH(/*switch_index=*/key);
|
|
||||||
// Does this really need a full backedge check (osr)?
|
// Does this really need a full backedge check (osr)?
|
||||||
address branch_pc = pc;
|
address branch_pc = pc;
|
||||||
UPDATE_PC_AND_TOS(skip, -1);
|
UPDATE_PC_AND_TOS(skip, -1);
|
||||||
@ -1476,21 +1426,14 @@ run:
|
|||||||
jint* lpc = (jint*)VMalignWordUp(pc+1);
|
jint* lpc = (jint*)VMalignWordUp(pc+1);
|
||||||
int32_t key = STACK_INT(-1);
|
int32_t key = STACK_INT(-1);
|
||||||
int32_t skip = Bytes::get_Java_u4((address) lpc); /* default amount */
|
int32_t skip = Bytes::get_Java_u4((address) lpc); /* default amount */
|
||||||
// Remember index.
|
|
||||||
int index = -1;
|
|
||||||
int newindex = 0;
|
|
||||||
int32_t npairs = Bytes::get_Java_u4((address) &lpc[1]);
|
int32_t npairs = Bytes::get_Java_u4((address) &lpc[1]);
|
||||||
while (--npairs >= 0) {
|
while (--npairs >= 0) {
|
||||||
lpc += 2;
|
lpc += 2;
|
||||||
if (key == (int32_t)Bytes::get_Java_u4((address)lpc)) {
|
if (key == (int32_t)Bytes::get_Java_u4((address)lpc)) {
|
||||||
skip = Bytes::get_Java_u4((address)&lpc[1]);
|
skip = Bytes::get_Java_u4((address)&lpc[1]);
|
||||||
index = newindex;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
newindex += 1;
|
|
||||||
}
|
}
|
||||||
// Profile switch.
|
|
||||||
BI_PROFILE_UPDATE_SWITCH(/*switch_index=*/index);
|
|
||||||
address branch_pc = pc;
|
address branch_pc = pc;
|
||||||
UPDATE_PC_AND_TOS(skip, -1);
|
UPDATE_PC_AND_TOS(skip, -1);
|
||||||
DO_BACKEDGE_CHECKS(skip, branch_pc);
|
DO_BACKEDGE_CHECKS(skip, branch_pc);
|
||||||
@ -1656,15 +1599,8 @@ run:
|
|||||||
// Seems way more expensive now that we must dispatch
|
// Seems way more expensive now that we must dispatch
|
||||||
//
|
//
|
||||||
if (rhsKlass != elemKlass && !rhsKlass->is_subtype_of(elemKlass)) { // ebx->is...
|
if (rhsKlass != elemKlass && !rhsKlass->is_subtype_of(elemKlass)) { // ebx->is...
|
||||||
// Decrement counter if subtype check failed.
|
|
||||||
BI_PROFILE_SUBTYPECHECK_FAILED(rhsKlass);
|
|
||||||
VM_JAVA_ERROR(vmSymbols::java_lang_ArrayStoreException(), "");
|
VM_JAVA_ERROR(vmSymbols::java_lang_ArrayStoreException(), "");
|
||||||
}
|
}
|
||||||
// Profile checkcast with null_seen and receiver.
|
|
||||||
BI_PROFILE_UPDATE_CHECKCAST(/*null_seen=*/false, rhsKlass);
|
|
||||||
} else {
|
|
||||||
// Profile checkcast with null_seen and receiver.
|
|
||||||
BI_PROFILE_UPDATE_CHECKCAST(/*null_seen=*/true, NULL);
|
|
||||||
}
|
}
|
||||||
((objArrayOop) arrObj)->obj_at_put(index, rhsObject);
|
((objArrayOop) arrObj)->obj_at_put(index, rhsObject);
|
||||||
UPDATE_PC_AND_TOS_AND_CONTINUE(1, -3);
|
UPDATE_PC_AND_TOS_AND_CONTINUE(1, -3);
|
||||||
@ -2175,26 +2111,17 @@ run:
|
|||||||
// Seems way more expensive now that we must dispatch.
|
// Seems way more expensive now that we must dispatch.
|
||||||
//
|
//
|
||||||
if (objKlass != klassOf && !objKlass->is_subtype_of(klassOf)) {
|
if (objKlass != klassOf && !objKlass->is_subtype_of(klassOf)) {
|
||||||
// Decrement counter at checkcast.
|
|
||||||
BI_PROFILE_SUBTYPECHECK_FAILED(objKlass);
|
|
||||||
ResourceMark rm(THREAD);
|
ResourceMark rm(THREAD);
|
||||||
char* message = SharedRuntime::generate_class_cast_message(
|
char* message = SharedRuntime::generate_class_cast_message(
|
||||||
objKlass, klassOf);
|
objKlass, klassOf);
|
||||||
VM_JAVA_ERROR(vmSymbols::java_lang_ClassCastException(), message);
|
VM_JAVA_ERROR(vmSymbols::java_lang_ClassCastException(), message);
|
||||||
}
|
}
|
||||||
// Profile checkcast with null_seen and receiver.
|
|
||||||
BI_PROFILE_UPDATE_CHECKCAST(/*null_seen=*/false, objKlass);
|
|
||||||
} else {
|
|
||||||
// Profile checkcast with null_seen and receiver.
|
|
||||||
BI_PROFILE_UPDATE_CHECKCAST(/*null_seen=*/true, NULL);
|
|
||||||
}
|
}
|
||||||
UPDATE_PC_AND_CONTINUE(3);
|
UPDATE_PC_AND_CONTINUE(3);
|
||||||
|
|
||||||
CASE(_instanceof):
|
CASE(_instanceof):
|
||||||
if (STACK_OBJECT(-1) == NULL) {
|
if (STACK_OBJECT(-1) == NULL) {
|
||||||
SET_STACK_INT(0, -1);
|
SET_STACK_INT(0, -1);
|
||||||
// Profile instanceof with null_seen and receiver.
|
|
||||||
BI_PROFILE_UPDATE_INSTANCEOF(/*null_seen=*/true, NULL);
|
|
||||||
} else {
|
} else {
|
||||||
VERIFY_OOP(STACK_OBJECT(-1));
|
VERIFY_OOP(STACK_OBJECT(-1));
|
||||||
u2 index = Bytes::get_Java_u2(pc+1);
|
u2 index = Bytes::get_Java_u2(pc+1);
|
||||||
@ -2213,11 +2140,7 @@ run:
|
|||||||
SET_STACK_INT(1, -1);
|
SET_STACK_INT(1, -1);
|
||||||
} else {
|
} else {
|
||||||
SET_STACK_INT(0, -1);
|
SET_STACK_INT(0, -1);
|
||||||
// Decrement counter at checkcast.
|
|
||||||
BI_PROFILE_SUBTYPECHECK_FAILED(objKlass);
|
|
||||||
}
|
}
|
||||||
// Profile instanceof with null_seen and receiver.
|
|
||||||
BI_PROFILE_UPDATE_INSTANCEOF(/*null_seen=*/false, objKlass);
|
|
||||||
}
|
}
|
||||||
UPDATE_PC_AND_CONTINUE(3);
|
UPDATE_PC_AND_CONTINUE(3);
|
||||||
|
|
||||||
@ -2394,9 +2317,6 @@ run:
|
|||||||
istate->set_callee_entry_point(method->from_interpreted_entry());
|
istate->set_callee_entry_point(method->from_interpreted_entry());
|
||||||
istate->set_bcp_advance(5);
|
istate->set_bcp_advance(5);
|
||||||
|
|
||||||
// Invokedynamic has got a call counter, just like an invokestatic -> increment!
|
|
||||||
BI_PROFILE_UPDATE_CALL();
|
|
||||||
|
|
||||||
UPDATE_PC_AND_RETURN(0); // I'll be back...
|
UPDATE_PC_AND_RETURN(0); // I'll be back...
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2425,9 +2345,6 @@ run:
|
|||||||
istate->set_callee_entry_point(method->from_interpreted_entry());
|
istate->set_callee_entry_point(method->from_interpreted_entry());
|
||||||
istate->set_bcp_advance(3);
|
istate->set_bcp_advance(3);
|
||||||
|
|
||||||
// Invokehandle has got a call counter, just like a final call -> increment!
|
|
||||||
BI_PROFILE_UPDATE_FINALCALL();
|
|
||||||
|
|
||||||
UPDATE_PC_AND_RETURN(0); // I'll be back...
|
UPDATE_PC_AND_RETURN(0); // I'll be back...
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2453,8 +2370,6 @@ run:
|
|||||||
CHECK_NULL(STACK_OBJECT(-(cache->parameter_size())));
|
CHECK_NULL(STACK_OBJECT(-(cache->parameter_size())));
|
||||||
if (cache->is_vfinal()) {
|
if (cache->is_vfinal()) {
|
||||||
callee = cache->f2_as_vfinal_method();
|
callee = cache->f2_as_vfinal_method();
|
||||||
// Profile 'special case of invokeinterface' final call.
|
|
||||||
BI_PROFILE_UPDATE_FINALCALL();
|
|
||||||
} else {
|
} else {
|
||||||
// Get receiver.
|
// Get receiver.
|
||||||
int parms = cache->parameter_size();
|
int parms = cache->parameter_size();
|
||||||
@ -2463,8 +2378,6 @@ run:
|
|||||||
VERIFY_OOP(rcvr);
|
VERIFY_OOP(rcvr);
|
||||||
Klass* rcvrKlass = rcvr->klass();
|
Klass* rcvrKlass = rcvr->klass();
|
||||||
callee = (Method*) rcvrKlass->method_at_vtable(cache->f2_as_index());
|
callee = (Method*) rcvrKlass->method_at_vtable(cache->f2_as_index());
|
||||||
// Profile 'special case of invokeinterface' virtual call.
|
|
||||||
BI_PROFILE_UPDATE_VIRTUALCALL(rcvrKlass);
|
|
||||||
}
|
}
|
||||||
} else if (cache->is_vfinal()) {
|
} else if (cache->is_vfinal()) {
|
||||||
// private interface method invocations
|
// private interface method invocations
|
||||||
@ -2551,9 +2464,6 @@ run:
|
|||||||
handle_exception);
|
handle_exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Profile virtual call.
|
|
||||||
BI_PROFILE_UPDATE_VIRTUALCALL(rcvr->klass());
|
|
||||||
|
|
||||||
istate->set_callee(callee);
|
istate->set_callee(callee);
|
||||||
istate->set_callee_entry_point(callee->from_interpreted_entry());
|
istate->set_callee_entry_point(callee->from_interpreted_entry());
|
||||||
#ifdef VM_JVMTI
|
#ifdef VM_JVMTI
|
||||||
@ -2587,8 +2497,6 @@ run:
|
|||||||
CHECK_NULL(STACK_OBJECT(-(cache->parameter_size())));
|
CHECK_NULL(STACK_OBJECT(-(cache->parameter_size())));
|
||||||
if (cache->is_vfinal()) {
|
if (cache->is_vfinal()) {
|
||||||
callee = cache->f2_as_vfinal_method();
|
callee = cache->f2_as_vfinal_method();
|
||||||
// Profile final call.
|
|
||||||
BI_PROFILE_UPDATE_FINALCALL();
|
|
||||||
} else {
|
} else {
|
||||||
// get receiver
|
// get receiver
|
||||||
int parms = cache->parameter_size();
|
int parms = cache->parameter_size();
|
||||||
@ -2618,17 +2526,12 @@ run:
|
|||||||
Because vtables have the same offset for ArrayKlass and InstanceKlass.
|
Because vtables have the same offset for ArrayKlass and InstanceKlass.
|
||||||
*/
|
*/
|
||||||
callee = (Method*) rcvrKlass->method_at_vtable(cache->f2_as_index());
|
callee = (Method*) rcvrKlass->method_at_vtable(cache->f2_as_index());
|
||||||
// Profile virtual call.
|
|
||||||
BI_PROFILE_UPDATE_VIRTUALCALL(rcvrKlass);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((Bytecodes::Code)opcode == Bytecodes::_invokespecial) {
|
if ((Bytecodes::Code)opcode == Bytecodes::_invokespecial) {
|
||||||
CHECK_NULL(STACK_OBJECT(-(cache->parameter_size())));
|
CHECK_NULL(STACK_OBJECT(-(cache->parameter_size())));
|
||||||
}
|
}
|
||||||
callee = cache->f1_as_method();
|
callee = cache->f1_as_method();
|
||||||
|
|
||||||
// Profile call.
|
|
||||||
BI_PROFILE_UPDATE_CALL();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
istate->set_callee(callee);
|
istate->set_callee(callee);
|
||||||
@ -2683,8 +2586,6 @@ run:
|
|||||||
CASE(_goto):
|
CASE(_goto):
|
||||||
{
|
{
|
||||||
int16_t offset = (int16_t)Bytes::get_Java_u2(pc + 1);
|
int16_t offset = (int16_t)Bytes::get_Java_u2(pc + 1);
|
||||||
// Profile jump.
|
|
||||||
BI_PROFILE_UPDATE_JUMP();
|
|
||||||
address branch_pc = pc;
|
address branch_pc = pc;
|
||||||
UPDATE_PC(offset);
|
UPDATE_PC(offset);
|
||||||
DO_BACKEDGE_CHECKS(offset, branch_pc);
|
DO_BACKEDGE_CHECKS(offset, branch_pc);
|
||||||
@ -2701,8 +2602,6 @@ run:
|
|||||||
CASE(_goto_w):
|
CASE(_goto_w):
|
||||||
{
|
{
|
||||||
int32_t offset = Bytes::get_Java_u4(pc + 1);
|
int32_t offset = Bytes::get_Java_u4(pc + 1);
|
||||||
// Profile jump.
|
|
||||||
BI_PROFILE_UPDATE_JUMP();
|
|
||||||
address branch_pc = pc;
|
address branch_pc = pc;
|
||||||
UPDATE_PC(offset);
|
UPDATE_PC(offset);
|
||||||
DO_BACKEDGE_CHECKS(offset, branch_pc);
|
DO_BACKEDGE_CHECKS(offset, branch_pc);
|
||||||
@ -2712,9 +2611,6 @@ run:
|
|||||||
/* return from a jsr or jsr_w */
|
/* return from a jsr or jsr_w */
|
||||||
|
|
||||||
CASE(_ret): {
|
CASE(_ret): {
|
||||||
// Profile ret.
|
|
||||||
BI_PROFILE_UPDATE_RET(/*bci=*/((int)(intptr_t)(LOCALS_ADDR(pc[1]))));
|
|
||||||
// Now, update the pc.
|
|
||||||
pc = istate->method()->code_base() + (intptr_t)(LOCALS_ADDR(pc[1]));
|
pc = istate->method()->code_base() + (intptr_t)(LOCALS_ADDR(pc[1]));
|
||||||
UPDATE_PC_AND_CONTINUE(0);
|
UPDATE_PC_AND_CONTINUE(0);
|
||||||
}
|
}
|
||||||
@ -2797,9 +2693,6 @@ run:
|
|||||||
}
|
}
|
||||||
// for AbortVMOnException flag
|
// for AbortVMOnException flag
|
||||||
Exceptions::debug_check_abort(except_oop);
|
Exceptions::debug_check_abort(except_oop);
|
||||||
|
|
||||||
// Update profiling data.
|
|
||||||
BI_PROFILE_ALIGN_TO_CURRENT_BCI();
|
|
||||||
goto run;
|
goto run;
|
||||||
}
|
}
|
||||||
if (log_is_enabled(Info, exceptions)) {
|
if (log_is_enabled(Info, exceptions)) {
|
||||||
@ -3393,7 +3286,6 @@ BytecodeInterpreter::print() {
|
|||||||
char *method_name = _method->name_and_sig_as_C_string();
|
char *method_name = _method->name_and_sig_as_C_string();
|
||||||
tty->print_cr("method: " INTPTR_FORMAT "[ %s ]", (uintptr_t) this->_method, method_name);
|
tty->print_cr("method: " INTPTR_FORMAT "[ %s ]", (uintptr_t) this->_method, method_name);
|
||||||
}
|
}
|
||||||
tty->print_cr("mdx: " INTPTR_FORMAT, (uintptr_t) this->_mdx);
|
|
||||||
tty->print_cr("stack: " INTPTR_FORMAT, (uintptr_t) this->_stack);
|
tty->print_cr("stack: " INTPTR_FORMAT, (uintptr_t) this->_stack);
|
||||||
tty->print_cr("msg: %s", C_msg(this->_msg));
|
tty->print_cr("msg: %s", C_msg(this->_msg));
|
||||||
tty->print_cr("result_to_call._callee: " INTPTR_FORMAT, (uintptr_t) this->_result._to_call._callee);
|
tty->print_cr("result_to_call._callee: " INTPTR_FORMAT, (uintptr_t) this->_result._to_call._callee);
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#define SHARE_INTERPRETER_BYTECODEINTERPRETER_HPP
|
#define SHARE_INTERPRETER_BYTECODEINTERPRETER_HPP
|
||||||
|
|
||||||
#include "memory/allocation.hpp"
|
#include "memory/allocation.hpp"
|
||||||
#include "oops/methodData.hpp"
|
|
||||||
#include "oops/method.hpp"
|
#include "oops/method.hpp"
|
||||||
#include "runtime/basicLock.hpp"
|
#include "runtime/basicLock.hpp"
|
||||||
#include "runtime/frame.hpp"
|
#include "runtime/frame.hpp"
|
||||||
@ -110,7 +109,6 @@ private:
|
|||||||
ConstantPoolCache* _constants; // constant pool cache
|
ConstantPoolCache* _constants; // constant pool cache
|
||||||
Method* _method; // method being executed
|
Method* _method; // method being executed
|
||||||
oop _mirror; // mirror to klass containing method
|
oop _mirror; // mirror to klass containing method
|
||||||
DataLayout* _mdx; // compiler profiling data for current bytecode
|
|
||||||
intptr_t* _stack; // expression stack
|
intptr_t* _stack; // expression stack
|
||||||
messages _msg; // frame manager <-> interpreter message
|
messages _msg; // frame manager <-> interpreter message
|
||||||
frame_manager_message _result; // result to frame manager
|
frame_manager_message _result; // result to frame manager
|
||||||
@ -188,8 +186,6 @@ inline intptr_t* locals() { return _locals; }
|
|||||||
|
|
||||||
inline ConstantPoolCache* constants() { return _constants; }
|
inline ConstantPoolCache* constants() { return _constants; }
|
||||||
inline Method* method() { return _method; }
|
inline Method* method() { return _method; }
|
||||||
inline DataLayout* mdx() { return _mdx; }
|
|
||||||
inline void set_mdx(DataLayout *new_mdx) { _mdx = new_mdx; }
|
|
||||||
|
|
||||||
inline messages msg() { return _msg; }
|
inline messages msg() { return _msg; }
|
||||||
inline void set_msg(messages new_msg) { _msg = new_msg; }
|
inline void set_msg(messages new_msg) { _msg = new_msg; }
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
|
|
||||||
* Copyright (c) 2012, 2014 SAP SE. 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
|
|
||||||
* under the terms of the GNU General Public License version 2 only, as
|
|
||||||
* published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
* version 2 for more details (a copy is included in the LICENSE file that
|
|
||||||
* accompanied this code).
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License version
|
|
||||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
||||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*
|
|
||||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
||||||
* or visit www.oracle.com if you need additional information or have any
|
|
||||||
* questions.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This file defines a set of macros which are used by the c++-interpreter
|
|
||||||
// for updating a method's methodData object.
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef SHARE_INTERPRETER_BYTECODEINTERPRETERPROFILING_HPP
|
|
||||||
#define SHARE_INTERPRETER_BYTECODEINTERPRETERPROFILING_HPP
|
|
||||||
|
|
||||||
// Empty dummy implementations if profiling code is switched off. //////////////
|
|
||||||
|
|
||||||
#define SET_MDX(mdx)
|
|
||||||
|
|
||||||
#define BI_PROFILE_GET_OR_CREATE_METHOD_DATA(exception_handler) \
|
|
||||||
if (ProfileInterpreter) { \
|
|
||||||
ShouldNotReachHere(); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define BI_PROFILE_ALIGN_TO_CURRENT_BCI()
|
|
||||||
|
|
||||||
#define BI_PROFILE_UPDATE_JUMP()
|
|
||||||
#define BI_PROFILE_UPDATE_BRANCH(is_taken)
|
|
||||||
#define BI_PROFILE_UPDATE_RET(bci)
|
|
||||||
#define BI_PROFILE_SUBTYPECHECK_FAILED(receiver)
|
|
||||||
#define BI_PROFILE_UPDATE_CHECKCAST(null_seen, receiver)
|
|
||||||
#define BI_PROFILE_UPDATE_INSTANCEOF(null_seen, receiver)
|
|
||||||
#define BI_PROFILE_UPDATE_CALL()
|
|
||||||
#define BI_PROFILE_UPDATE_FINALCALL()
|
|
||||||
#define BI_PROFILE_UPDATE_VIRTUALCALL(receiver)
|
|
||||||
#define BI_PROFILE_UPDATE_SWITCH(switch_index)
|
|
||||||
|
|
||||||
#endif // SHARE_INTERPRETER_BYTECODEINTERPRETERPROFILING_HPP
|
|
Loading…
x
Reference in New Issue
Block a user