From 3338d4a8bd5050e6fe0b5713608bb13d5bdc40b3 Mon Sep 17 00:00:00 2001 From: David Mason Date: Tue, 20 Feb 2024 18:16:07 -0800 Subject: [PATCH] Update multiple.cpp (#98685) --- src/tests/profiler/native/multiple/multiple.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/tests/profiler/native/multiple/multiple.cpp b/src/tests/profiler/native/multiple/multiple.cpp index 6b8fba571858a..c36e4a8efa491 100644 --- a/src/tests/profiler/native/multiple/multiple.cpp +++ b/src/tests/profiler/native/multiple/multiple.cpp @@ -24,7 +24,6 @@ HRESULT MultiplyLoaded::InitializeCommon(IUnknown* pICorProfilerInfoUnk) Profiler::Initialize(pICorProfilerInfoUnk); HRESULT hr = S_OK; - printf("Setting exception mask\n"); if (FAILED(hr = pCorProfilerInfo->SetEventMask2(COR_PRF_MONITOR_EXCEPTIONS, 0))) { _failures++; @@ -37,11 +36,13 @@ HRESULT MultiplyLoaded::InitializeCommon(IUnknown* pICorProfilerInfoUnk) HRESULT MultiplyLoaded::Initialize(IUnknown* pICorProfilerInfoUnk) { + printf("MultiplyLoaded::Initialize\n"); return InitializeCommon(pICorProfilerInfoUnk); } HRESULT MultiplyLoaded::InitializeForAttach(IUnknown* pICorProfilerInfoUnk, void* pvClientData, UINT cbClientData) { + printf("MultiplyLoaded::InitializeForAttach\n"); return InitializeCommon(pICorProfilerInfoUnk); } @@ -56,8 +57,8 @@ HRESULT MultiplyLoaded::ProfilerDetachSucceeded() ++_detachCount; printf("ProfilerDetachSucceeded _detachCount=%d\n", _detachCount.load()); - if (_detachCount == (MAX_PROFILERS - 1) - && _exceptionThrownSeenCount >= (MAX_PROFILERS - 1) + if (_detachCount == MAX_PROFILERS + && _exceptionThrownSeenCount >= MAX_PROFILERS && _failures == 0) { printf("PROFILER TEST PASSES\n"); @@ -69,9 +70,7 @@ HRESULT MultiplyLoaded::ProfilerDetachSucceeded() HRESULT MultiplyLoaded::ExceptionThrown(ObjectID thrownObjectId) { - int seen = _exceptionThrownSeenCount++; - - printf("MultiplyLoaded::ExceptionThrown, number seen = %d\n", seen); + printf("MultiplyLoaded::ExceptionThrown, number seen = %d\n", ++_exceptionThrownSeenCount); thread detachThread([&]() {