mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
Merge
This commit is contained in:
commit
206c37a5e6
9 changed files with 108 additions and 29 deletions
|
@ -430,9 +430,18 @@ IRT_ENTRY(address, InterpreterRuntime::exception_handler_for_exception(JavaThrea
|
|||
|
||||
// tracing
|
||||
if (TraceExceptions) {
|
||||
ttyLocker ttyl;
|
||||
ResourceMark rm(thread);
|
||||
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", h_exception->print_value_string(), (address)h_exception());
|
||||
Symbol* message = java_lang_Throwable::detail_message(h_exception());
|
||||
ttyLocker ttyl; // Lock after getting the detail message
|
||||
if (message != NULL) {
|
||||
tty->print_cr("Exception <%s: %s> (" INTPTR_FORMAT ")",
|
||||
h_exception->print_value_string(), message->as_C_string(),
|
||||
(address)h_exception());
|
||||
} else {
|
||||
tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")",
|
||||
h_exception->print_value_string(),
|
||||
(address)h_exception());
|
||||
}
|
||||
tty->print_cr(" thrown in interpreter method <%s>", h_method->print_value_string());
|
||||
tty->print_cr(" at bci %d for thread " INTPTR_FORMAT, current_bci, thread);
|
||||
}
|
||||
|
|
|
@ -244,10 +244,8 @@ void InterpreterOopMap::print() const {
|
|||
method()->print_value();
|
||||
tty->print(" @ %d = [%d] { ", bci(), n);
|
||||
for (int i = 0; i < n; i++) {
|
||||
#ifdef ENABLE_ZAP_DEAD_LOCALS
|
||||
if (is_dead(i)) tty->print("%d+ ", i);
|
||||
else
|
||||
#endif
|
||||
if (is_oop(i)) tty->print("%d ", i);
|
||||
}
|
||||
tty->print_cr("}");
|
||||
|
@ -402,13 +400,11 @@ void OopMapCacheEntry::set_mask(CellTypeState *vars, CellTypeState *stack, int s
|
|||
value |= (mask << oop_bit_number );
|
||||
}
|
||||
|
||||
#ifdef ENABLE_ZAP_DEAD_LOCALS
|
||||
// set dead bit
|
||||
if (!cell->is_live()) {
|
||||
value |= (mask << dead_bit_number);
|
||||
assert(!cell->is_reference(), "dead value marked as oop");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// make sure last word is stored
|
||||
|
|
|
@ -66,19 +66,15 @@ class InterpreterOopMap: ResourceObj {
|
|||
|
||||
public:
|
||||
enum {
|
||||
N = 2, // the number of words reserved
|
||||
N = 4, // the number of words reserved
|
||||
// for inlined mask storage
|
||||
small_mask_limit = N * BitsPerWord, // the maximum number of bits
|
||||
// available for small masks,
|
||||
// small_mask_limit can be set to 0
|
||||
// for testing bit_mask allocation
|
||||
|
||||
#ifdef ENABLE_ZAP_DEAD_LOCALS
|
||||
bits_per_entry = 2,
|
||||
dead_bit_number = 1,
|
||||
#else
|
||||
bits_per_entry = 1,
|
||||
#endif
|
||||
oop_bit_number = 0
|
||||
};
|
||||
|
||||
|
@ -119,10 +115,6 @@ class InterpreterOopMap: ResourceObj {
|
|||
|
||||
void set_expression_stack_size(int sz) { _expression_stack_size = sz; }
|
||||
|
||||
#ifdef ENABLE_ZAP_DEAD_LOCALS
|
||||
bool is_dead(int offset) const { return (entry_at(offset) & (1 << dead_bit_number)) != 0; }
|
||||
#endif
|
||||
|
||||
// Lookup
|
||||
bool match(methodHandle method, int bci) const { return _method == method() && _bci == bci; }
|
||||
bool is_empty() const;
|
||||
|
@ -144,6 +136,7 @@ class InterpreterOopMap: ResourceObj {
|
|||
void print() const;
|
||||
|
||||
int number_of_entries() const { return mask_size() / bits_per_entry; }
|
||||
bool is_dead(int offset) const { return (entry_at(offset) & (1 << dead_bit_number)) != 0; }
|
||||
bool is_oop (int offset) const { return (entry_at(offset) & (1 << oop_bit_number )) != 0; }
|
||||
|
||||
int expression_stack_size() const { return _expression_stack_size; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue