Changeset 195550 in webkit


Ignore:
Timestamp:
Jan 25, 2016 1:04:28 PM (8 years ago)
Author:
akling@apple.com
Message:

Restore CodeBlock jettison code Geoff accidentally removed
https://bugs.webkit.org/show_bug.cgi?id=151241

Rubber-stamped by Geoffrey Garen.

Geoff meant to add this back in <http://trac.webkit.org/changeset/190827>
but missed.

Then he added it back in, but it was rolled out due to a crash on Animometer.
I can no longer produce a crash on Animometer, either with today's version of
the benchmark, or the one that existed at the time of the rollout.

Given this, let's roll it back in and see how it goes.

  • bytecode/CodeBlock.cpp:

(JSC::timeToLive):
(JSC::CodeBlock::shouldJettisonDueToOldAge):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r195549 r195550  
     12016-01-25  Andreas Kling  <akling@apple.com>
     2
     3        Restore CodeBlock jettison code Geoff accidentally removed
     4        https://bugs.webkit.org/show_bug.cgi?id=151241
     5
     6        Rubber-stamped by Geoffrey Garen.
     7
     8        Geoff meant to add this back in <http://trac.webkit.org/changeset/190827>
     9        but missed.
     10
     11        Then he added it back in, but it was rolled out due to a crash on Animometer.
     12        I can no longer produce a crash on Animometer, either with today's version of
     13        the benchmark, or the one that existed at the time of the rollout.
     14
     15        Given this, let's roll it back in and see how it goes.
     16
     17        * bytecode/CodeBlock.cpp:
     18        (JSC::timeToLive):
     19        (JSC::CodeBlock::shouldJettisonDueToOldAge):
     20
    1212016-01-22  Filip Pizlo  <fpizlo@apple.com>
    222
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r194786 r195550  
    8181
    8282namespace JSC {
     83
     84static std::chrono::milliseconds timeToLive(JITCode::JITType jitType)
     85{
     86    switch (jitType) {
     87    case JITCode::InterpreterThunk:
     88        return std::chrono::duration_cast<std::chrono::milliseconds>(
     89            std::chrono::seconds(5));
     90    case JITCode::BaselineJIT:
     91        // Effectively 10 additional seconds, since BaselineJIT and
     92        // InterpreterThunk share a CodeBlock.
     93        return std::chrono::duration_cast<std::chrono::milliseconds>(
     94            std::chrono::seconds(15));
     95    case JITCode::DFGJIT:
     96        return std::chrono::duration_cast<std::chrono::milliseconds>(
     97            std::chrono::seconds(20));
     98    case JITCode::FTLJIT:
     99        return std::chrono::duration_cast<std::chrono::milliseconds>(
     100            std::chrono::seconds(60));
     101    default:
     102        return std::chrono::milliseconds::max();
     103    }
     104}
    83105
    84106const ClassInfo CodeBlock::s_info = {
     
    25312553bool CodeBlock::shouldJettisonDueToOldAge()
    25322554{
    2533     return false;
     2555    if (Heap::isMarked(this))
     2556        return false;
     2557
     2558    if (timeSinceCreation() < timeToLive(jitType()))
     2559        return false;
     2560
     2561    return true;
    25342562}
    25352563
Note: See TracChangeset for help on using the changeset viewer.