Changeset 192401 in webkit


Ignore:
Timestamp:
Nov 12, 2015 6:53:52 PM (8 years ago)
Author:
ggaren@apple.com
Message:

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

Reviewed by Andreas Kling.

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

  • bytecode/CodeBlock.cpp:

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

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r192400 r192401  
     12015-11-12  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Restore CodeBlock jettison code I accidentally removed
     4        https://bugs.webkit.org/show_bug.cgi?id=151241
     5
     6        Reviewed by Andreas Kling.
     7
     8        I meant to add this back in <http://trac.webkit.org/changeset/190827>
     9        but I missed.
     10
     11        * bytecode/CodeBlock.cpp:
     12        (JSC::timeToLive):
     13        (JSC::CodeBlock::shouldJettisonDueToOldAge):
     14
    1152015-11-12  Filip Pizlo  <fpizlo@apple.com>
    216
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r192203 r192401  
    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 = {
     
    24182440bool CodeBlock::shouldJettisonDueToOldAge()
    24192441{
    2420     return false;
     2442    if (Heap::isMarked(this))
     2443        return false;
     2444
     2445    if (timeSinceCreation() < timeToLive(jitType()))
     2446        return false;
     2447
     2448    return true;
    24212449}
    24222450
Note: See TracChangeset for help on using the changeset viewer.