diff options
author | Andrew Au <cshung@gmail.com> | 2019-04-29 23:23:22 -0700 |
---|---|---|
committer | Andrew Au <cshung@gmail.com> | 2019-04-30 07:51:36 -0700 |
commit | 56c38c3c4093d8fe7ef582c2b65a9290f2ce0000 (patch) | |
tree | 67f0c3e75f0d5b48ac8306986d934ed6cd6e4792 /src/vm | |
parent | 6920498452f27b721e0f7c29aafa46fcde503800 (diff) | |
download | coreclr-56c38c3c4093d8fe7ef582c2b65a9290f2ce0000.tar.gz coreclr-56c38c3c4093d8fe7ef582c2b65a9290f2ce0000.tar.bz2 coreclr-56c38c3c4093d8fe7ef582c2b65a9290f2ce0000.zip |
Add more asserts for the EventPipeBufferManager consumers
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/eventpipe.cpp | 1 | ||||
-rw-r--r-- | src/vm/eventpipebuffermanager.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/vm/eventpipe.cpp b/src/vm/eventpipe.cpp index 04907561e5..f78825732c 100644 --- a/src/vm/eventpipe.cpp +++ b/src/vm/eventpipe.cpp @@ -891,6 +891,7 @@ EventPipeEventInstance *EventPipe::GetNextEvent() THROWS; GC_TRIGGERS; MODE_PREEMPTIVE; + PRECONDITION(!GetLock()->OwnedByCurrentThread()); } CONTRACTL_END; diff --git a/src/vm/eventpipebuffermanager.cpp b/src/vm/eventpipebuffermanager.cpp index f08a2b3640..ae2800975c 100644 --- a/src/vm/eventpipebuffermanager.cpp +++ b/src/vm/eventpipebuffermanager.cpp @@ -415,6 +415,7 @@ void EventPipeBufferManager::WriteAllBuffersToFile(EventPipeFile *pFile, LARGE_I GC_NOTRIGGER; MODE_ANY; PRECONDITION(pFile != nullptr); + PRECONDITION(EventPipe::GetLock()->OwnedByCurrentThread()); } CONTRACTL_END; @@ -488,6 +489,7 @@ EventPipeEventInstance* EventPipeBufferManager::GetNextEvent() NOTHROW; GC_NOTRIGGER; MODE_ANY; + PRECONDITION(!EventPipe::GetLock()->OwnedByCurrentThread()); } CONTRACTL_END; |