tsan: fix internal deadlock detector for external deadlock detector

we must go deeper!

llvm-svn: 202365
This commit is contained in:
Dmitry Vyukov 2014-02-27 09:02:58 +00:00
parent a16f327c27
commit 6fd67f9c7a
3 changed files with 4 additions and 3 deletions

View File

@ -33,13 +33,14 @@ static MutexType CanLockTab[MutexTypeCount][MutexTypeCount] = {
/*2 MutexTypeThreads*/ {MutexTypeReport}, /*2 MutexTypeThreads*/ {MutexTypeReport},
/*3 MutexTypeReport*/ {MutexTypeSyncTab, MutexTypeSyncVar, /*3 MutexTypeReport*/ {MutexTypeSyncTab, MutexTypeSyncVar,
MutexTypeMBlock, MutexTypeJavaMBlock}, MutexTypeMBlock, MutexTypeJavaMBlock},
/*4 MutexTypeSyncVar*/ {}, /*4 MutexTypeSyncVar*/ {MutexTypeDDetector},
/*5 MutexTypeSyncTab*/ {MutexTypeSyncVar}, /*5 MutexTypeSyncTab*/ {MutexTypeSyncVar},
/*6 MutexTypeSlab*/ {MutexTypeLeaf}, /*6 MutexTypeSlab*/ {MutexTypeLeaf},
/*7 MutexTypeAnnotations*/ {}, /*7 MutexTypeAnnotations*/ {},
/*8 MutexTypeAtExit*/ {MutexTypeSyncTab}, /*8 MutexTypeAtExit*/ {MutexTypeSyncTab},
/*9 MutexTypeMBlock*/ {MutexTypeSyncVar}, /*9 MutexTypeMBlock*/ {MutexTypeSyncVar},
/*10 MutexTypeJavaMBlock*/ {MutexTypeSyncVar}, /*10 MutexTypeJavaMBlock*/ {MutexTypeSyncVar},
/*11 MutexTypeDDetector*/ {},
}; };
static bool CanLockAdj[MutexTypeCount][MutexTypeCount]; static bool CanLockAdj[MutexTypeCount][MutexTypeCount];

View File

@ -31,7 +31,7 @@ enum MutexType {
MutexTypeAtExit, MutexTypeAtExit,
MutexTypeMBlock, MutexTypeMBlock,
MutexTypeJavaMBlock, MutexTypeJavaMBlock,
MutexTypeDeadlockDetector, MutexTypeDDetector,
// This must be the last. // This must be the last.
MutexTypeCount MutexTypeCount

View File

@ -83,7 +83,7 @@ Context::Context()
, racy_stacks(MBlockRacyStacks) , racy_stacks(MBlockRacyStacks)
, racy_addresses(MBlockRacyAddresses) , racy_addresses(MBlockRacyAddresses)
, fired_suppressions(8) , fired_suppressions(8)
, dd_mtx(MutexTypeDeadlockDetector, StatMtxDeadlockDetector) { , dd_mtx(MutexTypeDDetector, StatMtxDeadlockDetector) {
dd.clear(); dd.clear();
} }