Ignore:
Timestamp:
Jul 10, 2015, 7:30:04 PM (10 years ago)
Author:
[email protected]
Message:

It should be easy to measure total compile times.
https://bugs.webkit.org/show_bug.cgi?id=146857

Reviewed by Sam Weinig.

This gives DFG::Plan the ability to track total compile times, and return them in a map
of stats that jsc.cpp can display.

I want to do some work to bring down DFG compile times. This will help me measure whether
I'm making a difference or not.

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::~Plan):
(JSC::DFG::Plan::computeCompileTimes):
(JSC::DFG::Plan::reportCompileTimes):
(JSC::DFG::Plan::compileInThread):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::cancel):
(JSC::DFG::Plan::compileTimeStats):
(JSC::DFG::dumpAndVerifyGraph): Deleted.
(JSC::DFG::profilerCompilationKindForMode): Deleted.

  • dfg/DFGPlan.h:

(JSC::DFG::Plan::compileTimeStats):

  • jsc.cpp:

(jscmain):

  • runtime/Options.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jsc.cpp

    r186605 r186701  
    2929#include "Completion.h"
    3030#include "CopiedSpaceInlines.h"
     31#include "DFGPlan.h"
    3132#include "Disassembler.h"
    3233#include "Exception.h"
     
    15571558        }
    15581559#endif
     1560        auto compileTimeStats = DFG::Plan::compileTimeStats();
     1561        Vector<CString> compileTimeKeys;
     1562        for (auto& entry : compileTimeStats)
     1563            compileTimeKeys.append(entry.key);
     1564        std::sort(compileTimeKeys.begin(), compileTimeKeys.end());
     1565        for (CString key : compileTimeKeys)
     1566            printf("%40s: %.3lf ms\n", key.data(), compileTimeStats.get(key));
    15591567    }
    15601568   
Note: See TracChangeset for help on using the changeset viewer.