650 No_Safepoint_Verifier no_safepoint; // init function atomic wrt GC |
650 No_Safepoint_Verifier no_safepoint; // init function atomic wrt GC |
651 ResourceMark rm; |
651 ResourceMark rm; |
652 // Set the method back-pointer. |
652 // Set the method back-pointer. |
653 _method = method(); |
653 _method = method(); |
654 |
654 |
655 if (TieredCompilation) { |
655 _invocation_counter.init(); |
656 _invocation_counter.init(); |
656 _backedge_counter.init(); |
657 _backedge_counter.init(); |
657 _invocation_counter_start = 0; |
658 _invocation_counter_start = 0; |
658 _backedge_counter_start = 0; |
659 _backedge_counter_start = 0; |
659 _num_loops = 0; |
660 _num_loops = 0; |
660 _num_blocks = 0; |
661 _num_blocks = 0; |
661 _highest_comp_level = 0; |
662 _highest_comp_level = 0; |
662 _highest_osr_comp_level = 0; |
663 _highest_osr_comp_level = 0; |
663 _would_profile = true; |
664 _would_profile = true; |
|
665 } |
|
666 set_creation_mileage(mileage_of(method())); |
664 set_creation_mileage(mileage_of(method())); |
667 |
665 |
668 // Initialize flags and trap history. |
666 // Initialize flags and trap history. |
669 _nof_decompiles = 0; |
667 _nof_decompiles = 0; |
670 _nof_overflow_recompiles = 0; |
668 _nof_overflow_recompiles = 0; |
671 _nof_overflow_traps = 0; |
669 _nof_overflow_traps = 0; |
|
670 _eflags = 0; |
|
671 _arg_local = 0; |
|
672 _arg_stack = 0; |
|
673 _arg_returned = 0; |
672 assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align"); |
674 assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align"); |
673 Copy::zero_to_words((HeapWord*) &_trap_hist, |
675 Copy::zero_to_words((HeapWord*) &_trap_hist, |
674 sizeof(_trap_hist) / sizeof(HeapWord)); |
676 sizeof(_trap_hist) / sizeof(HeapWord)); |
675 |
677 |
676 // Go through the bytecodes and allocate and initialize the |
678 // Go through the bytecodes and allocate and initialize the |
677 // corresponding data cells. |
679 // corresponding data cells. |
678 int data_size = 0; |
680 int data_size = 0; |
679 int empty_bc_count = 0; // number of bytecodes lacking data |
681 int empty_bc_count = 0; // number of bytecodes lacking data |
|
682 _data[0] = 0; // apparently not set below. |
680 BytecodeStream stream(method); |
683 BytecodeStream stream(method); |
681 Bytecodes::Code c; |
684 Bytecodes::Code c; |
682 while ((c = stream.next()) >= 0) { |
685 while ((c = stream.next()) >= 0) { |
683 int size_in_bytes = initialize_data(&stream, data_size); |
686 int size_in_bytes = initialize_data(&stream, data_size); |
684 data_size += size_in_bytes; |
687 data_size += size_in_bytes; |