hotspot/src/share/vm/runtime/synchronizer.hpp
changeset 35934 76dbe86f3d82
parent 33595 5830c3ae532d
child 37466 287c4ebd11b0
equal deleted inserted replaced
35932:511dd7b5313b 35934:76dbe86f3d82
    40   typedef enum {
    40   typedef enum {
    41     owner_self,
    41     owner_self,
    42     owner_none,
    42     owner_none,
    43     owner_other
    43     owner_other
    44   } LockOwnership;
    44   } LockOwnership;
       
    45 
       
    46   typedef enum {
       
    47     inflate_cause_vm_internal = 0,
       
    48     inflate_cause_monitor_enter = 1,
       
    49     inflate_cause_wait = 2,
       
    50     inflate_cause_notify = 3,
       
    51     inflate_cause_hash_code = 4,
       
    52     inflate_cause_jni_enter = 5,
       
    53     inflate_cause_jni_exit = 6,
       
    54     inflate_cause_nof = 7 // Number of causes
       
    55   } InflateCause;
       
    56 
    45   // exit must be implemented non-blocking, since the compiler cannot easily handle
    57   // exit must be implemented non-blocking, since the compiler cannot easily handle
    46   // deoptimization at monitor exit. Hence, it does not take a Handle argument.
    58   // deoptimization at monitor exit. Hence, it does not take a Handle argument.
    47 
    59 
    48   // This is full version of monitor enter and exit. I choose not
    60   // This is full version of monitor enter and exit. I choose not
    49   // to use enter() and exit() in order to make sure user be ware
    61   // to use enter() and exit() in order to make sure user be ware
    92   static void omRelease(Thread * Self, ObjectMonitor * m,
   104   static void omRelease(Thread * Self, ObjectMonitor * m,
    93                         bool FromPerThreadAlloc);
   105                         bool FromPerThreadAlloc);
    94   static void omFlush(Thread * Self);
   106   static void omFlush(Thread * Self);
    95 
   107 
    96   // Inflate light weight monitor to heavy weight monitor
   108   // Inflate light weight monitor to heavy weight monitor
    97   static ObjectMonitor* inflate(Thread * Self, oop obj);
   109   static ObjectMonitor* inflate(Thread * Self, oop obj, const InflateCause cause);
    98   // This version is only for internal use
   110   // This version is only for internal use
    99   static ObjectMonitor* inflate_helper(oop obj);
   111   static ObjectMonitor* inflate_helper(oop obj);
       
   112   static const char* inflate_cause_name(const InflateCause cause);
   100 
   113 
   101   // Returns the identity hash value for an oop
   114   // Returns the identity hash value for an oop
   102   // NOTE: It may cause monitor inflation
   115   // NOTE: It may cause monitor inflation
   103   static intptr_t identity_hash_value_for(Handle obj);
   116   static intptr_t identity_hash_value_for(Handle obj);
   104   static intptr_t FastHashCode(Thread * Self, oop obj);
   117   static intptr_t FastHashCode(Thread * Self, oop obj);