Changeset 202781 in webkit


Ignore:
Timestamp:
Jul 2, 2016 10:47:52 AM (8 years ago)
Author:
fpizlo@apple.com
Message:

Unreviewed, roll back unintentional commit in r202778.

  • benchmarks/LockFairnessTest.cpp:

(main):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r202736 r202781  
     12016-07-02  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Unreviewed, roll back unintentional commit in r202778.
     4
     5        * benchmarks/LockFairnessTest.cpp:
     6        (main):
     7
    182016-07-01  Jer Noble  <jer.noble@apple.com>
    29
  • trunk/Source/WTF/benchmarks/LockFairnessTest.cpp

    r202778 r202781  
    4949NO_RETURN void usage()
    5050{
    51     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");
     51    printf("Usage: LockFairnessTest yieldspinlock|pausespinlock|wordlock|lock|barginglock|bargingwordlock|thunderlock|thunderwordlock|cascadelock|cascadewordlockhandofflock|mutex|all <num threads> <seconds per test>\n");
    5252    exit(1);
    5353}
     
    5555unsigned numThreads;
    5656double secondsPerTest;
    57 unsigned microsecondsInCriticalSection;
    5857
    5958struct Benchmark {
     
    7473                "Benchmark Thread",
    7574                [&, threadIndex] () {
    76                     if (!microsecondsInCriticalSection) {
    77                         while (keepGoing) {
    78                             lock.lock();
    79                             counts[threadIndex]++;
    80                             lock.unlock();
    81                         }
    82                         return;
    83                     }
    84                    
    8575                    while (keepGoing) {
    8676                        lock.lock();
    8777                        counts[threadIndex]++;
    88                         usleep(microsecondsInCriticalSection);
    8978                        lock.unlock();
    9079                    }
     
    118107    WTF::initializeThreading();
    119108   
    120     if (argc != 5
     109    if (argc != 4
    121110        || sscanf(argv[2], "%u", &numThreads) != 1
    122         || sscanf(argv[3], "%lf", &secondsPerTest) != 1
    123         || sscanf(argv[4], "%u", &microsecondsInCriticalSection) != 1)
     111        || sscanf(argv[3], "%lf", &secondsPerTest) != 1)
    124112        usage();
    125113   
Note: See TracChangeset for help on using the changeset viewer.