comparison src/cpu/sparc/vm/frame_sparc.cpp @ 1201:24128c2ffa87

6921339: backout 6917766 Reviewed-by: mr
author twisti
date Fri, 29 Jan 2010 08:33:24 -0800
parents ba263cfb7611
children 18a389214829
comparison
equal deleted inserted replaced
1200:ba263cfb7611 1201:24128c2ffa87
1 /* 1 /*
2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
364 364
365 // It is important that frame be fully construct when we do this lookup 365 // It is important that frame be fully construct when we do this lookup
366 // as get_original_pc() needs correct value for unextended_sp() 366 // as get_original_pc() needs correct value for unextended_sp()
367 if (_pc != NULL) { 367 if (_pc != NULL) {
368 _cb = CodeCache::find_blob(_pc); 368 _cb = CodeCache::find_blob(_pc);
369 address original_pc = nmethod::get_deopt_original_pc(this); 369 if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) {
370 if (original_pc != NULL) { 370 _pc = ((nmethod*)_cb)->get_original_pc(this);
371 _pc = original_pc;
372 _deopt_state = is_deoptimized; 371 _deopt_state = is_deoptimized;
373 } else { 372 } else {
374 _deopt_state = not_deoptimized; 373 _deopt_state = not_deoptimized;
375 } 374 }
376 } 375 }
518 tty->print_cr("patch_pc at address 0x%x [0x%x -> 0x%x] ", O7_addr(), _pc, pc); 517 tty->print_cr("patch_pc at address 0x%x [0x%x -> 0x%x] ", O7_addr(), _pc, pc);
519 } 518 }
520 _cb = CodeCache::find_blob(pc); 519 _cb = CodeCache::find_blob(pc);
521 *O7_addr() = pc - pc_return_offset; 520 *O7_addr() = pc - pc_return_offset;
522 _cb = CodeCache::find_blob(_pc); 521 _cb = CodeCache::find_blob(_pc);
523 address original_pc = nmethod::get_deopt_original_pc(this); 522 if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) {
524 if (original_pc != NULL) { 523 address orig = ((nmethod*)_cb)->get_original_pc(this);
525 assert(original_pc == _pc, "expected original to be stored before patching"); 524 assert(orig == _pc, "expected original to be stored before patching");
526 _deopt_state = is_deoptimized; 525 _deopt_state = is_deoptimized;
527 } else { 526 } else {
528 _deopt_state = not_deoptimized; 527 _deopt_state = not_deoptimized;
529 } 528 }
530 } 529 }