Mercurial > hg > graal-compiler
comparison src/share/vm/oops/methodData.cpp @ 9080:b84fd7d73702
8007288: Additional WB API for compiler's testing
Reviewed-by: kvn, vlivanov
author | iignatyev |
---|---|
date | Tue, 09 Apr 2013 09:54:17 -0700 |
parents | 46f6f063b272 |
children | 89e4d67fdd2a 8df6ddda8090 |
comparison
equal
deleted
inserted
replaced
9079:f67065f02409 | 9080:b84fd7d73702 |
---|---|
658 No_Safepoint_Verifier no_safepoint; // init function atomic wrt GC | 658 No_Safepoint_Verifier no_safepoint; // init function atomic wrt GC |
659 ResourceMark rm; | 659 ResourceMark rm; |
660 // Set the method back-pointer. | 660 // Set the method back-pointer. |
661 _method = method(); | 661 _method = method(); |
662 | 662 |
663 _invocation_counter.init(); | 663 init(); |
664 _backedge_counter.init(); | |
665 _invocation_counter_start = 0; | |
666 _backedge_counter_start = 0; | |
667 _num_loops = 0; | |
668 _num_blocks = 0; | |
669 _highest_comp_level = 0; | |
670 _highest_osr_comp_level = 0; | |
671 _would_profile = true; | |
672 set_creation_mileage(mileage_of(method())); | 664 set_creation_mileage(mileage_of(method())); |
673 | |
674 // Initialize flags and trap history. | |
675 _nof_decompiles = 0; | |
676 _nof_overflow_recompiles = 0; | |
677 _nof_overflow_traps = 0; | |
678 _eflags = 0; | |
679 _arg_local = 0; | |
680 _arg_stack = 0; | |
681 _arg_returned = 0; | |
682 assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align"); | |
683 Copy::zero_to_words((HeapWord*) &_trap_hist, | |
684 sizeof(_trap_hist) / sizeof(HeapWord)); | |
685 | 665 |
686 // Go through the bytecodes and allocate and initialize the | 666 // Go through the bytecodes and allocate and initialize the |
687 // corresponding data cells. | 667 // corresponding data cells. |
688 int data_size = 0; | 668 int data_size = 0; |
689 int empty_bc_count = 0; // number of bytecodes lacking data | 669 int empty_bc_count = 0; // number of bytecodes lacking data |
719 _hint_di = first_di(); | 699 _hint_di = first_di(); |
720 | 700 |
721 post_initialize(&stream); | 701 post_initialize(&stream); |
722 | 702 |
723 set_size(object_size); | 703 set_size(object_size); |
724 | 704 } |
705 | |
706 void MethodData::init() { | |
707 _invocation_counter.init(); | |
708 _backedge_counter.init(); | |
709 _invocation_counter_start = 0; | |
710 _backedge_counter_start = 0; | |
711 _num_loops = 0; | |
712 _num_blocks = 0; | |
713 _highest_comp_level = 0; | |
714 _highest_osr_comp_level = 0; | |
715 _would_profile = true; | |
716 | |
717 // Initialize flags and trap history. | |
718 _nof_decompiles = 0; | |
719 _nof_overflow_recompiles = 0; | |
720 _nof_overflow_traps = 0; | |
721 clear_escape_info(); | |
722 assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align"); | |
723 Copy::zero_to_words((HeapWord*) &_trap_hist, | |
724 sizeof(_trap_hist) / sizeof(HeapWord)); | |
725 } | 725 } |
726 | 726 |
727 // Get a measure of how much mileage the method has on it. | 727 // Get a measure of how much mileage the method has on it. |
728 int MethodData::mileage_of(Method* method) { | 728 int MethodData::mileage_of(Method* method) { |
729 int mileage = 0; | 729 int mileage = 0; |