Title: [280191] trunk/Source/_javascript_Core
- Revision
- 280191
- Author
- [email protected]
- Date
- 2021-07-22 12:12:21 -0700 (Thu, 22 Jul 2021)
Log Message
useProfiler option should automatically disable concurrent JIT
https://bugs.webkit.org/show_bug.cgi?id=228152
Reviewed by Saam Barati.
The bytecode profiler is not thread safe so we should have
recomputeDependentOptions() disable concurrent JIT. Also, fix the
jsc CLI to set the useProfiler option rather than have its own
state. Note, we call Options::setOption() rather than setting the
Options::useProfiler() option directly as setOption calls
recomputeDependentOptions() for us.
* jsc.cpp:
(CommandLine::parseArguments):
(runJSC):
* runtime/Options.cpp:
(JSC::Options::recomputeDependentOptions):
(JSC::Options::ensureOptionsAreCoherent):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (280190 => 280191)
--- trunk/Source/_javascript_Core/ChangeLog 2021-07-22 19:00:36 UTC (rev 280190)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-07-22 19:12:21 UTC (rev 280191)
@@ -1,3 +1,24 @@
+2021-07-22 Keith Miller <[email protected]>
+
+ useProfiler option should automatically disable concurrent JIT
+ https://bugs.webkit.org/show_bug.cgi?id=228152
+
+ Reviewed by Saam Barati.
+
+ The bytecode profiler is not thread safe so we should have
+ recomputeDependentOptions() disable concurrent JIT. Also, fix the
+ jsc CLI to set the useProfiler option rather than have its own
+ state. Note, we call Options::setOption() rather than setting the
+ Options::useProfiler() option directly as setOption calls
+ recomputeDependentOptions() for us.
+
+ * jsc.cpp:
+ (CommandLine::parseArguments):
+ (runJSC):
+ * runtime/Options.cpp:
+ (JSC::Options::recomputeDependentOptions):
+ (JSC::Options::ensureOptionsAreCoherent):
+
2021-07-21 Yijia Huang <[email protected]>
Fix type check error in testb3
Modified: trunk/Source/_javascript_Core/jsc.cpp (280190 => 280191)
--- trunk/Source/_javascript_Core/jsc.cpp 2021-07-22 19:00:36 UTC (rev 280190)
+++ trunk/Source/_javascript_Core/jsc.cpp 2021-07-22 19:12:21 UTC (rev 280191)
@@ -429,7 +429,6 @@
bool m_module { false };
bool m_exitCode { false };
bool m_destroyVM { false };
- bool m_profile { false };
bool m_treatWatchdogExceptionAsSuccess { false };
bool m_alwaysDumpUncaughtException { false };
bool m_dumpMemoryFootprint { false };
@@ -3265,7 +3264,7 @@
if (!strcmp(arg, "-p")) {
if (++i == argc)
printUsageStatement();
- m_profile = true;
+ Options::setOption("useProfiler=1");
m_profilerOutput = argv[i];
continue;
}
@@ -3454,9 +3453,6 @@
JSLockHolder locker(vm);
startTimeoutThreadIfNeeded(vm);
- if (options.m_profile && !vm.m_perBytecodeProfiler)
- vm.m_perBytecodeProfiler = makeUnique<Profiler::Database>(vm);
-
globalObject = GlobalObject::create(vm, GlobalObject::createStructure(vm, jsNull()), options.m_arguments);
globalObject->setRemoteDebuggingEnabled(options.m_enableRemoteDebugging);
func(vm, globalObject, success);
@@ -3478,7 +3474,7 @@
printf("\n");
}
- if (options.m_profile) {
+ if (Options::useProfiler()) {
JSLockHolder locker(vm);
if (!vm.m_perBytecodeProfiler->save(options.m_profilerOutput.utf8().data()))
fprintf(stderr, "could not save profiler output.\n");
Modified: trunk/Source/_javascript_Core/runtime/Options.cpp (280190 => 280191)
--- trunk/Source/_javascript_Core/runtime/Options.cpp 2021-07-22 19:00:36 UTC (rev 280190)
+++ trunk/Source/_javascript_Core/runtime/Options.cpp 2021-07-22 19:12:21 UTC (rev 280191)
@@ -508,6 +508,9 @@
Options::useConcurrentJIT() = false;
}
+ if (Options::useProfiler())
+ Options::useConcurrentJIT() = false;
+
if (Options::alwaysUseShadowChicken())
Options::maximumInliningDepth() = 1;
@@ -1037,6 +1040,10 @@
coherent = false;
dataLog("INCOHERENT OPTIONS: at least one of useWasmLLInt or useBBQJIT must be true\n");
}
+ if (useProfiler() && useConcurrentJIT()) {
+ coherent = false;
+ dataLogLn("Bytecode profiler is not concurrent JIT safe.");
+ }
if (!coherent)
CRASH();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes