300 void found_bad_method_frame(); 301 302 void fill_from_interpreter_frame(); 303 bool fill_from_frame(); 304 305 // Helper routine for security_get_caller_frame 306 void skip_prefixed_method_and_wrappers(); 307 308 public: 309 // Constructor 310 vframeStreamCommon(JavaThread* thread) : _reg_map(thread, false) { 311 _thread = thread; 312 } 313 314 // Accessors 315 Method* method() const { return _method; } 316 int bci() const { return _bci; } 317 intptr_t* frame_id() const { return _frame.id(); } 318 address frame_pc() const { return _frame.pc(); } 319 320 CodeBlob* cb() const { return _frame.cb(); } 321 nmethod* nm() const { 322 assert( cb() != NULL && cb()->is_nmethod(), "usage"); 323 return (nmethod*) cb(); 324 } 325 326 // Frame type 327 bool is_interpreted_frame() const { return _frame.is_interpreted_frame(); } 328 bool is_entry_frame() const { return _frame.is_entry_frame(); } 329 330 // Iteration 331 void next() { 332 // handle frames with inlining 333 if (_mode == compiled_mode && fill_in_compiled_inlined_sender()) return; 334 335 // handle general case 336 do { 337 _frame = _frame.sender(&_reg_map); 338 } while (!fill_from_frame()); 339 } | 300 void found_bad_method_frame(); 301 302 void fill_from_interpreter_frame(); 303 bool fill_from_frame(); 304 305 // Helper routine for security_get_caller_frame 306 void skip_prefixed_method_and_wrappers(); 307 308 public: 309 // Constructor 310 vframeStreamCommon(JavaThread* thread) : _reg_map(thread, false) { 311 _thread = thread; 312 } 313 314 // Accessors 315 Method* method() const { return _method; } 316 int bci() const { return _bci; } 317 intptr_t* frame_id() const { return _frame.id(); } 318 address frame_pc() const { return _frame.pc(); } 319 320 javaVFrame* java_frame() { 321 vframe* vf = vframe::new_vframe(&_frame, &_reg_map, _thread); 322 if (vf->is_java_frame()) { 323 return (javaVFrame*)vf; 324 } 325 return NULL; 326 } 327 328 CodeBlob* cb() const { return _frame.cb(); } 329 nmethod* nm() const { 330 assert( cb() != NULL && cb()->is_nmethod(), "usage"); 331 return (nmethod*) cb(); 332 } 333 334 // Frame type 335 bool is_interpreted_frame() const { return _frame.is_interpreted_frame(); } 336 bool is_entry_frame() const { return _frame.is_entry_frame(); } 337 338 // Iteration 339 void next() { 340 // handle frames with inlining 341 if (_mode == compiled_mode && fill_in_compiled_inlined_sender()) return; 342 343 // handle general case 344 do { 345 _frame = _frame.sender(&_reg_map); 346 } while (!fill_from_frame()); 347 } |