src/share/vm/runtime/sharedRuntime.cpp

changeset 1063
7bb995fbd3c0
parent 1014
0fbdb4381b99
parent 1047
afa80fa86d22
child 1100
c89f86385056
     1.1 --- a/src/share/vm/runtime/sharedRuntime.cpp	Mon Mar 09 13:34:00 2009 -0700
     1.2 +++ b/src/share/vm/runtime/sharedRuntime.cpp	Thu Mar 12 18:16:36 2009 -0700
     1.3 @@ -377,6 +377,32 @@
     1.4    throw_and_post_jvmti_exception(thread, h_exception);
     1.5  }
     1.6  
     1.7 +// The interpreter code to call this tracing function is only
     1.8 +// called/generated when TraceRedefineClasses has the right bits
     1.9 +// set. Since obsolete methods are never compiled, we don't have
    1.10 +// to modify the compilers to generate calls to this function.
    1.11 +//
    1.12 +JRT_LEAF(int, SharedRuntime::rc_trace_method_entry(
    1.13 +    JavaThread* thread, methodOopDesc* method))
    1.14 +  assert(RC_TRACE_IN_RANGE(0x00001000, 0x00002000), "wrong call");
    1.15 +
    1.16 +  if (method->is_obsolete()) {
    1.17 +    // We are calling an obsolete method, but this is not necessarily
    1.18 +    // an error. Our method could have been redefined just after we
    1.19 +    // fetched the methodOop from the constant pool.
    1.20 +
    1.21 +    // RC_TRACE macro has an embedded ResourceMark
    1.22 +    RC_TRACE_WITH_THREAD(0x00001000, thread,
    1.23 +                         ("calling obsolete method '%s'",
    1.24 +                          method->name_and_sig_as_C_string()));
    1.25 +    if (RC_TRACE_ENABLED(0x00002000)) {
    1.26 +      // this option is provided to debug calls to obsolete methods
    1.27 +      guarantee(false, "faulting at call to an obsolete method.");
    1.28 +    }
    1.29 +  }
    1.30 +  return 0;
    1.31 +JRT_END
    1.32 +
    1.33  // ret_pc points into caller; we are returning caller's exception handler
    1.34  // for given exception
    1.35  address SharedRuntime::compute_compiled_exc_handler(nmethod* nm, address ret_pc, Handle& exception,

mercurial