Ignore:
Timestamp:
Apr 19, 2018, 4:30:47 PM (7 years ago)
Author:
[email protected]
Message:

Apply pointer profiling to Signal pointers.
https://bugs.webkit.org/show_bug.cgi?id=184790
<rdar://problem/39301369>

Reviewed by Michael Saboff.

  1. Change stackPointer, framePointer, and instructionPointer accessors to be a pair of getter/setter functions.
  2. Add support for USE(PLATFORM_REGISTERS_WITH_PROFILE) to allow use of a a pointer profiling variants of these accessors.
  3. Also add a linkRegister accessor only for ARM64 on OS(DARWIN).
  • JavaScriptCorePrefix.h:
  • runtime/MachineContext.h:

(JSC::MachineContext::stackPointerImpl):
(JSC::MachineContext::stackPointer):
(JSC::MachineContext::setStackPointer):
(JSC::MachineContext::framePointerImpl):
(JSC::MachineContext::framePointer):
(JSC::MachineContext::setFramePointer):
(JSC::MachineContext::instructionPointerImpl):
(JSC::MachineContext::instructionPointer):
(JSC::MachineContext::setInstructionPointer):
(JSC::MachineContext::linkRegisterImpl):
(JSC::MachineContext::linkRegister):
(JSC::MachineContext::setLinkRegister):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::takeSample):

  • runtime/VMTraps.cpp:

(JSC::SignalContext::SignalContext):
(JSC::VMTraps::tryInstallTrapBreakpoints):

  • tools/CodeProfiling.cpp:

(JSC::profilingTimer):

  • tools/SigillCrashAnalyzer.cpp:

(JSC::SignalContext::dump):
(JSC::installCrashHandler):
(JSC::SigillCrashAnalyzer::analyze):

  • wasm/WasmFaultSignalHandler.cpp:

(JSC::Wasm::trapHandler):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp

    r218080 r230826  
    11/*
    2  * Copyright (C) 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    7373    PlatformRegisters& platformRegisters = WTF::registersFromUContext(static_cast<ucontext_t*>(uap));
    7474    CodeProfiling::sample(
    75         MachineContext::instructionPointer(platformRegisters),
     75        MachineContext::instructionPointer(platformRegisters).untaggedExecutableAddress(),
    7676        reinterpret_cast<void**>(MachineContext::framePointer(platformRegisters)));
    7777}
Note: See TracChangeset for help on using the changeset viewer.