Thanks to visit codestin.com
Credit goes to github.com

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
9 changes: 9 additions & 0 deletions src/coreclr/jit/fgprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2189,6 +2189,15 @@ PhaseStatus Compiler::fgPrepareToInstrumentMethod()
const bool minimalProfiling =
prejit ? (JitConfig.JitMinimalPrejitProfiling() > 0) : (JitConfig.JitMinimalJitProfiling() > 0);

// In majority of cases, methods marked with [Intrinsic] are imported directly
// in Tier1 so the profile will never be consumed. Thus, let's avoid unnecessary probes.
if (minimalProfiling && (info.compFlags & CORINFO_FLG_INTRINSIC) != 0)
{
fgCountInstrumentor = new (this, CMK_Pgo) NonInstrumentor(this);
fgHistogramInstrumentor = new (this, CMK_Pgo) NonInstrumentor(this);
return PhaseStatus::MODIFIED_NOTHING;
}

if (minimalProfiling && (fgBBcount < 2))
{
// Don't instrumenting small single-block methods.
Expand Down