Changeset 170564 in webkit


Ignore:
Timestamp:
Jun 27, 2014, 10:43:05 PM (11 years ago)
Author:
fpizlo@apple.com
Message:

[ftlopt] If a CodeBlock is jettisoned due to a watchpoint then it should be possible to figure out something about that watchpoint
https://bugs.webkit.org/show_bug.cgi?id=134333

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This is engineered to provide loads of information to the profiler without incurring any
costs when the profiler is disabled. It's the oldest trick in the book: the thing that
fires the watchpoint doesn't actually create anything to describe the reason why it was
fired; instead it creates a stack-allocated FireDetail subclass instance. Only if the
FireDetail::dump() virtual method is called does anything happen.

Currently we use this to produce very fine-grained data for Structure watchpoints and
some cases of variable watchpoints. For all other situations, the given reason is just a
string constant, by using StringFireDetail. If we find a situation where that string
constant is insufficient to diagnose an issue then we can change it to provide more
fine-grained information.

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::jettison):

  • bytecode/CodeBlock.h:
  • bytecode/CodeBlockJettisoningWatchpoint.cpp:

(JSC::CodeBlockJettisoningWatchpoint::fireInternal):

  • bytecode/CodeBlockJettisoningWatchpoint.h:
  • bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp: Removed.
  • bytecode/ProfiledCodeBlockJettisoningWatchpoint.h: Removed.
  • bytecode/StructureStubClearingWatchpoint.cpp:

(JSC::StructureStubClearingWatchpoint::fireInternal):

  • bytecode/StructureStubClearingWatchpoint.h:
  • bytecode/VariableWatchpointSet.h:

(JSC::VariableWatchpointSet::invalidate):
(JSC::VariableWatchpointSet::finalizeUnconditionally):

  • bytecode/VariableWatchpointSetInlines.h:

(JSC::VariableWatchpointSet::notifyWrite):

  • bytecode/Watchpoint.cpp:

(JSC::StringFireDetail::dump):
(JSC::WatchpointSet::fireAll):
(JSC::WatchpointSet::fireAllSlow):
(JSC::WatchpointSet::fireAllWatchpoints):
(JSC::InlineWatchpointSet::fireAll):

  • bytecode/Watchpoint.h:

(JSC::FireDetail::FireDetail):
(JSC::FireDetail::~FireDetail):
(JSC::StringFireDetail::StringFireDetail):
(JSC::Watchpoint::fire):
(JSC::WatchpointSet::fireAll):
(JSC::WatchpointSet::touch):
(JSC::WatchpointSet::invalidate):
(JSC::InlineWatchpointSet::fireAll):
(JSC::InlineWatchpointSet::touch):

  • dfg/DFGCommonData.h:
  • dfg/DFGOperations.cpp:
  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • jsc.cpp:

(WTF::Masquerader::create):

  • profiler/ProfilerCompilation.cpp:

(JSC::Profiler::Compilation::setJettisonReason):
(JSC::Profiler::Compilation::toJS):

  • profiler/ProfilerCompilation.h:

(JSC::Profiler::Compilation::setJettisonReason): Deleted.

  • runtime/ArrayBuffer.cpp:

(JSC::ArrayBuffer::transfer):

  • runtime/ArrayBufferNeuteringWatchpoint.cpp:

(JSC::ArrayBufferNeuteringWatchpoint::fireAll):

  • runtime/ArrayBufferNeuteringWatchpoint.h:
  • runtime/CommonIdentifiers.h:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/Identifier.cpp:

(JSC::Identifier::dump):

  • runtime/Identifier.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::addFunction):
(JSC::JSGlobalObject::haveABadTime):

  • runtime/JSSymbolTableObject.cpp:

(JSC::VariableWriteFireDetail::dump):

  • runtime/JSSymbolTableObject.h:

(JSC::VariableWriteFireDetail::VariableWriteFireDetail):
(JSC::symbolTablePut):
(JSC::symbolTablePutWithAttributes):

  • runtime/PropertyName.h:

(JSC::PropertyName::dump):

  • runtime/Structure.cpp:

(JSC::Structure::notifyTransitionFromThisStructure):

  • runtime/Structure.h:

(JSC::Structure::notifyTransitionFromThisStructure): Deleted.

  • runtime/SymbolTable.cpp:

(JSC::SymbolTableEntry::notifyWriteSlow):
(JSC::SymbolTable::WatchpointCleanup::finalizeUnconditionally):

  • runtime/SymbolTable.h:

(JSC::SymbolTableEntry::notifyWrite):

  • runtime/VM.cpp:

(JSC::VM::addImpureProperty):

Source/WebCore:

No new tests because no change in behavior.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):

Tools:

  • Scripts/display-profiler-output:
Location:
branches/ftlopt
Files:
1 added
2 deleted
38 edited

Legend:

