Skip to content

Commit

Permalink
Jitdump fixes (#87547)
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason authored Jun 15, 2023
1 parent 171a525 commit 3c2ebd5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
11 changes: 2 additions & 9 deletions src/coreclr/pal/src/misc/perfjitdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,6 @@ struct PerfJitDumpState
enabled = true;

exit:
if (result != 0)
return FatalError();

return 0;
}

Expand Down Expand Up @@ -298,10 +295,8 @@ struct PerfJitDumpState
} while (result > 0);
} while (true);

exit:
if (result != 0)
return FatalError();
}
exit:
return 0;
}

Expand Down Expand Up @@ -337,10 +332,8 @@ struct PerfJitDumpState
return FatalError();

fd = -1;
exit:
if (result != 0)
return -1;
}
exit:
return 0;
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ ds_rt_enable_perfmap (uint32_t type)

#ifdef FEATURE_PERFMAP
PerfMap::PerfMapType perfMapType = (PerfMap::PerfMapType)type;
if (perfMapType == PerfMap::PerfMapType::DISABLED || perfMapType > PerfMap::PerfMapType::JITDUMP)
if (perfMapType == PerfMap::PerfMapType::DISABLED || perfMapType > PerfMap::PerfMapType::PERFMAP)
{
return DS_IPC_E_INVALIDARG;
}
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/vm/perfmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ void PerfMap::Enable(PerfMapType type, bool sendExisting)
IJitManager::MethodRegionInfo methodRegionInfo;
codeInfo.GetMethodRegionInfo(&methodRegionInfo);
_ASSERTE(methodRegionInfo.hotStartAddress == codeStart);
_ASSERTE(methodRegionInfo.hotSize > 0);

PrepareCodeConfig config(!nativeCodeVersion.IsNull() ? nativeCodeVersion : NativeCodeVersion(pMethod), FALSE, FALSE);
PerfMap::LogJITCompiledMethod(pMethod, codeStart, methodRegionInfo.hotSize, &config);
Expand Down

0 comments on commit 3c2ebd5

Please sign in to comment.