RESOLVED FIXED 174907
Update lock benchmarks
https://bugs.webkit.org/show_bug.cgi?id=174907
Summary Update lock benchmarks
JF Bastien
Reported 2017-07-27 15:11:29 PDT
It's just not there anymore.
Attachments
patch (1.43 KB, patch)
2017-07-27 15:12 PDT, JF Bastien
fpizlo: review-
patch (12.01 KB, patch)
2017-07-27 18:20 PDT, JF Bastien
fpizlo: review+
fpizlo: commit-queue+
patch (11.99 KB, patch)
2017-07-27 18:26 PDT, JF Bastien
commit-queue: commit-queue-
patch (11.99 KB, patch)
2017-07-27 18:29 PDT, JF Bastien
no flags
JF Bastien
Comment 1 2017-07-27 15:12:32 PDT
Filip Pizlo
Comment 2 2017-07-27 15:13:42 PDT
Comment on attachment 316575 [details] patch I think the proper fix is to introduce a pthread_mutex-based lock, so that we have one in the test.
JF Bastien
Comment 3 2017-07-27 18:16:38 PDT
I'm updating all the benchmarks now.
JF Bastien
Comment 4 2017-07-27 18:20:06 PDT
Created attachment 316588 [details] patch Update to use new APIs, fix command-line, use std::mutex instead of deleted Mutex, and add unfair lock if available.
Build Bot
Comment 5 2017-07-27 18:22:03 PDT
Attachment 316588 [details] did not pass style-queue: ERROR: Source/WTF/benchmarks/ToyLocks.h:476: preprocessor directives (e.g., #ifdef, #define, #import) should never be indented. [whitespace/indent] [4] ERROR: Source/WTF/benchmarks/ToyLocks.h:476: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:477: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:478: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:478: l is incorrectly named. Don't use the single letter 'l' as an identifier name. [readability/naming] [4] ERROR: Source/WTF/benchmarks/ToyLocks.h:479: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:480: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:481: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:482: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:483: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:484: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:485: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:486: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:487: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WTF/benchmarks/ToyLocks.h:488: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 15 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 6 2017-07-27 18:24:11 PDT
Comment on attachment 316588 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=316588&action=review I think this is OK to land, but it would have been nicer if you hadn't used std:: types. > Source/WTF/benchmarks/ConditionSpeedTest.cpp:76 > -template<typename Functor, typename ConditionType, typename LockType> > -void wait(ConditionType& condition, LockType& lock, const Functor& predicate) > + template<typename Functor, typename ConditionType, typename LockType, typename std::enable_if<!std::is_same<ConditionType, std::condition_variable>::value>::type* = nullptr> > + void wait(ConditionType& condition, LockType& lock, std::unique_lock<LockType>&, const Functor& predicate) > { > while (!predicate()) > condition.wait(lock); > } > > +template<typename Functor, typename ConditionType, typename LockType, typename std::enable_if<std::is_same<ConditionType, std::condition_variable>::value>::type* = nullptr> > +void wait(ConditionType& condition, LockType&, std::unique_lock<LockType>& locker, const Functor& predicate) > +{ > + while (!predicate()) > + condition.wait(locker); > +} > + This is really gross. You wouldn't have had to do this if you wrote your own SystemMutex/SystemCondition that wrapped pthread_mutex_t/pthread_cond_t.
JF Bastien
Comment 7 2017-07-27 18:26:54 PDT
Created attachment 316590 [details] patch Fix indentation.
JF Bastien
Comment 8 2017-07-27 18:27:30 PDT
(In reply to Filip Pizlo from comment #6) > Comment on attachment 316588 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=316588&action=review > > I think this is OK to land, but it would have been nicer if you hadn't used > std:: types. > > > Source/WTF/benchmarks/ConditionSpeedTest.cpp:76 > > -template<typename Functor, typename ConditionType, typename LockType> > > -void wait(ConditionType& condition, LockType& lock, const Functor& predicate) > > + template<typename Functor, typename ConditionType, typename LockType, typename std::enable_if<!std::is_same<ConditionType, std::condition_variable>::value>::type* = nullptr> > > + void wait(ConditionType& condition, LockType& lock, std::unique_lock<LockType>&, const Functor& predicate) > > { > > while (!predicate()) > > condition.wait(lock); > > } > > > > +template<typename Functor, typename ConditionType, typename LockType, typename std::enable_if<std::is_same<ConditionType, std::condition_variable>::value>::type* = nullptr> > > +void wait(ConditionType& condition, LockType&, std::unique_lock<LockType>& locker, const Functor& predicate) > > +{ > > + while (!predicate()) > > + condition.wait(locker); > > +} > > + > > This is really gross. You wouldn't have had to do this if you wrote your > own SystemMutex/SystemCondition that wrapped pthread_mutex_t/pthread_cond_t. True, I wanted to test "whatever C++ gives us" though :)
WebKit Commit Bot
Comment 9 2017-07-27 18:27:46 PDT
Comment on attachment 316590 [details] patch Rejecting attachment 316590 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 316590, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit ChangeLog entry in Source/WTF/ChangeLog contains OOPS!. Full output: http://webkit-queues.webkit.org/results/4199436
JF Bastien
Comment 10 2017-07-27 18:29:55 PDT
Created attachment 316592 [details] patch Fix oops.
WebKit Commit Bot
Comment 11 2017-07-27 19:17:16 PDT
The commit-queue encountered the following flaky tests while processing attachment 316592 [details]: media/modern-media-controls/seek-backward-support/seek-backward-support.html bug 174916 (authors: graouts@apple.com, mcatanzaro@igalia.com, and ryanhaddad@apple.com) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 12 2017-07-27 19:17:40 PDT
Comment on attachment 316592 [details] patch Clearing flags on attachment: 316592 Committed r219988: <http://trac.webkit.org/changeset/219988>
WebKit Commit Bot
Comment 13 2017-07-27 19:17:42 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 14 2017-07-28 16:21:58 PDT
Radar WebKit Bug Importer
Comment 15 2017-07-28 16:23:06 PDT
Note You need to log in before you can comment on or make changes to this bug.