src/share/vm/oops/methodData.cpp

changeset 4908
b84fd7d73702
parent 4860
46f6f063b272
child 4938
8df6ddda8090
     1.1 --- a/src/share/vm/oops/methodData.cpp	Mon Apr 08 07:40:08 2013 -0700
     1.2 +++ b/src/share/vm/oops/methodData.cpp	Tue Apr 09 09:54:17 2013 -0700
     1.3 @@ -660,29 +660,9 @@
     1.4    // Set the method back-pointer.
     1.5    _method = method();
     1.6  
     1.7 -  _invocation_counter.init();
     1.8 -  _backedge_counter.init();
     1.9 -  _invocation_counter_start = 0;
    1.10 -  _backedge_counter_start = 0;
    1.11 -  _num_loops = 0;
    1.12 -  _num_blocks = 0;
    1.13 -  _highest_comp_level = 0;
    1.14 -  _highest_osr_comp_level = 0;
    1.15 -  _would_profile = true;
    1.16 +  init();
    1.17    set_creation_mileage(mileage_of(method()));
    1.18  
    1.19 -  // Initialize flags and trap history.
    1.20 -  _nof_decompiles = 0;
    1.21 -  _nof_overflow_recompiles = 0;
    1.22 -  _nof_overflow_traps = 0;
    1.23 -  _eflags = 0;
    1.24 -  _arg_local = 0;
    1.25 -  _arg_stack = 0;
    1.26 -  _arg_returned = 0;
    1.27 -  assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align");
    1.28 -  Copy::zero_to_words((HeapWord*) &_trap_hist,
    1.29 -                      sizeof(_trap_hist) / sizeof(HeapWord));
    1.30 -
    1.31    // Go through the bytecodes and allocate and initialize the
    1.32    // corresponding data cells.
    1.33    int data_size = 0;
    1.34 @@ -721,7 +701,27 @@
    1.35    post_initialize(&stream);
    1.36  
    1.37    set_size(object_size);
    1.38 +}
    1.39  
    1.40 +void MethodData::init() {
    1.41 +  _invocation_counter.init();
    1.42 +  _backedge_counter.init();
    1.43 +  _invocation_counter_start = 0;
    1.44 +  _backedge_counter_start = 0;
    1.45 +  _num_loops = 0;
    1.46 +  _num_blocks = 0;
    1.47 +  _highest_comp_level = 0;
    1.48 +  _highest_osr_comp_level = 0;
    1.49 +  _would_profile = true;
    1.50 +
    1.51 +  // Initialize flags and trap history.
    1.52 +  _nof_decompiles = 0;
    1.53 +  _nof_overflow_recompiles = 0;
    1.54 +  _nof_overflow_traps = 0;
    1.55 +  clear_escape_info();
    1.56 +  assert(sizeof(_trap_hist) % sizeof(HeapWord) == 0, "align");
    1.57 +  Copy::zero_to_words((HeapWord*) &_trap_hist,
    1.58 +                      sizeof(_trap_hist) / sizeof(HeapWord));
    1.59  }
    1.60  
    1.61  // Get a measure of how much mileage the method has on it.

mercurial