Ignore:
Timestamp:
Sep 13, 2017, 9:21:05 PM (8 years ago)
Author:
[email protected]
Message:

Rolling out r221832: Regresses Speedometer by ~4% and Dromaeo CSS YUI by ~20%.
https://bugs.webkit.org/show_bug.cgi?id=176888
<rdar://problem/34381832>

Not reviewed.

JSTests:

  • stress/op_mod-ConstVar.js:
  • stress/op_mod-VarConst.js:
  • stress/op_mod-VarVar.js:

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssembler.cpp:

(JSC::stdFunctionCallback):

  • assembler/MacroAssemblerPrinter.cpp:

(JSC::Printer::printCallback):

  • assembler/ProbeContext.h:

(JSC::Probe:: const):
(JSC::Probe::Context::Context):
(JSC::Probe::Context::gpr):
(JSC::Probe::Context::spr):
(JSC::Probe::Context::fpr):
(JSC::Probe::Context::gprName):
(JSC::Probe::Context::sprName):
(JSC::Probe::Context::fprName):
(JSC::Probe::Context::pc):
(JSC::Probe::Context::fp):
(JSC::Probe::Context::sp):
(JSC::Probe::CPUState::gpr const): Deleted.
(JSC::Probe::CPUState::spr const): Deleted.
(JSC::Probe::Context::arg): Deleted.
(JSC::Probe::Context::gpr const): Deleted.
(JSC::Probe::Context::spr const): Deleted.
(JSC::Probe::Context::fpr const): Deleted.

  • assembler/ProbeFrame.h: Removed.
  • assembler/ProbeStack.cpp:

(JSC::Probe::Page::Page):

  • assembler/ProbeStack.h:

(JSC::Probe::Page::get):
(JSC::Probe::Page::set):
(JSC::Probe::Page::physicalAddressFor):
(JSC::Probe::Stack::lowWatermark):
(JSC::Probe::Stack::get):
(JSC::Probe::Stack::set):

  • bytecode/ArithProfile.cpp:
  • bytecode/ArithProfile.h:
  • bytecode/ArrayProfile.h:

(JSC::ArrayProfile::observeArrayMode): Deleted.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::updateOSRExitCounterAndCheckIfNeedToReoptimize): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::addressOfOSRExitCounter):

  • bytecode/ExecutionCounter.h:

(JSC::ExecutionCounter::hasCrossedThreshold const): Deleted.
(JSC::ExecutionCounter::setNewThresholdForOSRExit): Deleted.

  • bytecode/MethodOfGettingAValueProfile.cpp:

(JSC::MethodOfGettingAValueProfile::reportValue): Deleted.

  • bytecode/MethodOfGettingAValueProfile.h:
  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGJITCode.cpp:

(JSC::DFG::JITCode::findPC):

  • dfg/DFGJITCode.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::linkOSRExits):
(JSC::DFG::JITCompiler::link):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::setPatchableCodeOffset):
(JSC::DFG::OSRExit::getPatchableCodeOffsetAsJump const):
(JSC::DFG::OSRExit::codeLocationForRepatch const):
(JSC::DFG::OSRExit::correctJump):
(JSC::DFG::OSRExit::emitRestoreArguments):
(JSC::DFG::OSRExit::compileOSRExit):
(JSC::DFG::OSRExit::compileExit):
(JSC::DFG::OSRExit::debugOperationPrintSpeculationFailure):
(JSC::DFG::jsValueFor): Deleted.
(JSC::DFG::restoreCalleeSavesFor): Deleted.
(JSC::DFG::saveCalleeSavesFor): Deleted.
(JSC::DFG::restoreCalleeSavesFromVMEntryFrameCalleeSavesBuffer): Deleted.
(JSC::DFG::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer): Deleted.
(JSC::DFG::saveOrCopyCalleeSavesFor): Deleted.
(JSC::DFG::createDirectArgumentsDuringExit): Deleted.
(JSC::DFG::createClonedArgumentsDuringExit): Deleted.
(JSC::DFG::emitRestoreArguments): Deleted.
(JSC::DFG::OSRExit::executeOSRExit): Deleted.
(JSC::DFG::reifyInlinedCallFrames): Deleted.
(JSC::DFG::adjustAndJumpToTarget): Deleted.
(JSC::DFG::printOSRExit): Deleted.

  • dfg/DFGOSRExit.h:

(JSC::DFG::OSRExitState::OSRExitState): Deleted.

  • dfg/DFGOSRExitCompilerCommon.cpp:
  • dfg/DFGOSRExitCompilerCommon.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrExitThunkGenerator): Deleted.

  • dfg/DFGThunks.h:
  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::debugCall):

  • jit/AssemblyHelpers.h:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • profiler/ProfilerOSRExit.h:

(JSC::Profiler::OSRExit::incCount): Deleted.

  • runtime/JSCJSValue.h:
  • runtime/JSCJSValueInlines.h:
  • runtime/VM.h:
