Changeset 248642 in webkit


Ignore:
Timestamp:
Aug 13, 2019 4:31:19 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

Add phase, block, and node numbers to left margin of DFG graph dumps.
https://bugs.webkit.org/show_bug.cgi?id=200693

Reviewed by Saam Barati.

When scrolling through the DFG graph dumps, it's easy to get lost as to which phase
or block one is looking at, especially if the blocks are long. This patch adds
node index, block number, and phase number on the left margin of the dumps.
Here's a sample:

53: %Bd:Function = 0x1079fd960:[Function, {}, NonArray, Proto:0x1079d8000, Leaf]
53: %Bf:Function = 0x1079b0700:[Function, {name:100, prototype:101, length:102, stackTraceLimit:103}, NonArray, Proto:0x1079d8000, Leaf]
53: %Bj:Function = 0x1079fd5e0:[Function, {name:100, length:101, toString:102, apply:103, call:104, bind:105, Symbol.hasInstance:106, caller:107, arguments:108, constructor:109}, NonArray, Proto:0x1079c0000, Leaf]
53: %CV:JSGlobalLexicalEnvironment = 0x1079fd6c0:[JSGlobalLexicalEnvironment, {}, NonArray, Leaf]

53: Phase liveness analysis changed the IR.

54: Beginning DFG phase OSR availability analysis.
54: Before OSR availability analysis:

54: DFG for foo#DXMNag:[0x1079a4850->0x1079a4130->0x1079c7600, DFGFunctionCall, 204 (NeverInline)]:
54: Fixpoint state: FixpointConverged; Form: SSA; Unification state: GloballyUnified; Ref count state: ExactRefCount
54: Argument formats for entrypoint index: 0 : FlushedJSValue, FlushedCell, FlushedJSValue

0 54: Block #0 (bc#0): (OSR target)
0 54: Execution count: 1.000000
0 54: Predecessors:
0 54: Successors:
0 54: Dominated by: #0
0 54: Dominates: #0
0 54: Dominance Frontier:
0 54: Iterated Dominance Frontier:
0 54: Backwards dominates by: #root #0
0 54: Backwards dominates: #0
0 54: Control equivalent to: #0
0 54: States: StructuresAreWatched
0 54: Live:
0 54: Values

