Skip to content

Commit

Permalink
Update multiple.cpp (#98685)
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason authored Feb 21, 2024
1 parent 11bdd1b commit 3338d4a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/tests/profiler/native/multiple/multiple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand All @@ -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);
}

Expand All @@ -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");
Expand All @@ -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([&]()
{
Expand Down

0 comments on commit 3338d4a

Please sign in to comment.