Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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