Summary: | Replace WTF::ThreadingOnce with std::call_once | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Anders Carlsson <andersca> | ||||
Component: | New Bugs | Assignee: | Anders Carlsson <andersca> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, cmarcelo, commit-queue, sam | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Anders Carlsson
2013-12-24 09:55:32 PST
Created attachment 219977 [details]
Patch
Attachment 219977 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/dfg/DFGWorklist.cpp', u'Source/JavaScriptCore/runtime/InitializeThreading.cpp', u'Source/WTF/ChangeLog', u'Source/WTF/GNUmakefile.list.am', u'Source/WTF/wtf/CompilationThread.cpp', u'Source/WTF/wtf/ThreadingOnce.h', '--commit-queue']" exit_code: 1
ERROR: Source/JavaScriptCore/runtime/InitializeThreading.cpp:55: Missing space before { [whitespace/braces] [5]
ERROR: Source/WTF/wtf/CompilationThread.cpp:41: Missing space before { [whitespace/braces] [5]
Total errors found: 2 in 5 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Not that it matters in these places much, but how does the performance of std::call_once compare to pthread_once and dispatch_once? I see in libc++'s implementation there is comment stating it should consider moving to dispatch_once (presumably for performance reasons) http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/mutex.cpp?view=markup#l209. The comment seems predicated on dispatch_once_f supporting c++ exceptions, but perhaps the maintainers would consider an optimized version when exceptions were disabled as they are with WebKit. (In reply to comment #3) > Not that it matters in these places much, but how does the performance of std::call_once compare to pthread_once and dispatch_once? It's faster than pthread_once since the first check ends up being inlined. Comment on attachment 219977 [details] Patch Clearing flags on attachment: 219977 Committed r161146: <http://trac.webkit.org/changeset/161146> All reviewed patches have been landed. Closing bug. |