Skip to content

Commit

Permalink
Disable profile recording if arrays have failed to be allocated
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalykov committed Jul 19, 2021
1 parent e06e952 commit 6a8e8e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/coreclr/vm/multicorejit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,8 @@ void MulticoreJitManager::StartProfile(AppDomain * pDomain, ICLRPrivBinder *pBin

if (pRecorder != NULL)
{
gatherProfile = pRecorder->CanGatherProfile();

m_pMulticoreJitRecorder = pRecorder;

LONG sessionID = m_ProfileSession.Increment();
Expand Down
7 changes: 7 additions & 0 deletions src/coreclr/vm/multicorejitimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,13 @@ class MulticoreJitRecorder
#endif // !TARGET_UNIX
}

bool CanGatherProfile()
{
LIMITED_METHOD_CONTRACT;

return m_ModuleList != NULL && m_JitInfoArray != NULL;
}

bool IsAtFullCapacity() const
{
LIMITED_METHOD_CONTRACT;
Expand Down

0 comments on commit 6a8e8e1

Please sign in to comment.