Summary: | Add option to JSC shell to wait for a USR2 signal before exiting to aid in collection of vmmaps | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Justin Michaud <justin_michaud> | ||||||||||
Component: | New Bugs | Assignee: | Justin Michaud <justin_michaud> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Justin Michaud
2022-04-29 17:29:06 PDT
Created attachment 458620 [details]
Patch
Comment on attachment 458620 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458620&action=review > Source/WTF/wtf/threads/Signals.h:66 > + case Signal::Usr: return std::make_tuple(SIGUSR2, std::nullopt); Either I fixed a happy little bug, or I am about to feel the wrath of some deep horrible bug that this works around Comment on attachment 458620 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=458620&action=review r=me with comments. > Source/JavaScriptCore/jsc.cpp:3041 > + Lock waitToExitLock; > + Condition waitToExitCondition; > + bool mustWaitToExit = true; > + You can use WTF::BinarySemaphore instead. > Source/JavaScriptCore/jsc.cpp:3049 > + { > + Locker locker { waitToExitLock }; > + mustWaitToExit = false; > + waitToExitCondition.notifyAll(); > + } Ditto. > Source/JavaScriptCore/jsc.cpp:3078 > + { > + Locker locker { waitToExitLock }; > + while (mustWaitToExit) > + waitToExitCondition.wait(waitToExitLock); > + } > + Ditto. >> Source/WTF/wtf/threads/Signals.h:66 >> + case Signal::Usr: return std::make_tuple(SIGUSR2, std::nullopt); > > Either I fixed a happy little bug, or I am about to feel the wrath of some deep horrible bug that this works around Currently, Signal::Usr is not used. So yeah, it is a bug, but it will not affect on the existing code :) Created attachment 458622 [details]
Patch
I'm going to land once EWS finishes. Created attachment 458627 [details]
Patch
ChangeLog entry in Source/JavaScriptCore/ChangeLog contains OOPS!. Created attachment 458705 [details]
Patch
Committed r293688 (250186@main): <https://commits.webkit.org/250186@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 458705 [details]. |