Changeset 92892 in webkit


Ignore:
Timestamp:
Aug 11, 2011 5:11:08 PM (13 years ago)
Author:
fpizlo@apple.com
Message:

DFG JIT verbose mode does not report the generated types of nodes
https://bugs.webkit.org/show_bug.cgi?id=65830

Reviewed by Sam Weinig.

Added code that prints the type selected for each node's result.

  • dfg/DFGGenerationInfo.h:

(JSC::DFG::dataFormatToString):

  • dfg/DFGNonSpeculativeJIT.cpp:

(JSC::DFG::NonSpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compile):

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r92880 r92892  
     12011-08-11  Filip Pizlo  <fpizlo@apple.com>
     2
     3        DFG JIT verbose mode does not report the generated types of nodes
     4        https://bugs.webkit.org/show_bug.cgi?id=65830
     5
     6        Reviewed by Sam Weinig.
     7       
     8        Added code that prints the type selected for each node's result.
     9
     10        * dfg/DFGGenerationInfo.h:
     11        (JSC::DFG::dataFormatToString):
     12        * dfg/DFGNonSpeculativeJIT.cpp:
     13        (JSC::DFG::NonSpeculativeJIT::compile):
     14        * dfg/DFGSpeculativeJIT.cpp:
     15        (JSC::DFG::SpeculativeJIT::compile):
     16
    1172011-08-11  James Robinson  <jamesr@chromium.org>
    218
  • trunk/Source/JavaScriptCore/dfg/DFGGenerationInfo.h

    r91804 r92892  
    4949    DataFormatJSCell = DataFormatJS | DataFormatCell,
    5050};
     51
     52#ifndef NDEBUG
     53inline const char* dataFormatToString(DataFormat dataFormat)
     54{
     55    switch (dataFormat) {
     56    case DataFormatNone:
     57        return "None";
     58    case DataFormatInteger:
     59        return "Integer";
     60    case DataFormatDouble:
     61        return "Double";
     62    case DataFormatCell:
     63        return "Cell";
     64    case DataFormatJS:
     65        return "JS";
     66    case DataFormatJSInteger:
     67        return "JSInteger";
     68    case DataFormatJSDouble:
     69        return "JSDouble";
     70    case DataFormatJSCell:
     71        return "JSCell";
     72    default:
     73        return "Unknown";
     74    }
     75}
     76#endif
    5177
    5278inline bool needDataFormatConversion(DataFormat from, DataFormat to)
  • trunk/Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.cpp

    r92710 r92892  
    11871187
    11881188#if DFG_DEBUG_VERBOSE
    1189         fprintf(stderr, "NonSpeculativeJIT generating Node @%d at code offset 0x%x\n", (int)m_compileIndex, m_jit.debugOffset());
     1189        fprintf(stderr, "NonSpeculativeJIT generating Node @%d at code offset 0x%x   ", (int)m_compileIndex, m_jit.debugOffset());
    11901190#endif
    11911191#if DFG_JIT_BREAK_ON_EVERY_NODE
     
    11951195        checkConsistency();
    11961196        compile(checkIterator, node);
     1197#if DFG_DEBUG_VERBOSE
     1198        if (node.hasResult())
     1199            fprintf(stderr, "-> %s\n", dataFormatToString(m_generationInfo[node.virtualRegister()].registerFormat()));
     1200        else
     1201            fprintf(stderr, "\n");
     1202#endif
    11971203        checkConsistency();
    11981204    }
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r92593 r92892  
    12841284
    12851285#if DFG_DEBUG_VERBOSE
    1286         fprintf(stderr, "SpeculativeJIT generating Node @%d at JIT offset 0x%x\n", (int)m_compileIndex, m_jit.debugOffset());
     1286        fprintf(stderr, "SpeculativeJIT generating Node @%d at JIT offset 0x%x   ", (int)m_compileIndex, m_jit.debugOffset());
    12871287#endif
    12881288#if DFG_JIT_BREAK_ON_EVERY_NODE
     
    12931293        if (!m_compileOkay)
    12941294            return;
     1295#if DFG_DEBUG_VERBOSE
     1296        if (node.hasResult())
     1297            fprintf(stderr, "-> %s\n", dataFormatToString(m_generationInfo[node.virtualRegister()].registerFormat()));
     1298        else
     1299            fprintf(stderr, "\n");
     1300#endif
    12951301        checkConsistency();
    12961302    }
Note: See TracChangeset for help on using the changeset viewer.