comparison src/share/vm/runtime/deoptimization.cpp @ 6197:d2a62e0f25eb

6995781: Native Memory Tracking (Phase 1) 7151532: DCmd for hotspot native memory tracking Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd Reviewed-by: acorn, coleenp, fparain
author zgu
date Thu, 28 Jun 2012 17:03:16 -0400
parents aa3d708d67c4
children 1d7922586cf6
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
99 _caller_adjustment = caller_adjustment; 99 _caller_adjustment = caller_adjustment;
100 _caller_actual_parameters = caller_actual_parameters; 100 _caller_actual_parameters = caller_actual_parameters;
101 _number_of_frames = number_of_frames; 101 _number_of_frames = number_of_frames;
102 _frame_sizes = frame_sizes; 102 _frame_sizes = frame_sizes;
103 _frame_pcs = frame_pcs; 103 _frame_pcs = frame_pcs;
104 _register_block = NEW_C_HEAP_ARRAY(intptr_t, RegisterMap::reg_count * 2); 104 _register_block = NEW_C_HEAP_ARRAY(intptr_t, RegisterMap::reg_count * 2, mtCompiler);
105 _return_type = return_type; 105 _return_type = return_type;
106 _initial_info = 0; 106 _initial_info = 0;
107 // PD (x86 only) 107 // PD (x86 only)
108 _counter_temp = 0; 108 _counter_temp = 0;
109 _unpack_kind = 0; 109 _unpack_kind = 0;
112 _total_frame_sizes = size_of_frames(); 112 _total_frame_sizes = size_of_frames();
113 } 113 }
114 114
115 115
116 Deoptimization::UnrollBlock::~UnrollBlock() { 116 Deoptimization::UnrollBlock::~UnrollBlock() {
117 FREE_C_HEAP_ARRAY(intptr_t, _frame_sizes); 117 FREE_C_HEAP_ARRAY(intptr_t, _frame_sizes, mtCompiler);
118 FREE_C_HEAP_ARRAY(intptr_t, _frame_pcs); 118 FREE_C_HEAP_ARRAY(intptr_t, _frame_pcs, mtCompiler);
119 FREE_C_HEAP_ARRAY(intptr_t, _register_block); 119 FREE_C_HEAP_ARRAY(intptr_t, _register_block, mtCompiler);
120 } 120 }
121 121
122 122
123 intptr_t* Deoptimization::UnrollBlock::value_addr_at(int register_number) const { 123 intptr_t* Deoptimization::UnrollBlock::value_addr_at(int register_number) const {
124 assert(register_number < RegisterMap::reg_count, "checking register number"); 124 assert(register_number < RegisterMap::reg_count, "checking register number");
356 356
357 int number_of_frames = array->frames(); 357 int number_of_frames = array->frames();
358 358
359 // Compute the vframes' sizes. Note that frame_sizes[] entries are ordered from outermost to innermost 359 // Compute the vframes' sizes. Note that frame_sizes[] entries are ordered from outermost to innermost
360 // virtual activation, which is the reverse of the elements in the vframes array. 360 // virtual activation, which is the reverse of the elements in the vframes array.
361 intptr_t* frame_sizes = NEW_C_HEAP_ARRAY(intptr_t, number_of_frames); 361 intptr_t* frame_sizes = NEW_C_HEAP_ARRAY(intptr_t, number_of_frames, mtCompiler);
362 // +1 because we always have an interpreter return address for the final slot. 362 // +1 because we always have an interpreter return address for the final slot.
363 address* frame_pcs = NEW_C_HEAP_ARRAY(address, number_of_frames + 1); 363 address* frame_pcs = NEW_C_HEAP_ARRAY(address, number_of_frames + 1, mtCompiler);
364 int popframe_extra_args = 0; 364 int popframe_extra_args = 0;
365 // Create an interpreter return address for the stub to use as its return 365 // Create an interpreter return address for the stub to use as its return
366 // address so the skeletal frames are perfectly walkable 366 // address so the skeletal frames are perfectly walkable
367 frame_pcs[number_of_frames] = Interpreter::deopt_entry(vtos, 0); 367 frame_pcs[number_of_frames] = Interpreter::deopt_entry(vtos, 0);
368 368