• Seth Brenith's avatar
    [arm][arm64] Use normal fp semantics in JSEntry · a016c9fe
    Seth Brenith authored
    On arm64, Windows Performance Recorder gets confused by the fact that fp
    in Builtins_JSEntry doesn't point to the saved {fp, lr} pair for the
    caller frame. The expected usage of fp is documented in [1]:
    
      The frame pointer (x29) is required for compatibility with fast stack
      walking used by ETW and other services. It must point to the previous
      {x29, x30} pair on the stack.
    
    In slightly more detail, the Windows function RtlWalkFrameChain is
    responsible for generating stack traces during profiling with Windows
    Performance Recorder, and that function relies on the rule quoted above.
    Notably, it does not make any effort to read the unwinding data that one
    could obtain with RtlLookupFunctionEntry. Stack walks using that data,
    such as those performed by WinDbg and the cctest StackUnwindingWin64,
    work fine.
    
    It would be convenient if we could use fp in a more standard way during
    JSEntry so that Windows profiling tools work correctly. (We can also
    reduce JSEntry by two instructions in doing so.)
    
    Both arm and arm64 currently put a -1 value on the stack at the location
    that fp points to. This could prevent accidental access during the
    epilog of JSEntry, where fp might be zero. However, we believe that this
    protection is no longer necessary, and any bug that causes a read from
    fp during the end of JSEntry would cause various CQ failures.
    
    [1] https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-160
    
    Change-Id: Iece5666129b9188fc4c12007809b50f046f4044f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2607636
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#72165}
    a016c9fe
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
DIR_METADATA Loading commit data...
OWNERS Loading commit data...
arguments-inl.h Loading commit data...
arguments.cc Loading commit data...
arguments.h Loading commit data...
execution.cc Loading commit data...
execution.h Loading commit data...
external-pointer-table.cc Loading commit data...
external-pointer-table.h Loading commit data...
frame-constants.h Loading commit data...
frames-inl.h Loading commit data...
frames.cc Loading commit data...
frames.h Loading commit data...
futex-emulation.cc Loading commit data...
futex-emulation.h Loading commit data...
interrupts-scope.cc Loading commit data...
interrupts-scope.h Loading commit data...
isolate-data.h Loading commit data...
isolate-inl.h Loading commit data...
isolate-utils-inl.h Loading commit data...
isolate-utils.h Loading commit data...
isolate.cc Loading commit data...
isolate.h Loading commit data...
local-isolate-inl.h Loading commit data...
local-isolate.cc Loading commit data...
local-isolate.h Loading commit data...
messages.cc Loading commit data...
messages.h Loading commit data...
microtask-queue.cc Loading commit data...
microtask-queue.h Loading commit data...
pointer-authentication-dummy.h Loading commit data...
pointer-authentication.h Loading commit data...
protectors-inl.h Loading commit data...
protectors.cc Loading commit data...
protectors.h Loading commit data...
runtime-profiler.cc Loading commit data...
runtime-profiler.h Loading commit data...
shared-mutex-guard-if-off-thread.h Loading commit data...
simulator-base.cc Loading commit data...
simulator-base.h Loading commit data...
simulator.h Loading commit data...
stack-guard.cc Loading commit data...
stack-guard.h Loading commit data...
thread-id.cc Loading commit data...
thread-id.h Loading commit data...
thread-local-top.cc Loading commit data...
thread-local-top.h Loading commit data...
v8threads.cc Loading commit data...
v8threads.h Loading commit data...
vm-state-inl.h Loading commit data...
vm-state.h Loading commit data...