src/share/vm/prims/forte.cpp

changeset 4037
da91efe96a93
parent 3156
f08d439fab8c
child 4295
59c790074993
     1.1 --- a/src/share/vm/prims/forte.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/prims/forte.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2003, 2012, 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 @@ -68,7 +68,7 @@
    1.11  static bool is_decipherable_compiled_frame(JavaThread* thread, frame* fr, nmethod* nm);
    1.12  static bool is_decipherable_interpreted_frame(JavaThread* thread,
    1.13                                                frame* fr,
    1.14 -                                              methodOop* method_p,
    1.15 +                                              Method** method_p,
    1.16                                                int* bci_p);
    1.17  
    1.18  
    1.19 @@ -178,12 +178,12 @@
    1.20  
    1.21  static bool is_decipherable_interpreted_frame(JavaThread* thread,
    1.22                                                frame* fr,
    1.23 -                                              methodOop* method_p,
    1.24 +                                              Method** method_p,
    1.25                                                int* bci_p) {
    1.26    assert(fr->is_interpreted_frame(), "just checking");
    1.27  
    1.28    // top frame is an interpreted frame
    1.29 -  // check if it is walkable (i.e. valid methodOop and valid bci)
    1.30 +  // check if it is walkable (i.e. valid Method* and valid bci)
    1.31  
    1.32    // Because we may be racing a gc thread the method and/or bci
    1.33    // of a valid interpreter frame may look bad causing us to
    1.34 @@ -199,14 +199,14 @@
    1.35    if (known_valid || fr->is_interpreted_frame_valid(thread)) {
    1.36  
    1.37      // The frame code should completely validate the frame so that
    1.38 -    // references to methodOop and bci are completely safe to access
    1.39 +    // references to Method* and bci are completely safe to access
    1.40      // If they aren't the frame code should be fixed not this
    1.41      // code. However since gc isn't locked out the values could be
    1.42      // stale. This is a race we can never completely win since we can't
    1.43      // lock out gc so do one last check after retrieving their values
    1.44      // from the frame for additional safety
    1.45  
    1.46 -    methodOop method = fr->interpreter_frame_method();
    1.47 +    Method* method = fr->interpreter_frame_method();
    1.48  
    1.49      // We've at least found a method.
    1.50      // NOTE: there is something to be said for the approach that
    1.51 @@ -250,13 +250,13 @@
    1.52  static bool find_initial_Java_frame(JavaThread* thread,
    1.53                                      frame* fr,
    1.54                                      frame* initial_frame_p,
    1.55 -                                    methodOop* method_p,
    1.56 +                                    Method** method_p,
    1.57                                      int* bci_p) {
    1.58  
    1.59    // It is possible that for a frame containing an nmethod
    1.60    // we can capture the method but no bci. If we get no
    1.61    // bci the frame isn't walkable but the method is usable.
    1.62 -  // Therefore we init the returned methodOop to NULL so the
    1.63 +  // Therefore we init the returned Method* to NULL so the
    1.64    // caller can make the distinction.
    1.65  
    1.66    *method_p = NULL;
    1.67 @@ -384,7 +384,7 @@
    1.68    NoHandleMark nhm;
    1.69  
    1.70    frame initial_Java_frame;
    1.71 -  methodOop method;
    1.72 +  Method* method;
    1.73    int bci;
    1.74    int count;
    1.75  
    1.76 @@ -402,9 +402,9 @@
    1.77  
    1.78    // The method is not stored GC safe so see if GC became active
    1.79    // after we entered AsyncGetCallTrace() and before we try to
    1.80 -  // use the methodOop.
    1.81 +  // use the Method*.
    1.82    // Yes, there is still a window after this check and before
    1.83 -  // we use methodOop below, but we can't lock out GC so that
    1.84 +  // we use Method* below, but we can't lock out GC so that
    1.85    // has to be an acceptable risk.
    1.86    if (!ch->is_valid_method(method)) {
    1.87      trace->num_frames = ticks_GC_active; // -2
    1.88 @@ -442,9 +442,9 @@
    1.89  
    1.90      // The method is not stored GC safe so see if GC became active
    1.91      // after we entered AsyncGetCallTrace() and before we try to
    1.92 -    // use the methodOop.
    1.93 +    // use the Method*.
    1.94      // Yes, there is still a window after this check and before
    1.95 -    // we use methodOop below, but we can't lock out GC so that
    1.96 +    // we use Method* below, but we can't lock out GC so that
    1.97      // has to be an acceptable risk.
    1.98      if (!ch->is_valid_method(method)) {
    1.99        // we throw away everything we've gathered in this sample since

mercurial