[webkit-changes] [WebKit/WebKit] 6b396d: [JSC] Add JSC sampling profiler SPI

Yusuke Suzuki noreply at github.com
Wed Aug 16 12:37:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6b396d264030e3621a2761a1bd5aa5719d464b6d
      https://github.com/WebKit/WebKit/commit/6b396d264030e3621a2761a1bd5aa5719d464b6d
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-08-16 (Wed, 16 Aug 2023)

  Changed paths:
    M Source/JavaScriptCore/API/JSContextRef.cpp
    M Source/JavaScriptCore/API/JSContextRefPrivate.h
    M Source/JavaScriptCore/API/tests/testapi.c

  Log Message:
  -----------
  [JSC] Add JSC sampling profiler SPI
https://bugs.webkit.org/show_bug.cgi?id=260247
rdar://112146210

Reviewed by Keith Miller and Mark Lam.

This patch prototypes JSC sampling profiler SPI.
Probably we will change the output / SPI with the feedback from clients later.
We add the following three SPIs.

1. JSContextGroupEnableSamplingProfiler: enabling sampling profiler
2. JSContextGroupDisableSamplingProfiler: disabling sampling profiler
3. JSContextGroupTakeSamplesFromSamplingProfiler: take and clear the accumulated samples from the profiler, returning in JSON form.

* Source/JavaScriptCore/API/JSContextRef.cpp:
(JSContextGroupEnableSamplingProfiler):
(JSContextGroupDisableSamplingProfiler):
(JSContextGroupTakeSamplesFromSamplingProfiler):
* Source/JavaScriptCore/API/JSContextRefPrivate.h:
* Source/JavaScriptCore/API/tests/testapi.c:
(samplingProfilerTest):
(main):

Canonical link: https://commits.webkit.org/266954@main




More information about the webkit-changes mailing list