Unmodified
Added
Removed
  • branches/ftlopt/Source/JavaScriptCore/ChangeLog

    r170556 r170564  
     12014-06-25  Filip Pizlo  <fpizlo@apple.com>
     2
     3        [ftlopt] If a CodeBlock is jettisoned due to a watchpoint then it should be possible to figure out something about that watchpoint
     4        https://bugs.webkit.org/show_bug.cgi?id=134333
     5
     6        Reviewed by Geoffrey Garen.
     7       
     8        This is engineered to provide loads of information to the profiler without incurring any
     9        costs when the profiler is disabled. It's the oldest trick in the book: the thing that
     10        fires the watchpoint doesn't actually create anything to describe the reason why it was
     11        fired; instead it creates a stack-allocated FireDetail subclass instance. Only if the
     12        FireDetail::dump() virtual method is called does anything happen.
     13       
     14        Currently we use this to produce very fine-grained data for Structure watchpoints and
     15        some cases of variable watchpoints. For all other situations, the given reason is just a
     16        string constant, by using StringFireDetail. If we find a situation where that string
     17        constant is insufficient to diagnose an issue then we can change it to provide more
     18        fine-grained information.
     19
     20        * JavaScriptCore.xcodeproj/project.pbxproj:
     21        * bytecode/CodeBlock.cpp:
     22        (JSC::CodeBlock::CodeBlock):
     23        (JSC::CodeBlock::jettison):
     24        * bytecode/CodeBlock.h:
     25        * bytecode/CodeBlockJettisoningWatchpoint.cpp:
     26        (JSC::CodeBlockJettisoningWatchpoint::fireInternal):
     27        * bytecode/CodeBlockJettisoningWatchpoint.h:
     28        * bytecode/ProfiledCodeBlockJettisoningWatchpoint.cpp: Removed.
     29        * bytecode/ProfiledCodeBlockJettisoningWatchpoint.h: Removed.
     30        * bytecode/StructureStubClearingWatchpoint.cpp:
     31        (JSC::StructureStubClearingWatchpoint::fireInternal):
     32        * bytecode/StructureStubClearingWatchpoint.h:
     33        * bytecode/VariableWatchpointSet.h:
     34        (JSC::VariableWatchpointSet::invalidate):
     35        (JSC::VariableWatchpointSet::finalizeUnconditionally):
     36        * bytecode/VariableWatchpointSetInlines.h:
     37        (JSC::VariableWatchpointSet::notifyWrite):
     38        * bytecode/Watchpoint.cpp:
     39        (JSC::StringFireDetail::dump):
     40        (JSC::WatchpointSet::fireAll):
     41        (JSC::WatchpointSet::fireAllSlow):
     42        (JSC::WatchpointSet::fireAllWatchpoints):
     43        (JSC::InlineWatchpointSet::fireAll):
     44        * bytecode/Watchpoint.h:
     45        (JSC::FireDetail::FireDetail):
     46        (JSC::FireDetail::~FireDetail):
     47        (JSC::StringFireDetail::StringFireDetail):
     48        (JSC::Watchpoint::fire):
     49        (JSC::WatchpointSet::fireAll):
     50        (JSC::WatchpointSet::touch):
     51        (JSC::WatchpointSet::invalidate):
     52        (JSC::InlineWatchpointSet::fireAll):
     53        (JSC::InlineWatchpointSet::touch):
     54        * dfg/DFGCommonData.h:
     55        * dfg/DFGOperations.cpp:
     56        * interpreter/Interpreter.cpp:
     57        (JSC::Interpreter::execute):
     58        * jsc.cpp:
     59        (WTF::Masquerader::create):
     60        * profiler/ProfilerCompilation.cpp:
     61        (JSC::Profiler::Compilation::setJettisonReason):
     62        (JSC::Profiler::Compilation::toJS):
     63        * profiler/ProfilerCompilation.h:
     64        (JSC::Profiler::Compilation::setJettisonReason): Deleted.
     65        * runtime/ArrayBuffer.cpp:
     66        (JSC::ArrayBuffer::transfer):
     67        * runtime/ArrayBufferNeuteringWatchpoint.cpp:
     68        (JSC::ArrayBufferNeuteringWatchpoint::fireAll):
     69        * runtime/ArrayBufferNeuteringWatchpoint.h:
     70        * runtime/CommonIdentifiers.h:
     71        * runtime/CommonSlowPaths.cpp:
     72        (JSC::SLOW_PATH_DECL):
     73        * runtime/Identifier.cpp:
     74        (JSC::Identifier::dump):
     75        * runtime/Identifier.h:
     76        * runtime/JSFunction.cpp:
     77        (JSC::JSFunction::put):
     78        (JSC::JSFunction::defineOwnProperty):
     79        * runtime/JSGlobalObject.cpp:
     80        (JSC::JSGlobalObject::addFunction):
     81        (JSC::JSGlobalObject::haveABadTime):
     82        * runtime/JSSymbolTableObject.cpp:
     83        (JSC::VariableWriteFireDetail::dump):
     84        * runtime/JSSymbolTableObject.h:
     85        (JSC::VariableWriteFireDetail::VariableWriteFireDetail):
     86        (JSC::symbolTablePut):
     87        (JSC::symbolTablePutWithAttributes):
     88        * runtime/PropertyName.h:
     89        (JSC::PropertyName::dump):
     90        * runtime/Structure.cpp:
     91        (JSC::Structure::notifyTransitionFromThisStructure):
     92        * runtime/Structure.h:
     93        (JSC::Structure::notifyTransitionFromThisStructure): Deleted.
     94        * runtime/SymbolTable.cpp:
     95        (JSC::SymbolTableEntry::notifyWriteSlow):
     96        (JSC::SymbolTable::WatchpointCleanup::finalizeUnconditionally):
     97        * runtime/SymbolTable.h:
     98        (JSC::SymbolTableEntry::notifyWrite):
     99        * runtime/VM.cpp:
     100        (JSC::VM::addImpureProperty):
     101
    11022014-06-27  Michael Saboff  <msaboff@apple.com>
    2103
  • branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r170490 r170564  
    478478                0FC97F33182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC97F2F182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.cpp */; };
    479479                0FC97F34182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC97F30182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
    480                 0FC97F35182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC97F31182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.cpp */; };
    481                 0FC97F36182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC97F32182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
    482480                0FC97F3D18202119002C9B26 /* DFGInvalidationPointInjectionPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC97F3718202119002C9B26 /* DFGInvalidationPointInjectionPhase.cpp */; };
    483481                0FC97F3E18202119002C9B26 /* DFGInvalidationPointInjectionPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC97F3818202119002C9B26 /* DFGInvalidationPointInjectionPhase.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    486484                0FC97F4118202119002C9B26 /* DFGWatchpointCollectionPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC97F3B18202119002C9B26 /* DFGWatchpointCollectionPhase.cpp */; };
    487485                0FC97F4218202119002C9B26 /* DFGWatchpointCollectionPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC97F3C18202119002C9B26 /* DFGWatchpointCollectionPhase.h */; settings = {ATTRIBUTES = (Private, ); }; };
     486                0FCA9113195E66A000426438 /* VariableWatchpointSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCA9112195E66A000426438 /* VariableWatchpointSet.cpp */; };
    488487                0FCCAE4516D0CF7400D0C65B /* ParserError.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FCCAE4316D0CF6E00D0C65B /* ParserError.h */; settings = {ATTRIBUTES = (Private, ); }; };
    489488                0FCEFAAB1804C13E00472CE4 /* FTLSaveRestore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FCEFAA91804C13E00472CE4 /* FTLSaveRestore.cpp */; };
     
    26632662                0FC97F2F182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeBlockJettisoningWatchpoint.cpp; sourceTree = "<group>"; };
    26642663                0FC97F30182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeBlockJettisoningWatchpoint.h; sourceTree = "<group>"; };
    2665                 0FC97F31182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProfiledCodeBlockJettisoningWatchpoint.cpp; sourceTree = "<group>"; };
    2666                 0FC97F32182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProfiledCodeBlockJettisoningWatchpoint.h; sourceTree = "<group>"; };
    26672664                0FC97F3718202119002C9B26 /* DFGInvalidationPointInjectionPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGInvalidationPointInjectionPhase.cpp; path = dfg/DFGInvalidationPointInjectionPhase.cpp; sourceTree = "<group>"; };
    26682665                0FC97F3818202119002C9B26 /* DFGInvalidationPointInjectionPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGInvalidationPointInjectionPhase.h; path = dfg/DFGInvalidationPointInjectionPhase.h; sourceTree = "<group>"; };
     
    26712668                0FC97F3B18202119002C9B26 /* DFGWatchpointCollectionPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGWatchpointCollectionPhase.cpp; path = dfg/DFGWatchpointCollectionPhase.cpp; sourceTree = "<group>"; };
    26722669                0FC97F3C18202119002C9B26 /* DFGWatchpointCollectionPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGWatchpointCollectionPhase.h; path = dfg/DFGWatchpointCollectionPhase.h; sourceTree = "<group>"; };
     2670                0FCA9112195E66A000426438 /* VariableWatchpointSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VariableWatchpointSet.cpp; sourceTree = "<group>"; };
    26732671                0FCB408515C0A3C30048932B /* SlotVisitorInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotVisitorInlines.h; sourceTree = "<group>"; };
    26742672                0FCCAE4316D0CF6E00D0C65B /* ParserError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParserError.h; sourceTree = "<group>"; };
     
    54115409                                0FB5467614F59AD1002C2989 /* LazyOperandValueProfile.h */,
    54125410                                0F0FC45814BD15F100B81154 /* LLIntCallLinkInfo.h */,
    5413                                 522ABAF9194A8043008B1C85 /* TypeLocation.h */,
    54145411                                0FB5467C14F5CFD3002C2989 /* MethodOfGettingAValueProfile.cpp */,
    54155412                                0FB5467A14F5C7D4002C2989 /* MethodOfGettingAValueProfile.h */,
     
    54265423                                0F98205D16BFE37F00240D02 /* PreciseJumpTargets.cpp */,
    54275424                                0F98205E16BFE37F00240D02 /* PreciseJumpTargets.h */,
    5428                                 0FC97F31182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.cpp */,
    5429                                 0FC97F32182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.h */,
    54305425                                0F93329914CA7DC10085F3C6 /* PutByIdStatus.cpp */,
    54315426                                0F93329A14CA7DC10085F3C6 /* PutByIdStatus.h */,
     
    54495444                                0F7AB82C1958DA1C00C6881F /* ToThisStatus.cpp */,
    54505445                                0F7AB82D1958DA1C00C6881F /* ToThisStatus.h */,
    5451                                 52DAD38E195A164E00F30464 /* TypeLocation.h */,
     5446                                522ABAF9194A8043008B1C85 /* TypeLocation.h */,
    54525447                                A79E781E15EECBA80047C855 /* UnlinkedCodeBlock.cpp */,
    54535448                                A79E781F15EECBA80047C855 /* UnlinkedCodeBlock.h */,
     
    54575452                                0F24E55717F74EDB00ABB217 /* ValueRecovery.cpp */,
    54585453                                0F426A451460CBAB00131F8F /* ValueRecovery.h */,
     5454                                0FCA9112195E66A000426438 /* VariableWatchpointSet.cpp */,
    54595455                                0F9181C618415CA50057B669 /* VariableWatchpointSet.h */,
    54605456                                FE5248F8191442D900B7FDE4 /* VariableWatchpointSetInlines.h */,
     
    54625458                                0F919D2215853CDE004A4E7D /* Watchpoint.cpp */,
    54635459                                0F919D2315853CDE004A4E7D /* Watchpoint.h */,
     5460                                52DAD38E195A164E00F30464 /* TypeLocation.h */,
    54645461                        );
    54655462                        path = bytecode;
     
    65656562                                868916B0155F286300CB2B9A /* PrivateName.h in Headers */,
    65666563                                BC18C4500E16F5CD00B34460 /* Profile.h in Headers */,
    6567                                 0FC97F36182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.h in Headers */,
    65686564                                95CD45770E1C4FDD0085358E /* ProfileGenerator.h in Headers */,
    65696565                                BC18C4510E16F5CD00B34460 /* ProfileNode.h in Headers */,
     
    76667662                                C2981FDC17BAFF4400A3BC98 /* DFGDesiredWriteBarriers.cpp in Sources */,
    76677663                                0FF427641591A1CC004CB9FF /* DFGDisassembler.cpp in Sources */,
     7664                                0FCA9113195E66A000426438 /* VariableWatchpointSet.cpp in Sources */,
    76687665                                0FD81AD2154FB4EE00983E72 /* DFGDominators.cpp in Sources */,
    76697666                                0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */,
     
    80058002                                0F98206016BFE38100240D02 /* PreciseJumpTargets.cpp in Sources */,
    80068003                                95742F650DD11F5A000917FB /* Profile.cpp in Sources */,
    8007                                 0FC97F35182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.cpp in Sources */,
    80088004                                95CD45760E1C4FDD0085358E /* ProfileGenerator.cpp in Sources */,
    80098005                                95AB83560DA43C3000BC83F3 /* ProfileNode.cpp in Sources */,
  • branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r170490 r170564  
    4040#include "DFGWorklist.h"
    4141#include "Debugger.h"
     42#include "FunctionExecutableDump.h"
    4243#include "HighFidelityTypeProfiler.h"
    4344#include "Interpreter.h"
     
    15521553}
    15531554
     1555namespace {
     1556
     1557class PutToScopeFireDetail : public FireDetail {
     1558public:
     1559    PutToScopeFireDetail(CodeBlock* codeBlock, const Identifier& ident)
     1560        : m_codeBlock(codeBlock)
     1561        , m_ident(ident)
     1562    {
     1563    }
     1564   
     1565    virtual void dump(PrintStream& out) const override
     1566    {
     1567        out.print("Linking put_to_scope in ", FunctionExecutableDump(jsCast<FunctionExecutable*>(m_codeBlock->ownerExecutable())), " for ", m_ident);
     1568    }
     1569   
     1570private:
     1571    CodeBlock* m_codeBlock;
     1572    const Identifier& m_ident;
     1573};
     1574
     1575} // anonymous namespace
     1576
    15541577CodeBlock::CodeBlock(CopyParsedBlockTag, CodeBlock& other)
    15551578    : m_globalObject(other.m_globalObject)
     
    19061929            else if (op.type == ClosureVar || op.type == ClosureVarWithVarInjectionChecks) {
    19071930                if (op.watchpointSet)
    1908                     op.watchpointSet->invalidate();
     1931                    op.watchpointSet->invalidate(PutToScopeFireDetail(this, ident));
    19091932            } else if (op.structure)
    19101933                instructions[i + 5].u.structure.set(*vm(), ownerExecutable, op.structure);
     
    29672990#endif
    29682991
    2969 void CodeBlock::jettison(Profiler::JettisonReason reason, ReoptimizationMode mode)
     2992void CodeBlock::jettison(Profiler::JettisonReason reason, ReoptimizationMode mode, const FireDetail* detail)
    29702993{
    29712994    RELEASE_ASSERT(reason != Profiler::NotJettisoned);
     
    29762999        if (mode == CountReoptimization)
    29773000            dataLog(" and counting reoptimization");
    2978         dataLog(" due to ", reason, ".\n");
     3001        dataLog(" due to ", reason);
     3002        if (detail)
     3003            dataLog(", ", *detail);
     3004        dataLog(".\n");
    29793005    }
    29803006   
     
    29833009   
    29843010    if (Profiler::Compilation* compilation = jitCode()->dfgCommon()->compilation.get())
    2985         compilation->setJettisonReason(reason);
     3011        compilation->setJettisonReason(reason, detail);
    29863012   
    29873013    // We want to accomplish two things here:
  • branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlock.h

    r170490 r170564  
    313313#endif
    314314
    315     void jettison(Profiler::JettisonReason, ReoptimizationMode = DontCountReoptimization);
     315    void jettison(Profiler::JettisonReason, ReoptimizationMode = DontCountReoptimization, const FireDetail* = nullptr);
    316316   
    317317    ScriptExecutable* ownerExecutable() const { return m_ownerExecutable.get(); }
  • branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlockJettisoningWatchpoint.cpp

    r163844 r170564  
    3333namespace JSC {
    3434
    35 void CodeBlockJettisoningWatchpoint::fireInternal()
     35void CodeBlockJettisoningWatchpoint::fireInternal(const FireDetail& detail)
    3636{
    3737    if (DFG::shouldShowDisassembly())
    3838        dataLog("Firing watchpoint ", RawPointer(this), " on ", *m_codeBlock, "\n");
    3939
    40     m_codeBlock->jettison(Profiler::JettisonDueToUnprofiledWatchpoint, CountReoptimization);
     40    m_codeBlock->jettison(Profiler::JettisonDueToUnprofiledWatchpoint, CountReoptimization, &detail);
    4141
    4242    if (isOnList())
  • branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlockJettisoningWatchpoint.h

    r162139 r170564  
    4646   
    4747protected:
    48     virtual void fireInternal() override;
     48    virtual void fireInternal(const FireDetail&) override;
    4949
    5050private:
  • branches/ftlopt/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp

    r163844 r170564  
    4545}
    4646
    47 void StructureStubClearingWatchpoint::fireInternal()
     47void StructureStubClearingWatchpoint::fireInternal(const FireDetail&)
    4848{
    4949    // This will implicitly cause my own demise: stub reset removes all watchpoints.
  • branches/ftlopt/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h

    r164424 r170564  
    6969
    7070protected:
    71     virtual void fireInternal() override;
     71    virtual void fireInternal(const FireDetail&) override;
    7272
    7373private:
  • branches/ftlopt/Source/JavaScriptCore/bytecode/VariableWatchpointSet.h

    r168443 r170564  
    3232namespace JSC {
    3333
     34class JSObject;
    3435class SymbolTable;
     36
     37class VariableWriteFireDetail : public FireDetail {
     38public:
     39    VariableWriteFireDetail(JSObject* object, const PropertyName& name)
     40        : m_object(object)
     41        , m_name(name)
     42    {
     43    }
     44   
     45    virtual void dump(PrintStream&) const override;
     46
     47private:
     48    JSObject* m_object;
     49    const PropertyName& m_name;
     50};
    3551
    3652class VariableWatchpointSet : public WatchpointSet {
     
    5874    JSValue inferredValue() const { return m_inferredValue.get(); }
    5975   
    60     inline void notifyWrite(VM&, JSValue);
     76    void notifyWrite(VM&, JSValue, const FireDetail&);
     77    JS_EXPORT_PRIVATE void notifyWrite(VM&, JSValue, JSObject* baseObject, const PropertyName&);
     78    void notifyWrite(VM&, JSValue, const char* reason);
    6179   
    62     void invalidate()
     80    void invalidate(const FireDetail& detail)
    6381    {
    6482        m_inferredValue.clear();
    65         WatchpointSet::invalidate();
     83        WatchpointSet::invalidate(detail);
    6684    }
    6785   
    68     void finalizeUnconditionally()
     86    void finalizeUnconditionally(const FireDetail& detail)
    6987    {
    7088        ASSERT(!!m_inferredValue == (state() == IsWatched));
     
    7795        if (Heap::isMarked(cell))
    7896            return;
    79         invalidate();
     97        invalidate(detail);
    8098    }
    8199
  • branches/ftlopt/Source/JavaScriptCore/bytecode/VariableWatchpointSetInlines.h

    r168443 r170564  
    3232namespace JSC {
    3333
    34 inline void VariableWatchpointSet::notifyWrite(VM& vm, JSValue value)
     34inline void VariableWatchpointSet::notifyWrite(VM& vm, JSValue value, const FireDetail& detail)
    3535{
    3636    ASSERT(!!value);
     
    4545        if (value == m_inferredValue.get())
    4646            return;
    47         invalidate();
     47        invalidate(detail);
    4848        return;
    4949           
     
    5555    ASSERT_NOT_REACHED();
    5656}
    57    
     57
    5858} // namespace JSC
    5959
  • branches/ftlopt/Source/JavaScriptCore/bytecode/Watchpoint.cpp

    r159545 r170564  
    11/*
    2  * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3232
    3333namespace JSC {
     34
     35void StringFireDetail::dump(PrintStream& out) const
     36{
     37    out.print(m_string);
     38}
    3439
    3540Watchpoint::~Watchpoint()
     
    6671}
    6772
    68 void WatchpointSet::fireAllSlow()
     73void WatchpointSet::fireAll(const char* reason)
     74{
     75    fireAll(StringFireDetail(reason));
     76}
     77
     78void WatchpointSet::fireAllSlow(const FireDetail& detail)
    6979{
    7080    ASSERT(state() == IsWatched);
    7181   
    7282    WTF::storeStoreFence();
    73     fireAllWatchpoints();
     83    fireAllWatchpoints(detail);
    7484    m_state = IsInvalidated;
    7585    WTF::storeStoreFence();
    7686}
    7787
    78 void WatchpointSet::fireAllWatchpoints()
     88void WatchpointSet::fireAllWatchpoints(const FireDetail& detail)
    7989{
    8090    while (!m_set.isEmpty())
    81         m_set.begin()->fire();
     91        m_set.begin()->fire(detail);
    8292}
    8393
     
    8595{
    8696    inflate()->add(watchpoint);
     97}
     98
     99void InlineWatchpointSet::fireAll(const char* reason)
     100{
     101    fireAll(StringFireDetail(reason));
    87102}
    88103
  • branches/ftlopt/Source/JavaScriptCore/bytecode/Watchpoint.h

    r162777 r170564  
    11/*
    2  * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012, 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2828
    2929#include <wtf/Atomics.h>
     30#include <wtf/PrintStream.h>
    3031#include <wtf/SentinelLinkedList.h>
    3132#include <wtf/ThreadSafeRefCounted.h>
     
    3334namespace JSC {
    3435
     36class FireDetail {
     37public:
     38    FireDetail()
     39    {
     40    }
     41   
     42    virtual ~FireDetail()
     43    {
     44    }
     45   
     46    virtual void dump(PrintStream&) const = 0;
     47};
     48
     49class StringFireDetail : public FireDetail {
     50public:
     51    StringFireDetail(const char* string)
     52        : m_string(string)
     53    {
     54    }
     55   
     56    virtual void dump(PrintStream& out) const override;
     57
     58private:
     59    const char* m_string;
     60};
     61
    3562class Watchpoint : public BasicRawSentinelNode<Watchpoint> {
    3663public:
     
    4168    virtual ~Watchpoint();
    4269
    43     void fire() { fireInternal(); }
     70    void fire(const FireDetail& detail) { fireInternal(detail); }
    4471   
    4572protected:
    46     virtual void fireInternal() = 0;
     73    virtual void fireInternal(const FireDetail&) = 0;
    4774};
    4875
     
    103130    }
    104131   
    105     void fireAll()
     132    void fireAll(const FireDetail& detail)
    106133    {
    107134        if (state() != IsWatched)
    108135            return;
    109         fireAllSlow();
    110     }
    111    
    112     void touch()
     136        fireAllSlow(detail);
     137    }
     138   
     139    JS_EXPORT_PRIVATE void fireAll(const char* reason);
     140   
     141    void touch(const FireDetail& detail)
    113142    {
    114143        if (state() == ClearWatchpoint)
    115144            startWatching();
    116145        else
    117             fireAll();
    118     }
    119    
    120     void invalidate()
     146            fireAll(detail);
     147    }
     148   
     149    void invalidate(const FireDetail& detail)
    121150    {
    122151        if (state() == IsWatched)
    123             fireAll();
     152            fireAll(detail);
    124153        m_state = IsInvalidated;
    125154    }
     
    128157    int8_t* addressOfSetIsNotEmpty() { return &m_setIsNotEmpty; }
    129158   
    130     JS_EXPORT_PRIVATE void fireAllSlow(); // Call only if you've checked isWatched.
     159    JS_EXPORT_PRIVATE void fireAllSlow(const FireDetail&); // Call only if you've checked isWatched.
    131160   
    132161private:
    133     void fireAllWatchpoints();
     162    void fireAllWatchpoints(const FireDetail&);
    134163   
    135164    friend class InlineWatchpointSet;
     
    207236    }
    208237   
    209     void fireAll()
     238    void fireAll(const FireDetail& detail)
    210239    {
    211240        if (isFat()) {
    212             fat()->fireAll();
     241            fat()->fireAll(detail);
    213242            return;
    214243        }
     
    219248    }
    220249   
    221     void touch()
     250    JS_EXPORT_PRIVATE void fireAll(const char* reason);
     251   
     252    void touch(const FireDetail& detail)
    222253    {
    223254        if (isFat()) {
    224             fat()->touch();
     255            fat()->touch(detail);
    225256            return;
    226257        }
     
    232263    }
    233264   
     265    void touch(const char* reason)
     266    {
     267        touch(StringFireDetail(reason));
     268    }
     269   
    234270private:
    235271    static const uintptr_t IsThinFlag        = 1;
  • branches/ftlopt/Source/JavaScriptCore/dfg/DFGCommonData.h

    r167467 r170564  
    3333#include "InlineCallFrameSet.h"
    3434#include "JSCell.h"
    35 #include "ProfiledCodeBlockJettisoningWatchpoint.h"
    3635#include "ProfilerCompilation.h"
    3736#include "SymbolTable.h"
     
    9796    Vector<WriteBarrier<JSCell>> weakReferences;
    9897    SegmentedVector<CodeBlockJettisoningWatchpoint, 1, 0> watchpoints;
    99     SegmentedVector<ProfiledCodeBlockJettisoningWatchpoint, 1, 0> profiledWatchpoints;
    10098    Vector<JumpReplacement> jumpReplacements;
    10199   
  • branches/ftlopt/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r168459 r170564  
    10251025    JSValue value = JSValue::decode(encodedValue);
    10261026
    1027     set->notifyWrite(vm, value);
     1027    set->notifyWrite(vm, value, "Executed NotifyWrite");
    10281028}
    10291029
  • branches/ftlopt/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r167313 r170564  
    11781178        BatchedTransitionOptimizer optimizer(vm, variableObject);
    11791179        if (variableObject->next())
    1180             variableObject->globalObject()->varInjectionWatchpoint()->fireAll();
     1180            variableObject->globalObject()->varInjectionWatchpoint()->fireAll("Executed eval, fired VarInjection watchpoint");
    11811181
    11821182        for (unsigned i = 0; i < numVariables; ++i) {
  • branches/ftlopt/Source/JavaScriptCore/jsc.cpp

    r170490 r170564  
    166166    static Masquerader* create(VM& vm, JSGlobalObject* globalObject)
    167167    {
    168         globalObject->masqueradesAsUndefinedWatchpoint()->fireAll();
     168        globalObject->masqueradesAsUndefinedWatchpoint()->fireAll("Masquerading object allocated");
    169169        Structure* structure = createStructure(vm, globalObject, jsNull());
    170170        Masquerader* result = new (NotNull, allocateCell<Masquerader>(vm.heap, sizeof(Masquerader))) Masquerader(vm, structure);
  • branches/ftlopt/Source/JavaScriptCore/profiler/ProfilerCompilation.cpp

    r163844 r170564  
    3131#include "JSCInlines.h"
    3232#include "ProfilerDatabase.h"
     33#include "Watchpoint.h"
    3334#include <wtf/StringPrintStream.h>
    3435
     
    9495}
    9596
     97void Compilation::setJettisonReason(JettisonReason jettisonReason, const FireDetail* detail)
     98{
     99    if (m_jettisonReason != NotJettisoned)
     100        return; // We only care about the original jettison reason.
     101   
     102    m_jettisonReason = jettisonReason;
     103    if (detail)
     104        m_additionalJettisonReason = toCString(*detail);
     105    else
     106        m_additionalJettisonReason = CString();
     107}
     108
    96109JSValue Compilation::toJS(ExecState* exec) const
    97110{
     
    134147    result->putDirect(exec->vm(), exec->propertyNames().numInlinedCalls, jsNumber(m_numInlinedCalls));
    135148    result->putDirect(exec->vm(), exec->propertyNames().jettisonReason, jsString(exec, String::fromUTF8(toCString(m_jettisonReason))));
     149    if (!m_additionalJettisonReason.isNull())
     150        result->putDirect(exec->vm(), exec->propertyNames().additionalJettisonReason, jsString(exec, String::fromUTF8(m_additionalJettisonReason)));
    136151   
    137152    return result;
  • branches/ftlopt/Source/JavaScriptCore/profiler/ProfilerCompilation.h

    r163254 r170564  
    4040#include <wtf/SegmentedVector.h>
    4141
    42 namespace JSC { namespace Profiler {
     42namespace JSC {
     43
     44class FireDetail;
     45
     46namespace Profiler {
    4347
    4448class Bytecodes;
     
    7074    OSRExit* addOSRExit(unsigned id, const OriginStack&, ExitKind, bool isWatchpoint);
    7175   
    72     void setJettisonReason(JettisonReason jettisonReason)
    73     {
    74         m_jettisonReason = jettisonReason;
    75     }
     76    void setJettisonReason(JettisonReason, const FireDetail*);
    7677   
    7778    JSValue toJS(ExecState*) const;
     
    8182    CompilationKind m_kind;
    8283    JettisonReason m_jettisonReason;
     84    CString m_additionalJettisonReason;
    8385    Vector<ProfiledBytecodes> m_profiledBytecodes;
    8486    Vector<CompiledBytecode> m_descriptions;
  • branches/ftlopt/Source/JavaScriptCore/runtime/ArrayBuffer.cpp

    r163844 r170564  
    5858            view->neuter();
    5959        else if (ArrayBufferNeuteringWatchpoint* watchpoint = jsDynamicCast<ArrayBufferNeuteringWatchpoint*>(cell))
    60             watchpoint->set()->fireAll();
     60            watchpoint->fireAll();
    6161    }
    6262    return true;
  • branches/ftlopt/Source/JavaScriptCore/runtime/ArrayBufferNeuteringWatchpoint.cpp

    r170129 r170564  
    6161}
    6262
     63void ArrayBufferNeuteringWatchpoint::fireAll()
     64{
     65    set()->fireAll("Array buffer was neutered");
     66}
     67
    6368} // namespace JSC
    6469
  • branches/ftlopt/Source/JavaScriptCore/runtime/ArrayBufferNeuteringWatchpoint.h

    r160150 r170564  
    5151   
    5252    WatchpointSet* set() { return m_set.get(); }
     53   
     54    void fireAll();
    5355
    5456private:
  • branches/ftlopt/Source/JavaScriptCore/runtime/CommonIdentifiers.h

    r167313 r170564  
    6363    macro(__lookupSetter__) \
    6464    macro(add) \
     65    macro(additionalJettisonReason) \
    6566    macro(anonymous) \
    6667    macro(arguments) \
  • branches/ftlopt/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp

    r170382 r170564  
    211211{
    212212    BEGIN();
    213     exec->codeBlock()->symbolTable()->m_functionEnteredOnce.touch();
     213    exec->codeBlock()->symbolTable()->m_functionEnteredOnce.touch("Function (re)entered");
    214214    END();
    215215}
     
    272272    JSValue value = OP_C(2).jsValue();
    273273    if (VariableWatchpointSet* set = pc[3].u.watchpointSet)
    274         set->notifyWrite(vm, value);
     274        set->notifyWrite(vm, value, "Executed op_captured_mov");
    275275    RETURN(value);
    276276}
     
    283283    JSValue value = JSFunction::create(vm, codeBlock->functionDecl(pc[2].u.operand), exec->scope());
    284284    if (VariableWatchpointSet* set = pc[3].u.watchpointSet)
    285         set->notifyWrite(vm, value);
     285        set->notifyWrite(vm, value, "Executed op_new_captured_func");
    286286    RETURN(value);
    287287}
  • branches/ftlopt/Source/JavaScriptCore/runtime/Identifier.cpp

    r165999 r170564  
    9898}
    9999
     100void Identifier::dump(PrintStream& out) const
     101{
     102    if (impl())
     103        out.print(impl());
     104    else
     105        out.print("<null identifier>");
     106}
     107
    100108#ifndef NDEBUG
    101109
  • branches/ftlopt/Source/JavaScriptCore/runtime/Identifier.h

    r165999 r170564  
    9797        JS_EXPORT_PRIVATE static PassRef<StringImpl> add(VM*, const char*);
    9898        JS_EXPORT_PRIVATE static PassRef<StringImpl> add(ExecState*, const char*);
     99       
     100        void dump(PrintStream&) const;
    99101
    100102    private:
  • branches/ftlopt/Source/JavaScriptCore/runtime/JSFunction.cpp

    r167313 r170564  
    418418        thisObject->methodTable(exec->vm())->getOwnPropertySlot(thisObject, exec, propertyName, slot);
    419419        thisObject->m_allocationProfile.clear();
    420         thisObject->m_allocationProfileWatchpoint.fireAll();
     420        thisObject->m_allocationProfileWatchpoint.fireAll("Store to prototype property of a function");
    421421        // Don't allow this to be cached, since a [[Put]] must clear m_allocationProfile.
    422422        PutPropertySlot dontCache(thisObject);
     
    465465        thisObject->methodTable(exec->vm())->getOwnPropertySlot(thisObject, exec, propertyName, slot);
    466466        thisObject->m_allocationProfile.clear();
    467         thisObject->m_allocationProfileWatchpoint.fireAll();
     467        thisObject->m_allocationProfileWatchpoint.fireAll("Store to prototype property of a function");
    468468        return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
    469469    }
  • branches/ftlopt/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r168443 r170564  
    263263    registerAt(var.registerNumber).set(exec->vm(), this, value);
    264264    if (var.set)
    265         var.set->notifyWrite(vm, value);
     265        var.set->notifyWrite(vm, value, VariableWriteFireDetail(this, propertyName));
    266266}
    267267
     
    562562    // the assumption that it's safe to transition to a non-SlowPut array storage don't
    563563    // do so anymore.
    564     m_havingABadTimeWatchpoint->fireAll();
     564    m_havingABadTimeWatchpoint->fireAll("Having a bad time");
    565565    ASSERT(isHavingABadTime()); // The watchpoint is what tells us that we're having a bad time.
    566566   
  • branches/ftlopt/Source/JavaScriptCore/runtime/JSSymbolTableObject.h

    r168443 r170564  
    3636
    3737namespace JSC {
     38
     39class JSSymbolTableObject;
    3840
    3941class JSSymbolTableObject : public JSScope {
     
    140142        }
    141143        if (VariableWatchpointSet* set = iter->value.watchpointSet())
    142             set->notifyWrite(vm, value);
     144            set->notifyWrite(vm, value, object, propertyName);
    143145        reg = &object->registerAt(fastEntry.getIndex());
    144146    }
     
    167169        ASSERT(!entry.isNull());
    168170        if (VariableWatchpointSet* set = entry.watchpointSet())
    169             set->notifyWrite(vm, value);
     171            set->notifyWrite(vm, value, object, propertyName);
    170172        entry.setAttributes(attributes);
    171173        reg = &object->registerAt(entry.getIndex());
  • branches/ftlopt/Source/JavaScriptCore/runtime/PropertyName.h

    r165999 r170564  
    107107        return m_impl ? toUInt32FromStringImpl(m_impl) : NotAnIndex;
    108108    }
     109   
     110    void dump(PrintStream& out) const
     111    {
     112        if (m_impl)
     113            out.print(m_impl);
     114        else
     115            out.print("<null property name>");
     116    }
    109117
    110118private:
  • branches/ftlopt/Source/JavaScriptCore/runtime/Structure.cpp

    r170490 r170564  
    10041004}
    10051005
     1006namespace {
     1007
     1008class StructureFireDetail : public FireDetail {
     1009public:
     1010    StructureFireDetail(const Structure* structure)
     1011        : m_structure(structure)
     1012    {
     1013    }
     1014   
     1015    virtual void dump(PrintStream& out) const override
     1016    {
     1017        out.print("Structure transition from ", *m_structure);
     1018    }
     1019
     1020private:
     1021    const Structure* m_structure;
     1022};
     1023
     1024} // anonymous namespace
     1025
     1026void Structure::notifyTransitionFromThisStructure() const
     1027{
     1028    m_transitionWatchpointSet.fireAll(StructureFireDetail(this));
     1029}
     1030
    10061031JSValue Structure::prototypeForLookup(CodeBlock* codeBlock) const
    10071032{
  • branches/ftlopt/Source/JavaScriptCore/runtime/Structure.h

    r170490 r170564  
    365365    }
    366366       
    367     void notifyTransitionFromThisStructure() const
    368     {
    369         m_transitionWatchpointSet.fireAll();
    370     }
     367    void notifyTransitionFromThisStructure() const;
    371368   
    372369    InlineWatchpointSet& transitionWatchpointSet() const
  • branches/ftlopt/Source/JavaScriptCore/runtime/SymbolTable.cpp

    r170490 r170564  
    8080}
    8181
    82 void SymbolTableEntry::notifyWriteSlow(VM& vm, JSValue value)
     82void SymbolTableEntry::notifyWriteSlow(VM& vm, JSValue value, const FireDetail& detail)
    8383{
    8484    VariableWatchpointSet* watchpoints = fatEntry()->m_watchpoints.get();
     
    8686        return;
    8787   
    88     watchpoints->notifyWrite(vm, value);
     88    watchpoints->notifyWrite(vm, value, detail);
    8989}
    9090
     
    133133void SymbolTable::WatchpointCleanup::finalizeUnconditionally()
    134134{
     135    StringFireDetail detail("Symbol table clean-up during GC");
    135136    Map::iterator iter = m_symbolTable->m_map.begin();
    136137    Map::iterator end = m_symbolTable->m_map.end();
    137138    for (; iter != end; ++iter) {
    138139        if (VariableWatchpointSet* set = iter->value.watchpointSet())
    139             set->finalizeUnconditionally();
     140            set->finalizeUnconditionally(detail);
    140141    }
    141142}
  • branches/ftlopt/Source/JavaScriptCore/runtime/SymbolTable.h

    r170490 r170564  
    231231    }
    232232   
    233     ALWAYS_INLINE void notifyWrite(VM& vm, JSValue value)
     233    ALWAYS_INLINE void notifyWrite(VM& vm, JSValue value, const FireDetail& detail)
    234234    {
    235235        if (LIKELY(!isFat()))
    236236            return;
    237         notifyWriteSlow(vm, value);
     237        notifyWriteSlow(vm, value, detail);
    238238    }
    239239   
     
    259259   
    260260    SymbolTableEntry& copySlow(const SymbolTableEntry&);
    261     JS_EXPORT_PRIVATE void notifyWriteSlow(VM&, JSValue);
     261    JS_EXPORT_PRIVATE void notifyWriteSlow(VM&, JSValue, const FireDetail&);
    262262   
    263263    bool isFat() const
  • branches/ftlopt/Source/JavaScriptCore/runtime/VM.cpp

    r170490 r170564  
    906906{
    907907    if (RefPtr<WatchpointSet> watchpointSet = m_impurePropertyWatchpointSets.take(propertyName))
    908         watchpointSet->fireAll();
     908        watchpointSet->fireAll("Impure property added");
    909909}
    910910
  • branches/ftlopt/Source/WebCore/ChangeLog

    r170399 r170564  
     12014-06-25  Filip Pizlo  <fpizlo@apple.com>
     2
     3        [ftlopt] If a CodeBlock is jettisoned due to a watchpoint then it should be possible to figure out something about that watchpoint
     4        https://bugs.webkit.org/show_bug.cgi?id=134333
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        No new tests because no change in behavior.
     9
     10        * bindings/scripts/CodeGeneratorJS.pm:
     11        (GenerateHeader):
     12
    1132014-06-24  Mark Lam  <mark.lam@apple.com>
    214
  • branches/ftlopt/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r168385 r170564  
    865865        push(@headerContent, "    static $className* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<$implType> impl)\n");
    866866        push(@headerContent, "    {\n");
    867         push(@headerContent, "        globalObject->masqueradesAsUndefinedWatchpoint()->fireAll();\n");
     867        push(@headerContent, "        globalObject->masqueradesAsUndefinedWatchpoint()->fireAll(\"Allocated masquerading object\");\n");
    868868        push(@headerContent, "        $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, globalObject, impl);\n");
    869869        push(@headerContent, "        ptr->finishCreation(globalObject->vm());\n");
  • branches/ftlopt/Tools/ChangeLog

    r168511 r170564  
     12014-06-25  Filip Pizlo  <fpizlo@apple.com>
     2
     3        [ftlopt] If a CodeBlock is jettisoned due to a watchpoint then it should be possible to figure out something about that watchpoint
     4        https://bugs.webkit.org/show_bug.cgi?id=134333
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * Scripts/display-profiler-output:
     9
    1102014-05-08  David Farler  <dfarler@apple.com>
    211
  • branches/ftlopt/Tools/Scripts/display-profiler-output

    r163259 r170564  
    332332    attr_accessor :bytecode, :engine, :descriptions, :counters, :compilationIndex
    333333    attr_accessor :osrExits, :profiledBytecodes, :numInlinedGetByIds, :numInlinedPutByIds
    334     attr_accessor :numInlinedCalls, :jettisonReason
     334    attr_accessor :numInlinedCalls, :jettisonReason, :additionalJettisonReason
    335335   
    336336    def initialize(json)
     
    386386        @numInlinedCalls = json["numInlinedCalls"]
    387387        @jettisonReason = json["jettisonReason"]
     388        @additionalJettisonReason = json["additionalJettisonReason"]
    388389    end
    389390   
     
    859860            if compilation.jettisonReason != "NotJettisoned"
    860861                puts "    Jettisoned due to #{compilation.jettisonReason}"
     862                if compilation.additionalJettisonReason
     863                    puts "        #{compilation.additionalJettisonReason}"
     864                end
    861865            end
    862866        }
Note: See TracChangeset for help on using the changeset viewer.