File:
1 edited

Legend:

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

    r221832 r222009  
    5757    T get(void* logicalAddress)
    5858    {
    59         void* from = physicalAddressFor(logicalAddress);
    60         typename std::remove_const<T>::type to { };
    61         std::memcpy(&to, from, sizeof(to)); // Use std::memcpy to avoid strict aliasing issues.
    62         return to;
    63     }
    64     template<typename T>
    65     T get(void* logicalBaseAddress, ptrdiff_t offset)
    66     {
    67         return get<T>(reinterpret_cast<uint8_t*>(logicalBaseAddress) + offset);
     59        return *physicalAddressFor<T*>(logicalAddress);
    6860    }
    6961
     
    7264    {
    7365        m_dirtyBits |= dirtyBitFor(logicalAddress);
    74         void* to = physicalAddressFor(logicalAddress);
    75         std::memcpy(to, &value, sizeof(T)); // Use std::memcpy to avoid strict aliasing issues.
    76     }
    77     template<typename T>
    78     void set(void* logicalBaseAddress, ptrdiff_t offset, T value)
    79     {
    80         set<T>(reinterpret_cast<uint8_t*>(logicalBaseAddress) + offset, value);
     66        *physicalAddressFor<T*>(logicalAddress) = value;
    8167    }
    8268
     
    9581    }
    9682
    97     void* physicalAddressFor(void* logicalAddress)
     83    template<typename T, typename = typename std::enable_if<std::is_pointer<T>::value>::type>
     84    T physicalAddressFor(void* logicalAddress)
    9885    {
    99         return reinterpret_cast<uint8_t*>(logicalAddress) + m_physicalAddressOffset;
     86        uintptr_t offset = reinterpret_cast<uintptr_t>(logicalAddress) & s_pageMask;
     87        void* physicalAddress = reinterpret_cast<uint8_t*>(&m_buffer) + offset;
     88        return reinterpret_cast<T>(physicalAddress);
    10089    }
    10190
     
    10493    void* m_baseLogicalAddress { nullptr };
    10594    uintptr_t m_dirtyBits { 0 };
    106     ptrdiff_t m_physicalAddressOffset;
    10795
    10896    static constexpr size_t s_pageSize = 1024;
     
    133121    Stack(Stack&& other);
    134122
    135     void* lowWatermark()
    136     {
    137         // We use the chunkAddress for the low watermark because we'll be doing write backs
    138         // to the stack in increments of chunks. Hence, we'll treat the lowest address of
    139         // the chunk as the low watermark of any given set address.
    140         return Page::chunkAddressFor(m_lowWatermark);
    141     }
     123    void* lowWatermark() { return m_lowWatermark; }
    142124
    143125    template<typename T>
    144     T get(void* address)
     126    typename std::enable_if<!std::is_same<double, typename std::remove_cv<T>::type>::value, T>::type get(void* address)
    145127    {
    146128        Page* page = pageFor(address);
    147129        return page->get<T>(address);
    148130    }
    149     template<typename T>
    150     T get(void* logicalBaseAddress, ptrdiff_t offset)
    151     {
    152         return get<T>(reinterpret_cast<uint8_t*>(logicalBaseAddress) + offset);
    153     }
    154131
    155     template<typename T>
     132    template<typename T, typename = typename std::enable_if<!std::is_same<double, typename std::remove_cv<T>::type>::value>::type>
    156133    void set(void* address, T value)
    157134    {
     
    159136        page->set<T>(address, value);
    160137
    161         if (address < m_lowWatermark)
    162             m_lowWatermark = address;
     138        // We use the chunkAddress for the low watermark because we'll be doing write backs
     139        // to the stack in increments of chunks. Hence, we'll treat the lowest address of
     140        // the chunk as the low watermark of any given set address.
     141        void* chunkAddress = Page::chunkAddressFor(address);
     142        if (chunkAddress < m_lowWatermark)
     143            m_lowWatermark = chunkAddress;
    163144    }
     145
    164146    template<typename T>
    165     void set(void* logicalBaseAddress, ptrdiff_t offset, T value)
     147    typename std::enable_if<std::is_same<double, typename std::remove_cv<T>::type>::value, T>::type get(void* address)
    166148    {
    167         set<T>(reinterpret_cast<uint8_t*>(logicalBaseAddress) + offset, value);
     149        Page* page = pageFor(address);
     150        return bitwise_cast<double>(page->get<uint64_t>(address));
     151    }
     152
     153    template<typename T, typename = typename std::enable_if<std::is_same<double, typename std::remove_cv<T>::type>::value>::type>
     154    void set(void* address, double value)
     155    {
     156        set<uint64_t>(address, bitwise_cast<uint64_t>(value));
    168157    }
    169158
Note: See TracChangeset for help on using the changeset viewer.