static CompilationWatchDog watch(ResolvedJavaMethod method){
  if (ENABLED) {
    CompilationWatchDog watchDog=WATCH_DOGS.get();
    if (watchDog == null) {
      Thread currentThread=currentThread();
      watchDog=new CompilationWatchDog(currentThread);
      WATCH_DOGS.set(watchDog);
      watchDog.start();
    }
    watchDog.startCompilation(method);
    return watchDog;
  }
  return null;
}

static CompilationWatchDog watch ( ResolvedJavaMethod method ) { if ( ENABLED ) { CompilationWatchDog watchDog = WATCH_DOGS . get ( ) ; if ( watchDog == null ) { Thread currentThread = currentThread ( ) ; watchDog = new CompilationWatchDog ( currentThread ) ; WATCH_DOGS . set ( watchDog ) ; watchDog . start ( ) ; } watchDog . startCompilation ( method ) ; return watchDog ; } return null ; }
opens a scope for watching the compilation of a given method .
