src/share/vm/oops/methodData.cpp

Print this page

        

*** 650,682 **** No_Safepoint_Verifier no_safepoint; // init function atomic wrt GC ResourceMark rm; // 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; 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; int empty_bc_count = 0; // number of bytecodes lacking data _data[0] = 0; // apparently not set below. --- 650,662 ---- No_Safepoint_Verifier no_safepoint; // init function atomic wrt GC ResourceMark rm; // Set the method back-pointer. _method = method(); ! init(); set_creation_mileage(mileage_of(method())); // Go through the bytecodes and allocate and initialize the // corresponding data cells. int data_size = 0; int empty_bc_count = 0; // number of bytecodes lacking data _data[0] = 0; // apparently not set below.
*** 711,721 **** --- 691,721 ---- _hint_di = first_di(); 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. int MethodData::mileage_of(Method* method) { int mileage = 0;