[webkit-changes] [WebKit/WebKit] 010b05: [JSC] Add sources, line, column information to Sam...

Yusuke Suzuki noreply at github.com
Fri Aug 23 20:01:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 010b05aed8971c55f5fb8d40dc5f9e8a4dea80b3
      https://github.com/WebKit/WebKit/commit/010b05aed8971c55f5fb8d40dc5f9e8a4dea80b3
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-08-23 (Fri, 23 Aug 2024)

  Changed paths:
    A JSTests/stress/sampling-profiler-line-column.js
    A JSTests/stress/sampling-profiler-url-directives.js
    M Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp
    M Source/JavaScriptCore/runtime/CachedTypes.cpp
    M Source/JavaScriptCore/runtime/SamplingProfiler.cpp
    M Source/JavaScriptCore/runtime/SamplingProfiler.h

  Log Message:
  -----------
  [JSC] Add sources, line, column information to SamplingProfiler output
https://bugs.webkit.org/show_bug.cgi?id=278585
rdar://125935249

Reviewed by Keith Miller and Mark Lam.

This patch extends sampling profiler output as followings.

1. We add `sources` section. It is array of source, and each one may have url, sourceURL, and sourceMappingURL.

    {
        sourceID: <integer source id>,
        url: <url string from WebKit / JavaScriptCore. optional>,
        sourceURL: <sourceURL string specified via comment directive. optional>,
        sourceMappingURL: <sourceMappingURL string specified via comment directive. optional>
    }

2. Add line and column information. If they are not found, it is UINT32_MAX (0xffffffff).

* JSTests/stress/sampling-profiler-line-column.js: Added.
(shouldBe):
(test):
* JSTests/stress/sampling-profiler-url-directives.js: Added.
(shouldBe):
* Source/JavaScriptCore/runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::StackFrame::sourceID):
(JSC::SamplingProfiler::StackFrame::sourceProvider):
(JSC::SamplingProfiler::stackTracesAsJSON):
* Source/JavaScriptCore/runtime/SamplingProfiler.h:

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list