未验证 提交 8861275a 编写于 作者: B Bruce Forstall 提交者: GitHub

Don't do STRESS_PROFILER_CALLBACKS when pre-JITing (#2016)

This leads us to generate an illegal relocation fixup.

Fixes #1789
上级 5a948f14
......@@ -3092,11 +3092,17 @@ void Compiler::compInitOptions(JitFlags* jitFlags)
// Honour COMPlus_JitELTHookEnabled or STRESS_PROFILER_CALLBACKS stress mode
// only if VM has not asked us to generate profiler hooks in the first place.
// That is, override VM only if it hasn't asked for a profiler callback for this method.
if (!compProfilerHookNeeded &&
((JitConfig.JitELTHookEnabled() != 0) || compStressCompile(STRESS_PROFILER_CALLBACKS, 5)))
// Don't run this stress mode when pre-JITing, as we would need to emit a relocation
// for the call to the fake ELT hook, which wouldn't make sense, as we can't store that
// in the pre-JIT image.
if (!compProfilerHookNeeded)
{
if ((JitConfig.JitELTHookEnabled() != 0) ||
(!jitFlags->IsSet(JitFlags::JIT_FLAG_PREJIT) && compStressCompile(STRESS_PROFILER_CALLBACKS, 5)))
{
opts.compJitELTHookEnabled = true;
}
}
// TBD: Exclude PInvoke stubs
if (opts.compJitELTHookEnabled)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册