src/share/vm/c1/c1_GraphBuilder.cpp

changeset 2487
aa4b04b68652
parent 2462
8012aa3ccede
parent 2486
403dc4c1d7f5
child 2600
6f3746e69a78
     1.1 --- a/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Jan 21 01:16:13 2011 -0800
     1.2 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Jan 21 13:03:13 2011 -0800
     1.3 @@ -1396,6 +1396,13 @@
     1.4    if (continuation() != NULL) {
     1.5      assert(!method()->is_synchronized() || InlineSynchronizedMethods, "can not inline synchronized methods yet");
     1.6  
     1.7 +    if (compilation()->env()->dtrace_method_probes()) {
     1.8 +      // Report exit from inline methods
     1.9 +      Values* args = new Values(1);
    1.10 +      args->push(append(new Constant(new ObjectConstant(method()))));
    1.11 +      append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args));
    1.12 +    }
    1.13 +
    1.14      // If the inlined method is synchronized, the monitor must be
    1.15      // released before we jump to the continuation block.
    1.16      if (method()->is_synchronized()) {
    1.17 @@ -3301,6 +3308,13 @@
    1.18    Value exception = append_with_bci(new ExceptionObject(), SynchronizationEntryBCI);
    1.19    assert(exception->is_pinned(), "must be");
    1.20  
    1.21 +  if (compilation()->env()->dtrace_method_probes()) {
    1.22 +    // Report exit from inline methods
    1.23 +    Values* args = new Values(1);
    1.24 +    args->push(append(new Constant(new ObjectConstant(method()))));
    1.25 +    append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args));
    1.26 +  }
    1.27 +
    1.28    int bci = SynchronizationEntryBCI;
    1.29    if (lock) {
    1.30      assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing");
    1.31 @@ -3486,6 +3500,11 @@
    1.32      inline_sync_entry(lock, sync_handler);
    1.33    }
    1.34  
    1.35 +  if (compilation()->env()->dtrace_method_probes()) {
    1.36 +    Values* args = new Values(1);
    1.37 +    args->push(append(new Constant(new ObjectConstant(method()))));
    1.38 +    append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args));
    1.39 +  }
    1.40  
    1.41    BlockBegin* callee_start_block = block_at(0);
    1.42    if (callee_start_block != NULL) {

mercurial