WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
170097
[JSC] Move platformThreadSignal to WTF
https://bugs.webkit.org/show_bug.cgi?id=170097
Summary
[JSC] Move platformThreadSignal to WTF
Yusuke Suzuki
Reported
2017-03-25 04:55:20 PDT
[JSC] Move platformThreadSignal to WTF
Attachments
Patch
(7.72 KB, patch)
2017-03-25 04:57 PDT
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2017-03-25 04:57:24 PDT
Created
attachment 305375
[details]
Patch
Yusuke Suzuki
Comment 2
2017-03-25 05:01:17 PDT
Comment on
attachment 305375
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=305375&action=review
> Source/JavaScriptCore/runtime/JSLock.cpp:112 > + m_ownerThread = currentThread();
I think it does not cause so much cost. Basically, currentThread() just loads a identifier from thread local storage.
Mark Lam
Comment 3
2017-03-27 13:05:33 PDT
Comment on
attachment 305375
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=305375&action=review
>> Source/JavaScriptCore/runtime/JSLock.cpp:112 >> + m_ownerThread = currentThread(); > > I think it does not cause so much cost. Basically, currentThread() just loads a identifier from thread local storage.
I think this is fine but I would like to run it on some benchmarks first just to make sure. I'll r+ if I don't find any issues.
Mark Lam
Comment 4
2017-03-28 12:42:46 PDT
(In reply to Mark Lam from
comment #3
)
> >> Source/JavaScriptCore/runtime/JSLock.cpp:112 > >> + m_ownerThread = currentThread(); > > > > I think it does not cause so much cost. Basically, currentThread() just loads a identifier from thread local storage. > > I think this is fine but I would like to run it on some benchmarks first > just to make sure. I'll r+ if I don't find any issues.
I've run the JSC benchmarks and Speedometer. Perf is neutral.
Mark Lam
Comment 5
2017-03-28 12:43:07 PDT
Comment on
attachment 305375
[details]
Patch r=me
Yusuke Suzuki
Comment 6
2017-03-28 13:01:05 PDT
(In reply to Mark Lam from
comment #4
)
> (In reply to Mark Lam from
comment #3
) > > >> Source/JavaScriptCore/runtime/JSLock.cpp:112 > > >> + m_ownerThread = currentThread(); > > > > > > I think it does not cause so much cost. Basically, currentThread() just loads a identifier from thread local storage. > > > > I think this is fine but I would like to run it on some benchmarks first > > just to make sure. I'll r+ if I don't find any issues. > > I've run the JSC benchmarks and Speedometer. Perf is neutral.
Thanks!!
Yusuke Suzuki
Comment 7
2017-03-28 13:08:58 PDT
Committed
r214489
: <
http://trac.webkit.org/changeset/214489
>
JF Bastien
Comment 8
2017-03-29 14:30:57 PDT
Comment on
attachment 305375
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=305375&action=review
> Source/JavaScriptCore/runtime/VMTraps.cpp:458 > + signalThread(optionalOwnerThread.value(), SIGUSR1);
This function is only defined for USE(PTHREAD), no? Won't that break configurations which aren't USE(PTHREAD) but which build VMTraps.cpp?
Mark Lam
Comment 9
2017-03-29 14:48:32 PDT
(In reply to JF Bastien from
comment #8
)
> Comment on
attachment 305375
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=305375&action=review
> > > Source/JavaScriptCore/runtime/VMTraps.cpp:458 > > + signalThread(optionalOwnerThread.value(), SIGUSR1); > > This function is only defined for USE(PTHREAD), no? Won't that break > configurations which aren't USE(PTHREAD) but which build VMTraps.cpp?
There's a fall back to a polling based VMTraps for platforms that don't support this. Right now, the signaling implementation is only used on an opt-in basis.
Mark Lam
Comment 10
2017-03-29 15:07:15 PDT
Comment on
attachment 305375
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=305375&action=review
>>> Source/JavaScriptCore/runtime/VMTraps.cpp:458 >>> + signalThread(optionalOwnerThread.value(), SIGUSR1); >> >> This function is only defined for USE(PTHREAD), no? Won't that break configurations which aren't USE(PTHREAD) but which build VMTraps.cpp? > > There's a fall back to a polling based VMTraps for platforms that don't support this. Right now, the signaling implementation is only used on an opt-in basis.
Also USE(PTHREAD) is true for all OS(UNIX), and OS(UNIX) is true for OS(DARWIN), etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug