Changeset 255482 in webkit


Ignore:
Timestamp:
Jan 30, 2020, 6:30:11 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

Some improvements to DFG and FTL dumps to improve readability and searchability.
https://bugs.webkit.org/show_bug.cgi?id=207024

Reviewed by Saam Barati.

This patch applies the following changes:

  1. Prefix Air and B2 dumps with a tierName prefix. The tierName prefix strings are as follows:

"FTL ", "DFG ", "b3 ", "Air ", "asm "

The choice to use a lowercase "b3" and "asm" with upper case "Air" is
deliberate because I found this combination to be easier to read and scan as
prefixes of the dump lines. See dump samples below.

  1. Make DFG node IDs consistently expressed as D@<node index> e.g. D@104. The definition of the node will be the id followed by a colon e.g. D@104: This makes it easy to search references to this node anywhere in the dump.

Make B3 nodes expressed as b@<node index> e.g. b@542.
This also makes it searchable since there's now no ambiguity between b@542 and
D@542.

The choice to use a lowercase "b" and an uppercase "D" is intentional because
"b@542" and "d@542" looks too similar, and I prefer to not use too much
uppercase. Plus this makes the node consistent in capitalization with the
tierName prefixes above of "b3 " and "DFG " respectively.

Here's a sample of what the dumps now look like:

DFG graph dump:
<code>

...

6 55: <-- foo#DFndCW:<0x62d0000b8140, bc#65, Call, known callee: Object: 0x62d000035920 with butterfly 0x0 (Structure %AN:Function), StructureID: 12711, numArgs+this = 1, numFixup = 0, stackOffset = -16 (loc0 maps to loc16)>