0 0 54: 53:< 1:-> JSConstant(JS|UseAsOther, Other, Null, bc#0, ExitValid)
1 0 54: 64:< 2:-> JSConstant(JS|UseAsOther, NonBoolInt32, Int32: 10, bc#0, ExitValid)
2 0 54: 3:< 5:-> JSConstant(JS|PureInt, Other, Undefined, bc#0, ExitValid)
3 0 54: 32:< 1:-> JSConstant(JS|UseAsOther, Bool, False, bc#0, ExitValid)
4 0 54: 19:< 2:-> JSConstant(JS|UseAsOther, OtherObj, Weak:Object: 0x1079d4000 with butterfly 0x0 (Structure %CV:JSGlobalLexicalEnvironment), StructureID: 31423, bc#0, ExitValid)

The numbers in the left margin before the ':' are node index (i.e. the index of the
node in the block, not to be confused with node->index() which is the node ID), block
number, and phase number respectively. Now, we can scroll thru the dumps quickly
and tell at a glance when we've scrolled passed the end of a phase, or block.
These sets of numbers can also serve as a positional marker that we can search for
to return to a node in the dump after scrolling away.

Currently, these numbers are only added to the DFG part. The FTL (from lowering
to B3 onwards) does not have this feature yet.

  • dfg/DFGDesiredWatchpoints.cpp:

(JSC::DFG::DesiredWatchpoints::dumpInContext const):

  • dfg/DFGDesiredWatchpoints.h:
  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dumpCodeOrigin):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):
(JSC::DFG::Prefix::dump const):

  • dfg/DFGGraph.h:

(JSC::DFG::Prefix::Prefix):
(JSC::DFG::Prefix::clearBlockIndex):
(JSC::DFG::Prefix::clearNodeIndex):
(JSC::DFG::Prefix::enable):
(JSC::DFG::Prefix::disable):
(JSC::DFG::Graph::prefix):
(JSC::DFG::Graph::nextPhase):

  • dfg/DFGPhase.cpp:

(JSC::DFG::Phase::beginPhase):

  • dfg/DFGPhase.h:

(JSC::DFG::runAndLog):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • dfg/DFGValueRepReductionPhase.cpp:

(JSC::DFG::ValueRepReductionPhase::convertValueRepsToDouble):

Location:
trunk/Source/JavaScriptCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r248605 r248642  
     12019-08-13  Mark Lam  <mark.lam@apple.com>
     2
     3        Add phase, block, and node numbers to left margin of DFG graph dumps.
     4        https://bugs.webkit.org/show_bug.cgi?id=200693
     5
     6        Reviewed by Saam Barati.
     7
     8        When scrolling through the DFG graph dumps, it's easy to get lost as to which phase
     9        or block one is looking at, especially if the blocks are long.  This patch adds
     10        node index, block number, and phase number on the left margin of the dumps.
     11        Here's a sample:
     12
     13               53:     %Bd:Function                   = 0x1079fd960:[Function, {}, NonArray, Proto:0x1079d8000, Leaf]
     14               53:     %Bf:Function                   = 0x1079b0700:[Function, {name:100, prototype:101, length:102, stackTraceLimit:103}, NonArray, Proto:0x1079d8000, Leaf]
     15               53:     %Bj:Function                   = 0x1079fd5e0:[Function, {name:100, length:101, toString:102, apply:103, call:104, bind:105, Symbol.hasInstance:106, caller:107, arguments:108, constructor:109}, NonArray, Proto:0x1079c0000, Leaf]
     16               53:     %CV:JSGlobalLexicalEnvironment = 0x1079fd6c0:[JSGlobalLexicalEnvironment, {}, NonArray, Leaf]
     17
     18               53: Phase liveness analysis changed the IR.
     19
     20               54: Beginning DFG phase OSR availability analysis.
     21               54: Before OSR availability analysis:
     22
     23               54: DFG for foo#DXMNag:[0x1079a4850->0x1079a4130->0x1079c7600, DFGFunctionCall, 204 (NeverInline)]:
     24               54:   Fixpoint state: FixpointConverged; Form: SSA; Unification state: GloballyUnified; Ref count state: ExactRefCount
     25               54:   Argument formats for entrypoint index: 0 : FlushedJSValue, FlushedCell, FlushedJSValue
     26
     27             0 54: Block #0 (bc#0): (OSR target)
     28             0 54:   Execution count: 1.000000
     29             0 54:   Predecessors:
     30             0 54:   Successors:
     31             0 54:   Dominated by: #0
     32             0 54:   Dominates: #0
     33             0 54:   Dominance Frontier:
     34             0 54:   Iterated Dominance Frontier:
     35             0 54:   Backwards dominates by: #root #0
     36             0 54:   Backwards dominates: #0
     37             0 54:   Control equivalent to: #0
     38             0 54:   States: StructuresAreWatched
     39             0 54:   Live:
     40             0 54:   Values
     41          0  0 54:   53:< 1:-> JSConstant(JS|UseAsOther, Other, Null, bc#0, ExitValid)
     42          1  0 54:   64:< 2:-> JSConstant(JS|UseAsOther, NonBoolInt32, Int32: 10, bc#0, ExitValid)
     43          2  0 54:    3:< 5:-> JSConstant(JS|PureInt, Other, Undefined, bc#0, ExitValid)
     44          3  0 54:   32:< 1:-> JSConstant(JS|UseAsOther, Bool, False, bc#0, ExitValid)
     45          4  0 54:   19:< 2:-> JSConstant(JS|UseAsOther, OtherObj, Weak:Object: 0x1079d4000 with butterfly 0x0 (Structure %CV:JSGlobalLexicalEnvironment), StructureID: 31423, bc#0, ExitValid)
     46
     47        The numbers in the left margin before the ':' are node index (i.e. the index of the
     48        node in the block, not to be confused with node->index() which is the node ID), block
     49        number, and phase number respectively.  Now, we can scroll thru the dumps quickly
     50        and tell at a glance when we've scrolled passed the end of a phase, or block.
     51        These sets of numbers can also serve as a positional marker that we can search for
     52        to return to a node in the dump after scrolling away.
     53
     54        Currently, these numbers are only added to the DFG part.  The FTL (from lowering
     55        to B3 onwards) does not have this feature yet.
     56
     57        * dfg/DFGDesiredWatchpoints.cpp:
     58        (JSC::DFG::DesiredWatchpoints::dumpInContext const):
     59        * dfg/DFGDesiredWatchpoints.h:
     60        * dfg/DFGGraph.cpp:
     61        (JSC::DFG::Graph::dumpCodeOrigin):
     62        (JSC::DFG::Graph::dump):
     63        (JSC::DFG::Graph::dumpBlockHeader):
     64        (JSC::DFG::Prefix::dump const):
     65        * dfg/DFGGraph.h:
     66        (JSC::DFG::Prefix::Prefix):
     67        (JSC::DFG::Prefix::clearBlockIndex):
     68        (JSC::DFG::Prefix::clearNodeIndex):
     69        (JSC::DFG::Prefix::enable):
     70        (JSC::DFG::Prefix::disable):
     71        (JSC::DFG::Graph::prefix):
     72        (JSC::DFG::Graph::nextPhase):
     73        * dfg/DFGPhase.cpp:
     74        (JSC::DFG::Phase::beginPhase):
     75        * dfg/DFGPhase.h:
     76        (JSC::DFG::runAndLog):
     77        * dfg/DFGPlan.cpp:
     78        (JSC::DFG::Plan::compileInThreadImpl):
     79        * dfg/DFGValueRepReductionPhase.cpp:
     80        (JSC::DFG::ValueRepReductionPhase::convertValueRepsToDouble):
     81
    1822019-08-13  Michael Saboff  <msaboff@apple.com>
    283
  • trunk/Source/JavaScriptCore/dfg/DFGDesiredWatchpoints.cpp

    r246073 r248642  
    11/*
    2  * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3131#include "ArrayBufferNeuteringWatchpointSet.h"
    3232#include "CodeBlock.h"
     33#include "DFGGraph.h"
    3334#include "JSCInlines.h"
    3435
     
    140141void DesiredWatchpoints::dumpInContext(PrintStream& out, DumpContext* context) const
    141142{
    142     out.print("Desired watchpoints:\n");
    143     out.print("    Watchpoint sets: ", inContext(m_sets, context), "\n");
    144     out.print("    Inline watchpoint sets: ", inContext(m_inlineSets, context), "\n");
    145     out.print("    SymbolTables: ", inContext(m_symbolTables, context), "\n");
    146     out.print("    FunctionExecutables: ", inContext(m_functionExecutables, context), "\n");
    147     out.print("    Buffer views: ", inContext(m_bufferViews, context), "\n");
    148     out.print("    Object property conditions: ", inContext(m_adaptiveStructureSets, context), "\n");
     143    Prefix noPrefix(Prefix::NoHeader);
     144    Prefix& prefix = context && context->graph ? context->graph->prefix() : noPrefix;
     145    out.print(prefix, "Desired watchpoints:\n");
     146    out.print(prefix, "    Watchpoint sets: ", inContext(m_sets, context), "\n");
     147    out.print(prefix, "    Inline watchpoint sets: ", inContext(m_inlineSets, context), "\n");
     148    out.print(prefix, "    SymbolTables: ", inContext(m_symbolTables, context), "\n");
     149    out.print(prefix, "    FunctionExecutables: ", inContext(m_functionExecutables, context), "\n");
     150    out.print(prefix, "    Buffer views: ", inContext(m_bufferViews, context), "\n");
     151    out.print(prefix, "    Object property conditions: ", inContext(m_adaptiveStructureSets, context), "\n");
    149152}
    150153
  • trunk/Source/JavaScriptCore/dfg/DFGDesiredWatchpoints.h

    r246073 r248642  
    11/*
    2  * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4040
    4141class Graph;
     42struct Prefix;
    4243
    4344template<typename T>
     
    207208    }
    208209    void dumpInContext(PrintStream&, DumpContext*) const;
    209     void dump(PrintStream&) const;
    210210   
    211211private:
  • trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp

    r244764 r248642  
    11/*
    2  * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    110110}
    111111
    112 bool Graph::dumpCodeOrigin(PrintStream& out, const char* prefix, Node*& previousNodeRef, Node* currentNode, DumpContext* context)
    113 {
     112bool Graph::dumpCodeOrigin(PrintStream& out, const char* prefixStr, Node*& previousNodeRef, Node* currentNode, DumpContext* context)
     113{
     114    Prefix myPrefix(prefixStr);
     115    Prefix& prefix = prefixStr ? myPrefix : m_prefix;
     116
    114117    if (!currentNode->origin.semantic)
    115118        return false;
     
    166169}
    167170
    168 void Graph::dump(PrintStream& out, const char* prefix, Node* node, DumpContext* context)
    169 {
     171void Graph::dump(PrintStream& out, const char* prefixStr, Node* node, DumpContext* context)
     172{
     173    Prefix myPrefix(prefixStr);
     174    Prefix& prefix = prefixStr ? myPrefix : m_prefix;
     175
    170176    NodeType op = node->op();
    171177
     
    424430static BasicBlock* unboxLoopNode(BasicBlock* block) { return block; }
    425431
    426 void Graph::dumpBlockHeader(PrintStream& out, const char* prefix, BasicBlock* block, PhiNodeDumpMode phiNodeDumpMode, DumpContext* context)
    427 {
     432void Graph::dumpBlockHeader(PrintStream& out, const char* prefixStr, BasicBlock* block, PhiNodeDumpMode phiNodeDumpMode, DumpContext* context)
     433{
     434    Prefix myPrefix(prefixStr);
     435    Prefix& prefix = prefixStr ? myPrefix : m_prefix;
     436
    428437    out.print(prefix, "Block ", *block, " (", inContext(block->at(0)->origin.semantic, context), "):",
    429438        block->isReachable ? "" : " (skipped)", block->isOSRTarget ? " (OSR target)" : "", block->isCatchEntrypoint ? " (Catch Entrypoint)" : "", "\n");
     
    520529void Graph::dump(PrintStream& out, DumpContext* context)
    521530{
     531    Prefix& prefix = m_prefix;
    522532    DumpContext myContext;
    523533    myContext.graph = this;
     
    526536   
    527537    out.print("\n");
    528     out.print("DFG for ", CodeBlockWithJITType(m_codeBlock, JITType::DFGJIT), ":\n");
    529     out.print("  Fixpoint state: ", m_fixpointState, "; Form: ", m_form, "; Unification state: ", m_unificationState, "; Ref count state: ", m_refCountState, "\n");
     538    out.print(prefix, "DFG for ", CodeBlockWithJITType(m_codeBlock, JITType::DFGJIT), ":\n");
     539    out.print(prefix, "  Fixpoint state: ", m_fixpointState, "; Form: ", m_form, "; Unification state: ", m_unificationState, "; Ref count state: ", m_refCountState, "\n");
    530540    if (m_form == SSA) {
    531541        for (unsigned entrypointIndex = 0; entrypointIndex < m_argumentFormats.size(); ++entrypointIndex)
    532             out.print("  Argument formats for entrypoint index: ", entrypointIndex, " : ", listDump(m_argumentFormats[entrypointIndex]), "\n");
     542            out.print(prefix, "  Argument formats for entrypoint index: ", entrypointIndex, " : ", listDump(m_argumentFormats[entrypointIndex]), "\n");
    533543    }
    534544    else {
    535545        for (auto pair : m_rootToArguments)
    536             out.print("  Arguments for block#", pair.key->index, ": ", listDump(pair.value), "\n");
     546            out.print(prefix, "  Arguments for block#", pair.key->index, ": ", listDump(pair.value), "\n");
    537547    }
    538548    out.print("\n");
     
    543553        if (!block)
    544554            continue;
    545         dumpBlockHeader(out, "", block, DumpAllPhis, context);
    546         out.print("  States: ", block->cfaStructureClobberStateAtHead);
     555        prefix.blockIndex = block->index;
     556        dumpBlockHeader(out, Prefix::noString, block, DumpAllPhis, context);
     557        out.print(prefix, "  States: ", block->cfaStructureClobberStateAtHead);
    547558        if (!block->cfaHasVisited)
    548559            out.print(", CurrentlyCFAUnreachable");
     
    553564        case LoadStore:
    554565        case ThreadedCPS: {
    555             out.print("  Vars Before: ");
     566            out.print(prefix, "  Vars Before: ");
    556567            if (block->cfaHasVisited)
    557568                out.print(inContext(block->valuesAtHead, context));
     
    559570                out.print("<empty>");
    560571            out.print("\n");
    561             out.print("  Intersected Vars Before: ");
     572            out.print(prefix, "  Intersected Vars Before: ");
    562573            if (block->intersectionOfCFAHasVisited)
    563574                out.print(inContext(block->intersectionOfPastValuesAtHead, context));
     
    565576                out.print("<empty>");
    566577            out.print("\n");
    567             out.print("  Var Links: ", block->variablesAtHead, "\n");
     578            out.print(prefix, "  Var Links: ", block->variablesAtHead, "\n");
    568579            break;
    569580        }
     
    572583            RELEASE_ASSERT(block->ssa);
    573584            if (dumpOSRAvailabilityData)
    574                 out.print("  Availability: ", block->ssa->availabilityAtHead, "\n");
    575             out.print("  Live: ", nodeListDump(block->ssa->liveAtHead), "\n");
    576             out.print("  Values: ", nodeValuePairListDump(block->ssa->valuesAtHead, context), "\n");
     585                out.print(prefix, "  Availability: ", block->ssa->availabilityAtHead, "\n");
     586            out.print(prefix, "  Live: ", nodeListDump(block->ssa->liveAtHead), "\n");
     587            out.print(prefix, "  Values: ", nodeValuePairListDump(block->ssa->valuesAtHead, context), "\n");
    577588            break;
    578589        } }
    579590        for (size_t i = 0; i < block->size(); ++i) {
    580             dumpCodeOrigin(out, "", lastNode, block->at(i), context);
    581             dump(out, "", block->at(i), context);
    582         }
    583         out.print("  States: ", block->cfaBranchDirection, ", ", block->cfaStructureClobberStateAtTail);
     591            prefix.clearNodeIndex();
     592            dumpCodeOrigin(out, Prefix::noString, lastNode, block->at(i), context);
     593            prefix.nodeIndex = i;
     594            dump(out, Prefix::noString, block->at(i), context);
     595        }
     596        prefix.clearNodeIndex();
     597        out.print(prefix, "  States: ", block->cfaBranchDirection, ", ", block->cfaStructureClobberStateAtTail);
    584598        if (!block->cfaDidFinish)
    585599            out.print(", CFAInvalidated");
     
    588602        case LoadStore:
    589603        case ThreadedCPS: {
    590             out.print("  Vars After: ");
     604            out.print(prefix, "  Vars After: ");
    591605            if (block->cfaHasVisited)
    592606                out.print(inContext(block->valuesAtTail, context));
     
    594608                out.print("<empty>");
    595609            out.print("\n");
    596             out.print("  Var Links: ", block->variablesAtTail, "\n");
     610            out.print(prefix, "  Var Links: ", block->variablesAtTail, "\n");
    597611            break;
    598612        }
     
    601615            RELEASE_ASSERT(block->ssa);
    602616            if (dumpOSRAvailabilityData)
    603                 out.print("  Availability: ", block->ssa->availabilityAtTail, "\n");
    604             out.print("  Live: ", nodeListDump(block->ssa->liveAtTail), "\n");
    605             out.print("  Values: ", nodeValuePairListDump(block->ssa->valuesAtTail, context), "\n");
     617                out.print(prefix, "  Availability: ", block->ssa->availabilityAtTail, "\n");
     618            out.print(prefix, "  Live: ", nodeListDump(block->ssa->liveAtTail), "\n");
     619            out.print(prefix, "  Values: ", nodeValuePairListDump(block->ssa->valuesAtTail, context), "\n");
    606620            break;
    607621        } }
    608622        out.print("\n");
    609623    }
    610    
    611     out.print("GC Values:\n");
     624    prefix.clearBlockIndex();
     625
     626    out.print(prefix, "GC Values:\n");
    612627    for (FrozenValue* value : m_frozenValues) {
    613628        if (value->pointsToHeap())
    614             out.print("    ", inContext(*value, &myContext), "\n");
     629            out.print(prefix, "    ", inContext(*value, &myContext), "\n");
    615630    }
    616631
     
    618633   
    619634    if (!myContext.isEmpty()) {
    620         myContext.dump(out);
     635        StringPrintStream prefixStr;
     636        prefixStr.print(prefix);
     637        myContext.dump(out, prefixStr.toCString().data());
    621638        out.print("\n");
    622639    }
     
    17881805}
    17891806
     1807void Prefix::dump(PrintStream& out) const
     1808{
     1809    if (!m_enabled)
     1810        return;
     1811
     1812    if (!noHeader) {
     1813        if (nodeIndex >= 0)
     1814            out.printf("%3d ", nodeIndex);
     1815        else
     1816            out.printf("    ");
     1817
     1818        if (blockIndex >= 0)
     1819            out.printf("%2d ", blockIndex);
     1820        else
     1821            out.printf("   ");
     1822
     1823        if (phaseNumber >= 0)
     1824            out.printf("%2d: ", phaseNumber);
     1825        else
     1826            out.printf("  : ");
     1827    }
     1828    if (prefixStr)
     1829        out.printf("%s", prefixStr);
     1830}
     1831
    17901832} } // namespace JSC::DFG
    17911833
  • trunk/Source/JavaScriptCore/dfg/DFGGraph.h

    r244193 r248642  
    11/*
    2  * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    120120};
    121121
     122struct Prefix {
     123    enum NoHeaderTag { NoHeader };
     124
     125    Prefix() { }
     126
     127    Prefix(const char* prefixStr, NoHeaderTag tag = NoHeader)
     128        : prefixStr(prefixStr)
     129        , noHeader(tag == NoHeader)
     130    { }
     131
     132    Prefix(NoHeaderTag)
     133        : noHeader(true)
     134    { }
     135
     136    void dump(PrintStream& out) const;
     137
     138    void clearBlockIndex() { blockIndex = -1; }
     139    void clearNodeIndex() { nodeIndex = -1; }
     140
     141    void enable() { m_enabled = true; }
     142    void disable() { m_enabled = false; }
     143
     144    int32_t phaseNumber { -1 };
     145    int32_t blockIndex { -1 };
     146    int32_t nodeIndex { -1 };
     147    const char* prefixStr { nullptr };
     148    bool noHeader { false };
     149
     150    static constexpr const char* noString = nullptr;
     151
     152private:
     153    bool m_enabled { true };
     154};
     155
    122156//
    123157// === Graph ===
     
    223257    // CodeBlock is optional, but may allow additional information to be dumped (e.g. Identifier names).
    224258    void dump(PrintStream& = WTF::dataFile(), DumpContext* = 0);
    225    
     259
    226260    bool terminalsAreValid();
    227261   
     
    9691003        return result;
    9701004    }
     1005
     1006    Prefix& prefix() { return m_prefix; }
     1007    void nextPhase() { m_prefix.phaseNumber++; }
    9711008
    9721009    VM& m_vm;
     
    11201157    B3::SparseCollection<Node> m_nodes;
    11211158    SegmentedVector<RegisteredStructureSet, 16> m_structureSets;
     1159    Prefix m_prefix;
    11221160};
    11231161
  • trunk/Source/JavaScriptCore/dfg/DFGPhase.cpp

    r234178 r248642  
    5050        return;
    5151   
    52     dataLog("Beginning DFG phase ", m_name, ".\n");
    53     dataLog("Before ", m_name, ":\n");
     52    dataLog(m_graph.prefix(), "Beginning DFG phase ", m_name, ".\n");
     53    dataLog(m_graph.prefix(), "Before ", m_name, ":\n");
    5454    m_graph.dump();
    5555}
  • trunk/Source/JavaScriptCore/dfg/DFGPhase.h

    r234178 r248642  
    5454    // Each phase must have a run() method.
    5555   
     56    Prefix prefix;
     57
    5658protected:
    5759    // Things you need to have a DFG compiler phase.
     
    8385
    8486    if (result && logCompilationChanges(phase.graph().m_plan.mode()))
    85         dataLogF("Phase %s changed the IR.\n", phase.name());
     87        dataLogLn(phase.graph().prefix(), "Phase ", phase.name(), " changed the IR.\n");
    8688    return result;
    8789}
  • trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp

    r248533 r248642  
    265265                return CancelPath;                               \
    266266        }                                                        \
     267        dfg.nextPhase();                                         \
    267268        changed |= phase(dfg);                                   \
    268269    } while (false);                                             \
     
    482483        }
    483484
     485        dfg.nextPhase();
    484486        dumpAndVerifyGraph(dfg, "Graph just before FTL lowering:", shouldDumpDisassembly(m_mode));
    485487
     
    492494            return CancelPath;
    493495
     496        dfg.nextPhase();
    494497        FTL::State state(dfg);
    495498        FTL::lowerDFGToB3(state);
    496        
     499
    497500        if (UNLIKELY(computeCompileTimes()))
    498501            m_timeBeforeFTL = MonotonicTime::now();
  • trunk/Source/JavaScriptCore/dfg/DFGValueRepReductionPhase.cpp

    r243744 r248642  
    144144                    dataLogLn(description);
    145145                    dataLog("   candidate: ");
    146                     m_graph.dump(WTF::dataFile(), "", candidate);
     146                    m_graph.dump(WTF::dataFile(), Prefix::noString, candidate);
    147147                    dataLog("   reason: ");
    148                     m_graph.dump(WTF::dataFile(), "", node);
     148                    m_graph.dump(WTF::dataFile(), Prefix::noString, node);
    149149                    dataLogLn();
    150150                };
Note: See TracChangeset for help on using the changeset viewer.