X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=data%2Flock-decoder%2FLockTracerDecoder.cs;h=1471ea511817cbed7af16759188a359021cf0ca8;hb=HEAD;hp=f838c5b21f9299b70a9b0b9d22e6b8d1e38a2e22;hpb=17183a6fbf75a5ca960d7541676aea7fd7b09d21;p=mono.git diff --git a/data/lock-decoder/LockTracerDecoder.cs b/data/lock-decoder/LockTracerDecoder.cs index f838c5b21f9..1471ea51181 100644 --- a/data/lock-decoder/LockTracerDecoder.cs +++ b/data/lock-decoder/LockTracerDecoder.cs @@ -86,7 +86,7 @@ LOCK RULES Simple locks: Can be acquired at any point regardless of which locks are taken or not. No other locks can be acquired or released while holding a simple lock. - Reentrancy is not recomended. (warning) + Reentrancy is not recommended. (warning) Simple locks are leaf locks on the lock lattice. Complex locks: @@ -129,7 +129,7 @@ ERROR: tried to acquire lock DomainLock at mono_domain_code_reserve_align while WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_class_from_name WARNING: tried to acquire lock ImageDataLock at mono_image_init_name_cache while holding ImageDataLock at mono_image_add_to_name_cache Both of those happen when filling up the name_cache, as it needs to alloc image memory. - This one is fixable by spliting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriatedly. + This one is fixable by splitting mono_image_init_name_cache into a locked and an unlocked variants and calling them appropriately. */ @@ -143,6 +143,9 @@ public enum Lock { IcallLock, AssemblyBindingLock, MarshalLock, + ClassesLock, + LoaderGlobalDataLock, + ThreadsLock, } public class SimLock @@ -240,7 +243,24 @@ public class SimLock } public override string ToString () { - return String.Format ("{0}", kind); + switch (kind) { + case Lock.LoaderLock: + case Lock.IcallLock: + case Lock.AssemblyBindingLock: + case Lock.MarshalLock: + case Lock.ClassesLock: + case Lock.LoaderGlobalDataLock: + case Lock.ThreadsLock: + return String.Format ("{0}", kind); + + case Lock.ImageDataLock: + case Lock.DomainLock: + case Lock.DomainAssembliesLock: + case Lock.DomainJitCodeHashLock: + return String.Format ("{0}[{1}]", kind, id); + default: + return String.Format ("Unknown({0})[{1}]", kind, id); + } } } @@ -309,6 +329,10 @@ public class Trace { "add_record", "mono_locks_lock_acquired", "mono_locks_lock_released", + "mono_threads_lock", + "mono_threads_unlock", + "mono_domain_lock", + "mono_domain_unlock", }; public Trace (string[] fields) {