3 6 55: D@79:< 3:-> ArithAdd(Int32:Kill:D@95, Int32:D@42, Int32|PureNum|UseAsOther, Int32, CheckOverflow, Exits, bc#71, ExitValid)
4 6 55: D@3:<!0:-> KillStack(MustGen, loc7, W:Stack(loc7), ClobbersExit, bc#71, ExitInvalid)
5 6 55: D@85:<!0:-> MovHint(Check:Untyped:D@79, MustGen, loc7, W:SideState, ClobbersExit, bc#71, ExitInvalid)
6 6 55: D@102:< 1:-> CompareLess(Int32:D@79, Int32:D@89, Boolean|UseAsOther, Bool, Exits, bc#74, ExitValid)
7 6 55: D@104:<!0:-> Branch(KnownBoolean:Kill:D@102, MustGen, T:#1/w:10.000000, F:#7/w:1.000000, W:SideState, bc#74, ExitInvalid)

...

</code>

B3 graph dump:
<code>

...
b3 BB#14: ; frequency = 10.000000
b3 Predecessors: #13
b3 Int32 b@531 = CheckAdd(b@10:WarmAny, $1(b@1):WarmAny, b@64:ColdAny, b@10:ColdAny, generator = 0x606000022e80, earlyClobbered = [], lateClobbered = [], usedRegisters = [], ExitsSideways|Reads:Top, D@79)
b3 Int32 b@539 = LessThan(b@531, $100(b@578), D@102)
b3 Void b@542 = Branch(b@539, Terminal, D@104)
b3 Successors: Then:#2, Else:#15
...

</code>

Air graph dump:
<code>

...
Air BB#5: ; frequency = 10.000000
Air Predecessors: #4
Air Move -96(%rbp), %rax, b@531
Air Patch &BranchAdd32(3,ForceLateUseUnlessRecoverable)3, Overflow, $1, %rax, -104(%rbp), -96(%rbp), b@531
Air Branch32 LessThan, %rax, $100, b@542
Air Successors: #1, #6
...

</code>

FTL disassembly dump:
<code>

...
Air BB#5: ; frequency = 10.000000
Air Predecessors: #4
DFG D@42:< 2:-> JSConstant(JS|PureInt, Int32, Int32: 1, bc#0, ExitInvalid)
DFG D@79:< 3:-> ArithAdd(Int32:Kill:D@95, Int32:D@42, Int32|PureNum|UseAsOther, Int32, CheckOverflow, Exits, bc#71, ExitValid)
b3 Int32 b@1 = Const32(1)
b3 Int32 b@531 = CheckAdd(b@10:WarmAny, $1(b@1):WarmAny, b@64:ColdAny, b@10:ColdAny, generator = 0x606000022e80, earlyClobbered = [], lateClobbered = [], usedRegisters = [%rax, %rbx, %rbp, %r12], ExitsSideways|Reads:Top, D@79)
Air Move -96(%rbp), %rax, b@531
asm 0x4576b9c04712: mov -0x60(%rbp), %rax
Air Patch &BranchAdd32(3,ForceLateUseUnlessRecoverable)3, Overflow, $1, %rax, -104(%rbp), -96(%rbp), b@531
asm 0x4576b9c04716: inc %eax
asm 0x4576b9c04718: jo 0x4576b9c04861
DFG D@89:< 1:-> JSConstant(JS|PureNum|UseAsOther, NonBoolInt32, Int32: 100, bc#0, ExitInvalid)
DFG D@102:< 1:-> CompareLess(Int32:D@79, Int32:D@89, Boolean|UseAsOther, Bool, Exits, bc#74, ExitValid)
DFG D@104:<!0:-> Branch(KnownBoolean:Kill:D@102, MustGen, T:#1/w:10.000000, F:#7/w:1.000000, W:SideState, bc#74, ExitInvalid)
b3 Int32 b@578 = Const32(100, D@89)
b3 Int32 b@539 = LessThan(b@531, $100(b@578), D@102)
b3 Void b@542 = Branch(b@539, Terminal, D@104)
Air Branch32 LessThan, %rax, $100, b@542
asm 0x4576b9c0471e: cmp $0x64, %eax
asm 0x4576b9c04721: jl 0x4576b9c0462f
Air Successors: #1, #6
...

</code>

  • b3/B3BasicBlock.cpp:

(JSC::B3::BasicBlock::deepDump const):

  • b3/B3Common.cpp:
  • b3/B3Common.h:
  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::dump const):

  • b3/B3Value.cpp:
  • b3/air/AirBasicBlock.cpp:

(JSC::B3::Air::BasicBlock::deepDump const):
(JSC::B3::Air::BasicBlock::dumpHeader const):
(JSC::B3::Air::BasicBlock::dumpFooter const):

  • b3/air/AirCode.cpp:

(JSC::B3::Air::Code::dump const):

  • b3/air/AirCode.h:
  • b3/air/AirDisassembler.cpp:

(JSC::B3::Air::Disassembler::dump):

  • b3/air/AirGenerate.cpp:

(JSC::B3::Air::prepareForGeneration):

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

(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):

  • dfg/DFGNode.cpp:

(WTF::printInternal):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLCompile.h:
  • ftl/FTLState.cpp:

(JSC::FTL::State::State):

Location:
trunk/Source/JavaScriptCore
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/Source/JavaScriptCore/ChangeLog

    r255460 r255482  
     12020-01-30  Mark Lam  <mark.lam@apple.com>
     2
     3        Some improvements to DFG and FTL dumps to improve readability and searchability.
     4        https://bugs.webkit.org/show_bug.cgi?id=207024
     5
     6        Reviewed by Saam Barati.
     7
     8        This patch applies the following changes:
     9
     10        1. Prefix Air and B2 dumps with a tierName prefix.
     11           The tierName prefix strings are as follows:
     12
     13               "FTL ", "DFG ", "b3  ", "Air ", "asm "
     14
     15           The choice to use a lowercase "b3" and "asm" with upper case "Air" is
     16           deliberate because I found this combination to be easier to read and scan as
     17           prefixes of the dump lines.  See dump samples below.
     18
     19        2. Make DFG node IDs consistently expressed as D@<node index> e.g. D@104.
     20           The definition of the node will be the id followed by a colon e.g. D@104:
     21           This makes it easy to search references to this node anywhere in the dump.
     22
     23           Make B3 nodes expressed as b@<node index> e.g. b@542.
     24           This also makes it searchable since there's now no ambiguity between b@542 and
     25           D@542.
     26
     27           The choice to use a lowercase "b" and an uppercase "D" is intentional because
     28           "b@542" and "d@542" looks too similar, and I prefer to not use too much
     29           uppercase.  Plus this makes the node consistent in capitalization with the
     30           tierName prefixes above of "b3  " and "DFG " respectively.
     31
     32        Here's a sample of what the dumps now look like:
     33
     34        DFG graph dump:
     35        <code>
     36            ...
     37                 6 55:   <-- foo#DFndCW:<0x62d0000b8140, bc#65, Call, known callee: Object: 0x62d000035920 with butterfly 0x0 (Structure %AN:Function), StructureID: 12711, numArgs+this = 1, numFixup = 0, stackOffset = -16 (loc0 maps to loc16)>
     38              3  6 55:   D@79:< 3:->    ArithAdd(Int32:Kill:D@95, Int32:D@42, Int32|PureNum|UseAsOther, Int32, CheckOverflow, Exits, bc#71, ExitValid)
     39              4  6 55:    D@3:<!0:->    KillStack(MustGen, loc7, W:Stack(loc7), ClobbersExit, bc#71, ExitInvalid)
     40              5  6 55:   D@85:<!0:->    MovHint(Check:Untyped:D@79, MustGen, loc7, W:SideState, ClobbersExit, bc#71, ExitInvalid)
     41              6  6 55:  D@102:< 1:->    CompareLess(Int32:D@79, Int32:D@89, Boolean|UseAsOther, Bool, Exits, bc#74, ExitValid)
     42              7  6 55:  D@104:<!0:->    Branch(KnownBoolean:Kill:D@102, MustGen, T:#1/w:10.000000, F:#7/w:1.000000, W:SideState, bc#74, ExitInvalid)
     43            ...
     44        </code>
     45
     46        B3 graph dump:
     47        <code>
     48            ...
     49            b3  BB#14: ; frequency = 10.000000
     50            b3    Predecessors: #13
     51            b3      Int32 b@531 = CheckAdd(b@10:WarmAny, $1(b@1):WarmAny, b@64:ColdAny, b@10:ColdAny, generator = 0x606000022e80, earlyClobbered = [], lateClobbered = [], usedRegisters = [], ExitsSideways|Reads:Top, D@79)
     52            b3      Int32 b@539 = LessThan(b@531, $100(b@578), D@102)
     53            b3      Void b@542 = Branch(b@539, Terminal, D@104)
     54            b3    Successors: Then:#2, Else:#15
     55            ...
     56        </code>
     57
     58        Air graph dump:
     59        <code>
     60            ...
     61            Air BB#5: ; frequency = 10.000000
     62            Air   Predecessors: #4
     63            Air     Move -96(%rbp), %rax, b@531
     64            Air     Patch &BranchAdd32(3,ForceLateUseUnlessRecoverable)3, Overflow, $1, %rax, -104(%rbp), -96(%rbp), b@531
     65            Air     Branch32 LessThan, %rax, $100, b@542
     66            Air   Successors: #1, #6
     67            ...
     68        </code>
     69
     70        FTL disassembly dump:
     71        <code>
     72            ...
     73            Air BB#5: ; frequency = 10.000000
     74            Air   Predecessors: #4
     75            DFG       D@42:< 2:->   JSConstant(JS|PureInt, Int32, Int32: 1, bc#0, ExitInvalid)
     76            DFG       D@79:< 3:->   ArithAdd(Int32:Kill:D@95, Int32:D@42, Int32|PureNum|UseAsOther, Int32, CheckOverflow, Exits, bc#71, ExitValid)
     77            b3            Int32 b@1 = Const32(1)
     78            b3            Int32 b@531 = CheckAdd(b@10:WarmAny, $1(b@1):WarmAny, b@64:ColdAny, b@10:ColdAny, generator = 0x606000022e80, earlyClobbered = [], lateClobbered = [], usedRegisters = [%rax, %rbx, %rbp, %r12], ExitsSideways|Reads:Top, D@79)
     79            Air               Move -96(%rbp), %rax, b@531
     80            asm                   0x4576b9c04712: mov -0x60(%rbp), %rax
     81            Air               Patch &BranchAdd32(3,ForceLateUseUnlessRecoverable)3, Overflow, $1, %rax, -104(%rbp), -96(%rbp), b@531
     82            asm                   0x4576b9c04716: inc %eax
     83            asm                   0x4576b9c04718: jo 0x4576b9c04861
     84            DFG       D@89:< 1:->   JSConstant(JS|PureNum|UseAsOther, NonBoolInt32, Int32: 100, bc#0, ExitInvalid)
     85            DFG      D@102:< 1:->   CompareLess(Int32:D@79, Int32:D@89, Boolean|UseAsOther, Bool, Exits, bc#74, ExitValid)
     86            DFG      D@104:<!0:->   Branch(KnownBoolean:Kill:D@102, MustGen, T:#1/w:10.000000, F:#7/w:1.000000, W:SideState, bc#74, ExitInvalid)
     87            b3            Int32 b@578 = Const32(100, D@89)
     88            b3            Int32 b@539 = LessThan(b@531, $100(b@578), D@102)
     89            b3            Void b@542 = Branch(b@539, Terminal, D@104)
     90            Air               Branch32 LessThan, %rax, $100, b@542
     91            asm                   0x4576b9c0471e: cmp $0x64, %eax
     92            asm                   0x4576b9c04721: jl 0x4576b9c0462f
     93            Air   Successors: #1, #6
     94            ...
     95        </code>
     96
     97        * b3/B3BasicBlock.cpp:
     98        (JSC::B3::BasicBlock::deepDump const):
     99        * b3/B3Common.cpp:
     100        * b3/B3Common.h:
     101        * b3/B3Generate.cpp:
     102        (JSC::B3::generateToAir):
     103        * b3/B3Procedure.cpp:
     104        (JSC::B3::Procedure::dump const):
     105        * b3/B3Value.cpp:
     106        * b3/air/AirBasicBlock.cpp:
     107        (JSC::B3::Air::BasicBlock::deepDump const):
     108        (JSC::B3::Air::BasicBlock::dumpHeader const):
     109        (JSC::B3::Air::BasicBlock::dumpFooter const):
     110        * b3/air/AirCode.cpp:
     111        (JSC::B3::Air::Code::dump const):
     112        * b3/air/AirCode.h:
     113        * b3/air/AirDisassembler.cpp:
     114        (JSC::B3::Air::Disassembler::dump):
     115        * b3/air/AirGenerate.cpp:
     116        (JSC::B3::Air::prepareForGeneration):
     117        * dfg/DFGCommon.cpp:
     118        * dfg/DFGCommon.h:
     119        * dfg/DFGGraph.cpp:
     120        (JSC::DFG::Graph::dump):
     121        (JSC::DFG::Graph::dumpBlockHeader):
     122        * dfg/DFGNode.cpp:
     123        (WTF::printInternal):
     124        * ftl/FTLCompile.cpp:
     125        (JSC::FTL::compile):
     126        * ftl/FTLCompile.h:
     127        * ftl/FTLState.cpp:
     128        (JSC::FTL::State::State):
     129
    11302020-01-30  Yusuke Suzuki  <ysuzuki@apple.com>
    2131
  • TabularUnified trunk/Source/JavaScriptCore/b3/B3BasicBlock.cpp

    r219898 r255482  
    11/*
    2  * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    155155void BasicBlock::deepDump(const Procedure& proc, PrintStream& out) const
    156156{
    157     out.print("BB", *this, ": ; frequency = ", m_frequency, "\n");
     157    out.print(tierName, "BB", *this, ": ; frequency = ", m_frequency, "\n");
    158158    if (predecessors().size())
    159         out.print("  Predecessors: ", pointerListDump(predecessors()), "\n");
     159        out.print(tierName, "  Predecessors: ", pointerListDump(predecessors()), "\n");
    160160    for (Value* value : *this)
    161         out.print("    ", B3::deepDump(proc, value), "\n");
     161        out.print(tierName, "    ", B3::deepDump(proc, value), "\n");
    162162    if (!successors().isEmpty()) {
    163         out.print("  Successors: ");
     163        out.print(tierName, "  Successors: ");
    164164        if (size())
    165165            last()->dumpSuccessors(this, out);
  • TabularUnified trunk/Source/JavaScriptCore/b3/B3Common.cpp

    r250097 r255482  
    11/*
    2  * Copyright (C) 2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3535
    3636namespace JSC { namespace B3 {
     37
     38const char* const tierName = "b3  ";
    3739
    3840bool shouldDumpIR(B3CompilationMode mode)
  • TabularUnified trunk/Source/JavaScriptCore/b3/B3Common.h

    r243851 r255482  
    11/*
    2  * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3434
    3535namespace JSC { namespace B3 {
     36
     37extern const char* const tierName;
    3638
    3739enum B3CompilationMode {
  • TabularUnified trunk/Source/JavaScriptCore/b3/B3Generate.cpp

    r248938 r255482  
    11/*
    2  * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    7575   
    7676    if (shouldDumpIR(B3Mode) && !shouldDumpIRAtEachPhase(B3Mode)) {
    77         dataLog("Initial B3:\n");
     77        dataLog(tierName, "Initial B3:\n");
    7878        dataLog(procedure);
    7979    }
  • TabularUnified trunk/Source/JavaScriptCore/b3/B3Procedure.cpp

    r255394 r255482  
    11/*
    2  * Copyright (C) 2015-2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    240240
    241241        if (!didPrint) {
    242             dataLog("Orphaned values:\n");
     242            dataLog(tierName, "Orphaned values:\n");
    243243            didPrint = true;
    244244        }
    245         dataLog("    ", deepDump(*this, value), "\n");
     245        dataLog(tierName, "    ", deepDump(*this, value), "\n");
    246246    }
    247247    if (hasQuirks())
    248         out.print("Has Quirks: True\n");
     248        out.print(tierName, "Has Quirks: True\n");
    249249    if (variables().size()) {
    250         out.print("Variables:\n");
     250        out.print(tierName, "Variables:\n");
    251251        for (Variable* variable : variables())
    252             out.print("    ", deepDump(variable), "\n");
     252            out.print(tierName, "    ", deepDump(variable), "\n");
    253253    }
    254254    if (stackSlots().size()) {
    255         out.print("Stack slots:\n");
     255        out.print(tierName, "Stack slots:\n");
    256256        for (StackSlot* slot : stackSlots())
    257             out.print("    ", pointerDump(slot), ": ", deepDump(slot), "\n");
     257            out.print(tierName, "    ", pointerDump(slot), ": ", deepDump(slot), "\n");
    258258    }
    259259    if (m_byproducts->count())
  • TabularUnified trunk/Source/JavaScriptCore/b3/B3Value.cpp

    r248178 r255482  
    11/*
    2  * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    5252namespace JSC { namespace B3 {
    5353
    54 const char* const Value::dumpPrefix = "@";
     54const char* const Value::dumpPrefix = "b@";
    5555void DeepValueDump::dump(PrintStream& out) const
    5656{
  • TabularUnified trunk/Source/JavaScriptCore/b3/air/AirBasicBlock.cpp

    r213714 r255482  
    11/*
    2  * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    7373    dumpHeader(out);
    7474    for (const Inst& inst : *this)
    75         out.print("    ", inst, "\n");
     75        out.print(tierName, "    ", inst, "\n");
    7676    dumpFooter(out);
    7777}
     
    7979void BasicBlock::dumpHeader(PrintStream& out) const
    8080{
    81     out.print("BB", *this, ": ; frequency = ", m_frequency, "\n");
     81    out.print(tierName, "BB", *this, ": ; frequency = ", m_frequency, "\n");
    8282    if (predecessors().size())
    83         out.print("  Predecessors: ", pointerListDump(predecessors()), "\n");
     83        out.print(tierName, "  Predecessors: ", pointerListDump(predecessors()), "\n");
    8484}
    8585
     
    8787{
    8888    if (successors().size())
    89         out.print("  Successors: ", listDump(successors()), "\n");
     89        out.print(tierName, "  Successors: ", listDump(successors()), "\n");
    9090}
    9191
  • TabularUnified trunk/Source/JavaScriptCore/b3/air/AirCode.cpp

    r255406 r255482  
    11/*
    2  * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4040
    4141namespace JSC { namespace B3 { namespace Air {
     42
     43const char* const tierName = "Air ";
    4244
    4345static void defaultPrologueGenerator(CCallHelpers& jit, Code& code)
     
    249251{
    250252    if (!m_entrypoints.isEmpty())
    251         out.print("Entrypoints: ", listDump(m_entrypoints), "\n");
     253        out.print(tierName, "Entrypoints: ", listDump(m_entrypoints), "\n");
    252254    for (BasicBlock* block : *this)
    253255        out.print(deepDump(block));
    254256    if (stackSlots().size()) {
    255         out.print("Stack slots:\n");
     257        out.print(tierName, "Stack slots:\n");
    256258        for (StackSlot* slot : stackSlots())
    257             out.print("    ", pointerDump(slot), ": ", deepDump(slot), "\n");
     259            out.print(tierName, "    ", pointerDump(slot), ": ", deepDump(slot), "\n");
    258260    }
    259261    if (specials().size()) {
    260         out.print("Specials:\n");
     262        out.print(tierName, "Specials:\n");
    261263        for (Special* special : specials())
    262             out.print("    ", deepDump(special), "\n");
     264            out.print(tierName, "    ", deepDump(special), "\n");
    263265    }
    264266    if (m_frameSize || m_stackIsAllocated)
    265         out.print("Frame size: ", m_frameSize, m_stackIsAllocated ? " (Allocated)" : "", "\n");
     267        out.print(tierName, "Frame size: ", m_frameSize, m_stackIsAllocated ? " (Allocated)" : "", "\n");
    266268    if (m_callArgAreaSize)
    267         out.print("Call arg area size: ", m_callArgAreaSize, "\n");
     269        out.print(tierName, "Call arg area size: ", m_callArgAreaSize, "\n");
    268270    RegisterAtOffsetList calleeSaveRegisters = this->calleeSaveRegisterAtOffsetList();
    269271    if (calleeSaveRegisters.size())
    270         out.print("Callee saves: ", calleeSaveRegisters, "\n");
     272        out.print(tierName, "Callee saves: ", calleeSaveRegisters, "\n");
    271273}
    272274
  • TabularUnified trunk/Source/JavaScriptCore/b3/air/AirCode.h

    r254087 r255482  
    11/*
    2  * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    6363typedef void PrologueGeneratorFunction(CCallHelpers&, Code&);
    6464typedef SharedTask<PrologueGeneratorFunction> PrologueGenerator;
     65
     66extern const char* const tierName;
    6567
    6668// This is an IR that is very close to the bare metal. It requires about 40x more bytes than the
  • TabularUnified trunk/Source/JavaScriptCore/b3/air/AirDisassembler.cpp

    r234082 r255482  
    11/*
    2  * Copyright (C) 2017-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2017-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    106106    // FIXME: We could be better about various late paths. We can implement
    107107    // this later if we find a strong use for it.
    108     out.print("# Late paths\n");
     108    out.print(tierName, "# Late paths\n");
    109109    dumpAsmRange(m_latePathStart, m_latePathEnd);
    110110}
  • TabularUnified trunk/Source/JavaScriptCore/b3/air/AirGenerate.cpp

    r248846 r255482  
    11/*
    2  * Copyright (C) 2015-2017 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    6969    // If we're doing super verbose dumping, the phase scope of any phase will already do a dump.
    7070    if (shouldDumpIR(AirMode) && !shouldDumpIRAtEachPhase(AirMode)) {
    71         dataLog("Initial air:\n");
     71        dataLog(tierName, "Initial air:\n");
    7272        dataLog(code);
    7373    }
  • TabularUnified trunk/Source/JavaScriptCore/dfg/DFGCommon.cpp

    r230303 r255482  
    11/*
    2  * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3434
    3535namespace JSC { namespace DFG {
     36
     37const char* const tierName = "DFG ";
    3638
    3739static Lock crashLock;
  • TabularUnified trunk/Source/JavaScriptCore/dfg/DFGCommon.h

    r254087 r255482  
    11/*
    2  * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4141static constexpr BlockIndex NoBlock = UINT_MAX;
    4242
     43extern const char* const tierName;
     44
    4345// Use RefChildren if the child ref counts haven't already been adjusted using
    4446// other means and either of the following is true:
  • TabularUnified trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp

    r254735 r255482  
    11/*
    2  * Copyright (C) 2011-2019 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    186186    // Example/explanation of dataflow dump output
    187187    //
    188     //   14:   <!2:7>  GetByVal(@3, @13)
    189     //   ^1     ^2 ^3     ^4       ^5
     188    //   D@14:   <!2:7>  GetByVal(@3, @13)
     189    //     ^1     ^2 ^3     ^4       ^5
    190190    //
    191191    // (1) The nodeIndex of this operation.
     
    196196    // (4) The name of the operation.
    197197    // (5) The arguments to the operation. The may be of the form:
    198     //         @#   - a NodeIndex referencing a prior node in the graph.
     198    //         D@#  - a NodeIndex referencing a prior node in the graph.
    199199    //         arg# - an argument number.
    200200    //         id#  - the index in the CodeBlock of an identifier { if codeBlock is passed to dump(), the string representation is displayed }.
    201201    //         var# - the index of a var on the global object, used by GetGlobalVar/GetGlobalLexicalVariable/PutGlobalVariable operations.
    202     out.printf("% 4d:<%c%u:", (int)node->index(), mustGenerate ? '!' : ' ', refCount);
     202    int nodeIndex = node->index();
     203    const char* prefixPadding = nodeIndex < 10 ? "   " : nodeIndex < 100 ? "  " : " ";
     204    out.printf("%sD@%d:<%c%u:", prefixPadding, nodeIndex, mustGenerate ? '!' : ' ', refCount);
    203205    if (node->hasResult() && node->hasVirtualRegister() && node->virtualRegister().isValid())
    204206        out.print(node->virtualRegister());
     
    519521            if (!phiNode->shouldGenerate() && phiNodeDumpMode == DumpLivePhisOnly)
    520522                continue;
    521             out.print(" @", phiNode->index(), "<", phiNode->operand(), ",", phiNode->refCount(), ">->(");
     523            out.print(" D@", phiNode->index(), "<", phiNode->operand(), ",", phiNode->refCount(), ">->(");
    522524            if (phiNode->child1()) {
    523                 out.print("@", phiNode->child1()->index());
     525                out.print("D@", phiNode->child1()->index());
    524526                if (phiNode->child2()) {
    525                     out.print(", @", phiNode->child2()->index());
     527                    out.print(", D@", phiNode->child2()->index());
    526528                    if (phiNode->child3())
    527                         out.print(", @", phiNode->child3()->index());
     529                        out.print(", D@", phiNode->child3()->index());
    528530                }
    529531            }
  • TabularUnified trunk/Source/JavaScriptCore/dfg/DFGNode.cpp

    r253987 r255482  
    11/*
    2  * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    350350        return;
    351351    }
    352     out.print("@", node->index());
     352    out.print("D@", node->index());
    353353    if (node->hasDoubleResult())
    354354        out.print("<Double>");
  • TabularUnified trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp

    r255394 r255482  
    11/*
    2  * Copyright (C) 2015-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    5454namespace JSC { namespace FTL {
    5555
     56const char* const tierName = "FTL ";
     57
    5658using namespace DFG;
    5759
     
    8183        makeUnique<RegisterAtOffsetList>(state.proc->calleeSaveRegisterAtOffsetList());
    8284    if (shouldDumpDisassembly())
    83         dataLog("Unwind info for ", CodeBlockWithJITType(codeBlock, JITType::FTLJIT), ": ", *registerOffsets, "\n");
     85        dataLog(tierName, "Unwind info for ", CodeBlockWithJITType(codeBlock, JITType::FTLJIT), ": ", *registerOffsets, "\n");
    8486    codeBlock->setCalleeSaveRegisters(WTFMove(registerOffsets));
    8587    ASSERT(!(state.proc->frameSize() % sizeof(EncodedJSValue)));
     
    8991        state.capturedValue->offsetFromFP() / sizeof(EncodedJSValue) + graph.m_nextMachineLocal;
    9092    if (shouldDumpDisassembly()) {
    91         dataLog(
     93        dataLog(tierName,
    9294            "localsOffset = ", localsOffset, " for stack slot: ",
    9395            pointerDump(state.capturedValue), " at ", RawPointer(state.capturedValue), "\n");
     
    177179        HashSet<B3::Value*> printedValues;
    178180        HashSet<Node*> printedNodes;
    179         const char* dfgPrefix = "    ";
    180         const char* b3Prefix  = "          ";
    181         const char* airPrefix = "              ";
    182         const char* asmPrefix = "                ";
     181        const char* dfgPrefix = "DFG " "    ";
     182        const char* b3Prefix  = "b3  " "          ";
     183        const char* airPrefix = "Air " "              ";
     184        const char* asmPrefix = "asm " "                ";
    183185
    184186        auto printDFGNode = [&] (Node* node) {
  • TabularUnified trunk/Source/JavaScriptCore/ftl/FTLCompile.h

    r206525 r255482  
    11/*
    2  * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3333namespace JSC { namespace FTL {
    3434
     35extern const char* const tierName;
     36
    3537void compile(State&, DFG::Safepoint::Result&);
    3638
  • TabularUnified trunk/Source/JavaScriptCore/ftl/FTLState.cpp

    r248846 r255482  
    11/*
    2  * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013-2020 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    6868    proc->setOriginPrinter(
    6969        [] (PrintStream& out, B3::Origin origin) {
    70             out.print("DFG:", bitwise_cast<Node*>(origin.data()));
     70            out.print(bitwise_cast<Node*>(origin.data()));
    7171        });
    7272
Note: See TracChangeset for help on using the changeset viewer.