Ignore:
Timestamp:
Apr 20, 2017, 4:55:45 PM (8 years ago)
Author:
[email protected]
Message:

Update the MASM probe to only take 1 arg instead of 2 (in addition to the callback function).
https://bugs.webkit.org/show_bug.cgi?id=171088

Reviewed by Michael Saboff and Saam Barati.

Experience shows that we never use the 2nd arg. So, let's remove it to reduce
the footprint at each probe site.

Also fix the MacroAssembler::print() function so that it is a no-op when
!ENABLE(MASM_PROBE). This will allow us to have print() statements in JIT code
without a lot of #if ENABLE(MASM_PROBE)s later.

  • assembler/AbstractMacroAssembler.h:
  • assembler/MacroAssembler.cpp:

(JSC::stdFunctionCallback):
(JSC::MacroAssembler::probe):

  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM.cpp:

(JSC::MacroAssemblerARM::probe):

  • assembler/MacroAssemblerARM.h:
  • assembler/MacroAssemblerARM64.cpp:

(JSC::MacroAssemblerARM64::probe):

  • assembler/MacroAssemblerARM64.h:
  • assembler/MacroAssemblerARMv7.cpp:

(JSC::MacroAssemblerARMv7::probe):

  • assembler/MacroAssemblerARMv7.h:
  • assembler/MacroAssemblerPrinter.cpp:

(JSC::MacroAssemblerPrinter::printCallback):

  • assembler/MacroAssemblerPrinter.h:

(JSC::MacroAssemblerPrinter::print):
(JSC::MacroAssembler::print):

  • assembler/MacroAssemblerX86Common.cpp:

(JSC::MacroAssemblerX86Common::probe):

  • assembler/MacroAssemblerX86Common.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/MacroAssembler.h

    r215196 r215592  
    18141814    using MacroAssemblerBase::probe;
    18151815
     1816    void probe(std::function<void(ProbeContext*)>);
     1817#endif
     1818
    18161819    // Let's you print from your JIT generated code.
     1820    // This only works if ENABLE(MASM_PROBE). Otherwise, print() is a no-op.
    18171821    // See comments in MacroAssemblerPrinter.h for examples of how to use this.
    18181822    template<typename... Arguments>
    18191823    void print(Arguments... args);
    1820 
    1821     void probe(std::function<void (ProbeContext*)>);
    1822 #endif
    18231824};
    18241825
     
    18301831
    18311832    ProbeFunction probeFunction;
    1832     void* arg1;
    1833     void* arg2;
     1833    void* arg;
    18341834    CPUState cpu;
    18351835
Note: See TracChangeset for help on using the changeset viewer.