hotspot/src/share/vm/runtime/objectMonitor.hpp
changeset 31782 b23b74f8ae8d
parent 27880 afb974a04396
child 31856 614d6786ba55
equal deleted inserted replaced
31781:6bc2497120a9 31782:b23b74f8ae8d
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   194   static PerfCounter * _sync_MonScavenged;
   194   static PerfCounter * _sync_MonScavenged;
   195   static PerfCounter * _sync_Inflations;
   195   static PerfCounter * _sync_Inflations;
   196   static PerfCounter * _sync_Deflations;
   196   static PerfCounter * _sync_Deflations;
   197   static PerfLongVariable * _sync_MonExtant;
   197   static PerfLongVariable * _sync_MonExtant;
   198 
   198 
       
   199   static int Knob_ExitRelease;
   199   static int Knob_Verbose;
   200   static int Knob_Verbose;
   200   static int Knob_VerifyInUse;
   201   static int Knob_VerifyInUse;
       
   202   static int Knob_VerifyMatch;
   201   static int Knob_SpinLimit;
   203   static int Knob_SpinLimit;
   202 
   204 
   203   void* operator new (size_t size) throw() {
   205   void* operator new (size_t size) throw() {
   204     return AllocateHeap(size, mtInternal);
   206     return AllocateHeap(size, mtInternal);
   205   }
   207   }
   315 #ifndef PRODUCT
   317 #ifndef PRODUCT
   316   void      verify();
   318   void      verify();
   317   void      print();
   319   void      print();
   318 #endif
   320 #endif
   319 
   321 
   320   bool      try_enter(TRAPS);
       
   321   void      enter(TRAPS);
   322   void      enter(TRAPS);
   322   void      exit(bool not_suspended, TRAPS);
   323   void      exit(bool not_suspended, TRAPS);
   323   void      wait(jlong millis, bool interruptable, TRAPS);
   324   void      wait(jlong millis, bool interruptable, TRAPS);
   324   void      notify(TRAPS);
   325   void      notify(TRAPS);
   325   void      notifyAll(TRAPS);
   326   void      notifyAll(TRAPS);
   352 };
   353 };
   353 
   354 
   354 #undef TEVENT
   355 #undef TEVENT
   355 #define TEVENT(nom) { if (SyncVerbose) FEVENT(nom); }
   356 #define TEVENT(nom) { if (SyncVerbose) FEVENT(nom); }
   356 
   357 
   357 #define FEVENT(nom)                 \
   358 #define FEVENT(nom)                             \
   358   {                                 \
   359   {                                             \
   359     static volatile int ctr = 0;    \
   360     static volatile int ctr = 0;                \
   360     int v = ++ctr;                  \
   361     int v = ++ctr;                              \
   361     if ((v & (v - 1)) == 0) {       \
   362     if ((v & (v - 1)) == 0) {                   \
   362       ::printf(#nom " : %d\n", v);  \
   363       tty->print_cr("INFO: " #nom " : %d", v);  \
   363       ::fflush(stdout);             \
   364       tty->flush();                             \
   364     }                               \
   365     }                                           \
   365   }
   366   }
   366 
   367 
   367 #undef  TEVENT
   368 #undef  TEVENT
   368 #define TEVENT(nom) {;}
   369 #define TEVENT(nom) {;}
   369 
   370