coreRuntime/src/sc/util/PerfMon.java
public static void yield(String name) {
      if (!enabled)
         return;
      ArrayList<PerfOp> current = currentOp.get();
      int top = current == null ? -1 : current.size() - 1;
      if (top == -1) {
         perfMonError("Invalid yield call for: " + name + ": no current op");
         return;
      }

      for (int i = top; i >= 0; i--) {
         PerfOp currentOp = current.get(i);
         if ((name == null || currentOp.name.equals(name))) {
            if (currentOp.recording)
               currentOp.yield(System.nanoTime());
            return; // success
         }
      }
      perfMonError("*** yield call for: " + name + " not in the current thread's call stack");
   }
/**
    * Usually called with name = null.  In that case, it stops recording for the current operation whatever it may be.
    * Use this if you need to do some operation which is unrelated to the current code context, and it may be included
    * in more than one parent operation.  If you provide the name, it yields only if the current operation is the one
    * specified.  Make sure to call resume when your nested operation is complete with the same argument.
    */
Usually called with name = null.  In that case, it stops recording for the current operation whatever it may be.
Use this if you need to do some operation which is unrelated to the current code context, and it may be included
in more than one parent operation.  If you provide the name, it yields only if the current operation is the one
specified.  Make sure to call resume when your nested operation is complete with the same argument.
Usually called with name = null . In that case it stops recording for the current operation whatever it may be . Use this if you need to do some operation which is unrelated to the current code context and it may be included in more than one parent operation . If you provide the name it yields only if the current operation is the one specified . Make sure to call resume when your nested operation is complete with the same argument .
public static void yield(String name) {
      if (!enabled)
         return;
      ArrayList<PerfOp> current = currentOp.get();
      int top = current == null ? -1 : current.size() - 1;
      if (top == -1) {
         perfMonError("Invalid yield call for: " + name + ": no current op");
         return;
      }
      for (int i = top; i >= 0; i--) {
         PerfOp currentOp = current.get(i);
         if ((name == null || currentOp.name.equals(name))) {
            if (currentOp.recording)
               currentOp.yield(System.nanoTime());
            return; 
         }
      }
      perfMonError("*** yield call for: " + name + " not in the current thread's call stack");
   }
public static void yield ( String name ) { if ( ! enabled ) return ; ArrayList < PerfOp > current = currentOp . get ( ) ; int top = current == null ? - 1 : current . size ( ) - 1 ; if ( top == - 1 ) { perfMonError ( "Invalid yield call for: " + name + ": no current op" ) ; return ; } for ( int i = top ; i >= 0 ; i -- ) { PerfOp currentOp = current . get ( i ) ; if ( ( name == null || currentOp . name . equals ( name ) ) ) { if ( currentOp . recording ) currentOp . yield ( System . nanoTime ( ) ) ; return ; } } perfMonError ( "*** yield call for: " + name + " not in the current thread's call stack" ) ; }
Usually called with name = null.
Usually called with name = null .
// success