Title: [202791] trunk/Source/WTF
- Revision
- 202791
- Author
- [email protected]
- Date
- 2016-07-03 10:47:51 -0700 (Sun, 03 Jul 2016)
Log Message
Ugh. Once again, unreviewed, roll out unintentional commit in r202790.
* benchmarks/LockFairnessTest.cpp:
(main):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (202790 => 202791)
--- trunk/Source/WTF/ChangeLog 2016-07-03 17:46:39 UTC (rev 202790)
+++ trunk/Source/WTF/ChangeLog 2016-07-03 17:47:51 UTC (rev 202791)
@@ -1,3 +1,10 @@
+2016-07-03 Filip Pizlo <[email protected]>
+
+ Ugh. Once again, unreviewed, roll out unintentional commit in r202790.
+
+ * benchmarks/LockFairnessTest.cpp:
+ (main):
+
2016-07-02 Dan Bernstein <[email protected]>
Build fix.
Modified: trunk/Source/WTF/benchmarks/LockFairnessTest.cpp (202790 => 202791)
--- trunk/Source/WTF/benchmarks/LockFairnessTest.cpp 2016-07-03 17:46:39 UTC (rev 202790)
+++ trunk/Source/WTF/benchmarks/LockFairnessTest.cpp 2016-07-03 17:47:51 UTC (rev 202791)
@@ -48,13 +48,12 @@
NO_RETURN void usage()
{
- printf("Usage: LockFairnessTest yieldspinlock|pausespinlock|wordlock|lock|barginglock|bargingwordlock|thunderlock|thunderwordlock|cascadelock|cascadewordlockhandofflock|mutex|all <num threads> <seconds per test> <microseconds in critical section>\n");
+ printf("Usage: LockFairnessTest yieldspinlock|pausespinlock|wordlock|lock|barginglock|bargingwordlock|thunderlock|thunderwordlock|cascadelock|cascadewordlockhandofflock|mutex|all <num threads> <seconds per test>\n");
exit(1);
}
unsigned numThreads;
double secondsPerTest;
-unsigned microsecondsInCriticalSection;
struct Benchmark {
template<typename LockType>
@@ -73,19 +72,9 @@
threads[threadIndex] = createThread(
"Benchmark Thread",
[&, threadIndex] () {
- if (!microsecondsInCriticalSection) {
- while (keepGoing) {
- lock.lock();
- counts[threadIndex]++;
- lock.unlock();
- }
- return;
- }
-
while (keepGoing) {
lock.lock();
counts[threadIndex]++;
- usleep(microsecondsInCriticalSection);
lock.unlock();
}
});
@@ -96,8 +85,8 @@
sleep(secondsPerTest);
+ lock.lock();
keepGoing = false;
- lock.lock();
dataLog(name, ": ");
CommaPrinter comma;
@@ -117,10 +106,9 @@
{
WTF::initializeThreading();
- if (argc != 5
+ if (argc != 4
|| sscanf(argv[2], "%u", &numThreads) != 1
- || sscanf(argv[3], "%lf", &secondsPerTest) != 1
- || sscanf(argv[4], "%u", µsecondsInCriticalSection) != 1)
+ || sscanf(argv[3], "%lf", &secondsPerTest) != 1)
usage();
runEverything<Benchmark>(argv[1]);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes