hotspot/src/cpu/sparc/vm/frame_sparc.cpp
changeset 4748 3fa8d8a7c0ea
parent 670 ddf3e9583f2f
child 4749 f26b30116e3a
equal deleted inserted replaced
4747:9b03cd97f2fb 4748:3fa8d8a7c0ea
     1 /*
     1 /*
     2  * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Copyright 1997-2010 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     if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) {
   369     address original_pc = nmethod::get_deopt_original_pc(this);
   370       _pc = ((nmethod*)_cb)->get_original_pc(this);
   370     if (original_pc != NULL) {
       
   371       _pc = original_pc;
   371       _deopt_state = is_deoptimized;
   372       _deopt_state = is_deoptimized;
   372     } else {
   373     } else {
   373       _deopt_state = not_deoptimized;
   374       _deopt_state = not_deoptimized;
   374     }
   375     }
   375   }
   376   }
   517     tty->print_cr("patch_pc at address  0x%x [0x%x -> 0x%x] ", O7_addr(), _pc, pc);
   518     tty->print_cr("patch_pc at address  0x%x [0x%x -> 0x%x] ", O7_addr(), _pc, pc);
   518   }
   519   }
   519   _cb = CodeCache::find_blob(pc);
   520   _cb = CodeCache::find_blob(pc);
   520   *O7_addr() = pc - pc_return_offset;
   521   *O7_addr() = pc - pc_return_offset;
   521   _cb = CodeCache::find_blob(_pc);
   522   _cb = CodeCache::find_blob(_pc);
   522   if (_cb != NULL && _cb->is_nmethod() && ((nmethod*)_cb)->is_deopt_pc(_pc)) {
   523   address original_pc = nmethod::get_deopt_original_pc(this);
   523     address orig = ((nmethod*)_cb)->get_original_pc(this);
   524   if (original_pc != NULL) {
   524     assert(orig == _pc, "expected original to be stored before patching");
   525     assert(original_pc == _pc, "expected original to be stored before patching");
   525     _deopt_state = is_deoptimized;
   526     _deopt_state = is_deoptimized;
   526   } else {
   527   } else {
   527     _deopt_state = not_deoptimized;
   528     _deopt_state = not_deoptimized;
   528   }
   529   }
   529 }
   530 }