diff options
author | Victor "Nate" Graf <nategraf1@gmail.com> | 2018-01-02 09:47:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-02 09:47:20 -0800 |
commit | c1bbdae7964b19b7063074d36e6af960f0cdc3a0 (patch) | |
tree | e554fc74fbb22c6ce9dd488fb02ba4f08ee89e89 /src/vm/eventpipeprovider.cpp | |
parent | 35bba0c5b29e9dfd2744b09e577f6111ef7de9d7 (diff) | |
download | coreclr-c1bbdae7964b19b7063074d36e6af960f0cdc3a0.tar.gz coreclr-c1bbdae7964b19b7063074d36e6af960f0cdc3a0.tar.bz2 coreclr-c1bbdae7964b19b7063074d36e6af960f0cdc3a0.zip |
Retry: Enable EventPipe across Unix and Windows (#15611)
* Revert "Revert "Enable EventPipe across Unix and Windows (#14772)" (#15609)"
This reverts commit 302005ca8ae14eade37ddf4ac6e900617c1c166a.
* Fix ARM build break
* Use more explicit references to resolve build failures
* Fix compat with python3
* Disable FeaturePerfTracing on Windows as it is not ready
* Disable test for incomplete functionality
* Fix test diabled patterns
* Add license header
* Use keyword types for managed code
* Add message prefix
* More precisly condition generation of eventing sources
* Remove erroneously added changes
Diffstat (limited to 'src/vm/eventpipeprovider.cpp')
-rw-r--r-- | src/vm/eventpipeprovider.cpp | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/src/vm/eventpipeprovider.cpp b/src/vm/eventpipeprovider.cpp index c10dd33638..84a90e4abb 100644 --- a/src/vm/eventpipeprovider.cpp +++ b/src/vm/eventpipeprovider.cpp @@ -24,6 +24,7 @@ EventPipeProvider::EventPipeProvider(EventPipeConfiguration *pConfig, const SStr m_providerName = providerName; m_enabled = false; + m_deleteDeferred = false; m_keywords = 0; m_providerLevel = EventPipeEventLevel::Critical; m_pEventList = new SList<SListElem<EventPipeEvent*>>(); @@ -36,8 +37,8 @@ EventPipeProvider::~EventPipeProvider() { CONTRACTL { - THROWS; - GC_NOTRIGGER; + NOTHROW; + GC_TRIGGERS; MODE_ANY; } CONTRACTL_END; @@ -45,21 +46,30 @@ EventPipeProvider::~EventPipeProvider() // Free all of the events. if(m_pEventList != NULL) { - // Take the lock before manipulating the list. - CrstHolder _crst(EventPipe::GetLock()); - - SListElem<EventPipeEvent*> *pElem = m_pEventList->GetHead(); - while(pElem != NULL) + // We swallow exceptions here because the HOST_BREAKABLE + // lock may throw and this destructor gets called in throw + // intolerant places. If that happens the event list will leak + EX_TRY { - EventPipeEvent *pEvent = pElem->GetValue(); - delete pEvent; + // Take the lock before manipulating the list. + CrstHolder _crst(EventPipe::GetLock()); + + SListElem<EventPipeEvent*> *pElem = m_pEventList->GetHead(); + while(pElem != NULL) + { + EventPipeEvent *pEvent = pElem->GetValue(); + delete pEvent; + + SListElem<EventPipeEvent*> *pCurElem = pElem; + pElem = m_pEventList->GetNext(pElem); + delete pCurElem; + } - SListElem<EventPipeEvent*> *pCurElem = pElem; - pElem = m_pEventList->GetNext(pElem); - delete pCurElem; + delete m_pEventList; } + EX_CATCH { } + EX_END_CATCH(SwallowAllExceptions); - delete m_pEventList; m_pEventList = NULL; } } |