Ignore:
Timestamp:
Jun 25, 2012, 7:53:39 PM (13 years ago)
Author:
[email protected]
Message:

JSC should try to make profiling deterministic because otherwise reproducing failures is
nearly impossible
https://bugs.webkit.org/show_bug.cgi?id=89940

Rubber stamped by Gavin Barraclough.

This rolls out the part of http://trac.webkit.org/changeset/121215 that introduced randomness
into the system. Now, instead of randomizing the tier-up threshold, we always set it to an
artificially low (and statically predetermined!) value. This gives most of the benefit of
threshold randomization without actually making the system behave completely differently on
each invocation.

  • bytecode/ExecutionCounter.cpp:

(JSC::ExecutionCounter::setThreshold):

  • runtime/Options.cpp:

(Options):
(JSC::Options::initializeOptions):

  • runtime/Options.h:

(Options):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/ExecutionCounter.cpp

    r121215 r121218  
    145145    }
    146146
    147     int32_t maxThreshold =
    148         codeBlock->globalObject()->weakRandomInteger() % Options::maximumExecutionCountsBetweenCheckpoints;
     147    int32_t maxThreshold;
     148    if (Options::randomizeExecutionCountsBetweenCheckpoints)
     149        maxThreshold = codeBlock->globalObject()->weakRandomInteger() % Options::maximumExecutionCountsBetweenCheckpoints;
     150    else
     151        maxThreshold = Options::maximumExecutionCountsBetweenCheckpoints;
    149152    if (threshold > maxThreshold)
    150153        threshold = maxThreshold;
Note: See TracChangeset for help on using the changeset viewer.