src/share/vm/code/nmethod.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6920293 Sdiff src/share/vm/code

src/share/vm/code/nmethod.cpp

Print this page




1993 address nmethod::continuation_for_implicit_exception(address pc) {
1994   // Exception happened outside inline-cache check code => we are inside
1995   // an active nmethod => use cpc to determine a return address
1996   int exception_offset = pc - instructions_begin();
1997   int cont_offset = ImplicitExceptionTable(this).at( exception_offset );
1998 #ifdef ASSERT
1999   if (cont_offset == 0) {
2000     Thread* thread = ThreadLocalStorage::get_thread_slow();
2001     ResetNoHandleMark rnm; // Might be called from LEAF/QUICK ENTRY
2002     HandleMark hm(thread);
2003     ResourceMark rm(thread);
2004     CodeBlob* cb = CodeCache::find_blob(pc);
2005     assert(cb != NULL && cb == this, "");
2006     tty->print_cr("implicit exception happened at " INTPTR_FORMAT, pc);
2007     print();
2008     method()->print_codes();
2009     print_code();
2010     print_pcs();
2011   }
2012 #endif
2013   guarantee(cont_offset != 0, "unhandled implicit exception in compiled code");



2014   return instructions_begin() + cont_offset;
2015 }
2016 
2017 
2018 
2019 void nmethod_init() {
2020   // make sure you didn't forget to adjust the filler fields
2021   assert(sizeof(nmFlags) <= 4,           "nmFlags occupies more than a word");
2022   assert(sizeof(nmethod) % oopSize == 0, "nmethod size must be multiple of a word");
2023 }
2024 
2025 
2026 //-------------------------------------------------------------------------------------------
2027 
2028 
2029 // QQQ might we make this work from a frame??
2030 nmethodLocker::nmethodLocker(address pc) {
2031   CodeBlob* cb = CodeCache::find_blob(pc);
2032   guarantee(cb != NULL && cb->is_nmethod(), "bad pc for a nmethod found");
2033   _nm = (nmethod*)cb;




1993 address nmethod::continuation_for_implicit_exception(address pc) {
1994   // Exception happened outside inline-cache check code => we are inside
1995   // an active nmethod => use cpc to determine a return address
1996   int exception_offset = pc - instructions_begin();
1997   int cont_offset = ImplicitExceptionTable(this).at( exception_offset );
1998 #ifdef ASSERT
1999   if (cont_offset == 0) {
2000     Thread* thread = ThreadLocalStorage::get_thread_slow();
2001     ResetNoHandleMark rnm; // Might be called from LEAF/QUICK ENTRY
2002     HandleMark hm(thread);
2003     ResourceMark rm(thread);
2004     CodeBlob* cb = CodeCache::find_blob(pc);
2005     assert(cb != NULL && cb == this, "");
2006     tty->print_cr("implicit exception happened at " INTPTR_FORMAT, pc);
2007     print();
2008     method()->print_codes();
2009     print_code();
2010     print_pcs();
2011   }
2012 #endif
2013   if (cont_offset == 0) {
2014     // Let the normal error handling report the exception
2015     return NULL;
2016   }
2017   return instructions_begin() + cont_offset;
2018 }
2019 
2020 
2021 
2022 void nmethod_init() {
2023   // make sure you didn't forget to adjust the filler fields
2024   assert(sizeof(nmFlags) <= 4,           "nmFlags occupies more than a word");
2025   assert(sizeof(nmethod) % oopSize == 0, "nmethod size must be multiple of a word");
2026 }
2027 
2028 
2029 //-------------------------------------------------------------------------------------------
2030 
2031 
2032 // QQQ might we make this work from a frame??
2033 nmethodLocker::nmethodLocker(address pc) {
2034   CodeBlob* cb = CodeCache::find_blob(pc);
2035   guarantee(cb != NULL && cb->is_nmethod(), "bad pc for a nmethod found");
2036   _nm = (nmethod*)cb;


src/share/vm/code/nmethod.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File