src/share/vm/c1/c1_GraphBuilder.cpp

changeset 2486
403dc4c1d7f5
parent 2349
5ddfcf4b079e
child 2487
aa4b04b68652
     1.1 --- a/src/share/vm/c1/c1_GraphBuilder.cpp	Thu Dec 30 23:44:45 2010 -0800
     1.2 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp	Fri Jan 21 13:01:02 2011 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -1396,6 +1396,13 @@
    1.11    if (continuation() != NULL) {
    1.12      assert(!method()->is_synchronized() || InlineSynchronizedMethods, "can not inline synchronized methods yet");
    1.13  
    1.14 +    if (compilation()->env()->dtrace_method_probes()) {
    1.15 +      // Report exit from inline methods
    1.16 +      Values* args = new Values(1);
    1.17 +      args->push(append(new Constant(new ObjectConstant(method()))));
    1.18 +      append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args));
    1.19 +    }
    1.20 +
    1.21      // If the inlined method is synchronized, the monitor must be
    1.22      // released before we jump to the continuation block.
    1.23      if (method()->is_synchronized()) {
    1.24 @@ -3301,6 +3308,13 @@
    1.25    Value exception = append_with_bci(new ExceptionObject(), SynchronizationEntryBCI);
    1.26    assert(exception->is_pinned(), "must be");
    1.27  
    1.28 +  if (compilation()->env()->dtrace_method_probes()) {
    1.29 +    // Report exit from inline methods
    1.30 +    Values* args = new Values(1);
    1.31 +    args->push(append(new Constant(new ObjectConstant(method()))));
    1.32 +    append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args));
    1.33 +  }
    1.34 +
    1.35    int bci = SynchronizationEntryBCI;
    1.36    if (lock) {
    1.37      assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing");
    1.38 @@ -3486,6 +3500,11 @@
    1.39      inline_sync_entry(lock, sync_handler);
    1.40    }
    1.41  
    1.42 +  if (compilation()->env()->dtrace_method_probes()) {
    1.43 +    Values* args = new Values(1);
    1.44 +    args->push(append(new Constant(new ObjectConstant(method()))));
    1.45 +    append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args));
    1.46 +  }
    1.47  
    1.48    BlockBegin* callee_start_block = block_at(0);
    1.49    if (callee_start_block != NULL) {

mercurial