Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/mutex.hpp @ 55:2a8eb116ebbe
6610420: Debug VM crashes during monitor lock rank checking
Summary: Make SerializePage lock as raw lock and add name for mutex locks
Reviewed-by: never, dice, dholmes
author | xlu |
---|---|
date | Tue, 05 Feb 2008 23:21:57 -0800 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
line wrap: on
line diff
--- a/src/share/vm/runtime/mutex.hpp Thu Jan 31 14:56:50 2008 -0500 +++ b/src/share/vm/runtime/mutex.hpp Tue Feb 05 23:21:57 2008 -0800 @@ -82,6 +82,9 @@ // *in that order*. If their implementations change such that these // assumptions are violated, a whole lot of code will break. +// The default length of monitor name is choosen to be 64 to avoid false sharing. +static const int MONITOR_NAME_LEN = 64; + class Monitor : public CHeapObj { public: @@ -126,9 +129,8 @@ volatile intptr_t _WaitLock [1] ; // Protects _WaitSet ParkEvent * volatile _WaitSet ; // LL of ParkEvents volatile bool _snuck; // Used for sneaky locking (evil). - const char * _name; // Name of mutex int NotifyCount ; // diagnostic assist - double pad [8] ; // avoid false sharing + char _name[MONITOR_NAME_LEN]; // Name of mutex // Debugging fields for naming, deadlock detection, etc. (some only used in debug mode) #ifndef PRODUCT @@ -170,7 +172,7 @@ int ILocked () ; protected: - static void ClearMonitor (Monitor * m) ; + static void ClearMonitor (Monitor * m, const char* name = NULL) ; Monitor() ; public: