8007288: Additional WB API for compiler's testing

Reviewed-by: kvn, vlivanov
This commit is contained in:
Igor Ignatyev 2013-04-09 09:54:17 -07:00
parent 12be356d81
commit ca90185607
19 changed files with 376 additions and 75 deletions

View file

@ -660,29 +660,9 @@ MethodData::MethodData(methodHandle method, int size, TRAPS) {
// Set the method back-pointer.
_method = method();
_invocation_counter.init();
_backedge_counter.init();
_invocation_counter_start = 0;
_backedge_counter_start = 0;
_num_loops = 0;
_num_blocks = 0;
_highest_comp_level = 0;
_highest_osr_comp_level = 0;
_would_profile = true;
init();
set_creation_mileage(mileage_of(method()));
// Initialize flags and trap history.
_nof_decompiles = 0;
_nof_overflow_recompiles = 0;
_nof_overflow_traps = 0;
_eflags = 0;
_arg_local = 0;
_arg_stack = 0;
_arg_returned = 0;
assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align");
Copy::zero_to_words((HeapWord*) &_trap_hist,
sizeof(_trap_hist) / sizeof(HeapWord));
// Go through the bytecodes and allocate and initialize the
// corresponding data cells.
int data_size = 0;
@ -721,7 +701,27 @@ MethodData::MethodData(methodHandle method, int size, TRAPS) {
post_initialize(&stream);
set_size(object_size);
}
void MethodData::init() {
_invocation_counter.init();
_backedge_counter.init();
_invocation_counter_start = 0;
_backedge_counter_start = 0;
_num_loops = 0;
_num_blocks = 0;
_highest_comp_level = 0;
_highest_osr_comp_level = 0;
_would_profile = true;
// Initialize flags and trap history.
_nof_decompiles = 0;
_nof_overflow_recompiles = 0;
_nof_overflow_traps = 0;
clear_escape_info();
assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align");
Copy::zero_to_words((HeapWord*) &_trap_hist,
sizeof(_trap_hist) / sizeof(HeapWord));
}
// Get a measure of how much mileage the method has on it.