Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JSC] Make PerfLog work on Darwin #16989

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Aug 23, 2023

7f950e0

[JSC] Make PerfLog work on Darwin
https://bugs.webkit.org/show_bug.cgi?id=260626
rdar://problem/114345611

Reviewed by Justin Michaud.

This patch makes PerfLog work on Darwin, which generates JITDump[1] on Darwin.
While this is not performance efficient enough, we can later optimize the way to dump this, and try using it for a prototype.

[1]: https://raw.githubusercontent.com/torvalds/linux/master/tools/perf/Documentation/jitdump-specification.txt

* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::finalizeCodeWithDisassemblyImpl):
* Source/JavaScriptCore/assembler/LinkBuffer.h:
* Source/JavaScriptCore/assembler/PerfLog.cpp:
(JSC::PerfLog::singleton):
(JSC::getCurrentThreadID):
* Source/JavaScriptCore/assembler/PerfLog.h:
* Source/JavaScriptCore/jit/ExecutableAllocator.cpp:
(JSC::initializeJITPageReservation):
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::Options::isAvailable):

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

037b758

Misc iOS, tvOS & watchOS macOS Linux Windows
❌ πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
  πŸ›  πŸ§ͺ jsc βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ›  jsc-armv7
βœ… πŸ›  tv-sim βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  watch βœ… πŸ›  jsc-mips
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim βœ… πŸ§ͺ jsc-mips-tests

@Constellation Constellation requested a review from a team as a code owner August 23, 2023 21:53
@Constellation Constellation self-assigned this Aug 23, 2023
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Aug 23, 2023
Copy link
Contributor

@justinmichaud justinmichaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@Constellation Constellation force-pushed the eng/JSC-Make-PerfLog-work-on-Darwin branch from 20605fa to 037b758 Compare August 23, 2023 22:24
@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Aug 24, 2023
https://bugs.webkit.org/show_bug.cgi?id=260626
rdar://problem/114345611

Reviewed by Justin Michaud.

This patch makes PerfLog work on Darwin, which generates JITDump[1] on Darwin.
While this is not performance efficient enough, we can later optimize the way to dump this, and try using it for a prototype.

[1]: https://raw.githubusercontent.com/torvalds/linux/master/tools/perf/Documentation/jitdump-specification.txt

* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::finalizeCodeWithDisassemblyImpl):
* Source/JavaScriptCore/assembler/LinkBuffer.h:
* Source/JavaScriptCore/assembler/PerfLog.cpp:
(JSC::PerfLog::singleton):
(JSC::getCurrentThreadID):
* Source/JavaScriptCore/assembler/PerfLog.h:
* Source/JavaScriptCore/jit/ExecutableAllocator.cpp:
(JSC::initializeJITPageReservation):
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::Options::isAvailable):

Canonical link: https://commits.webkit.org/267211@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/JSC-Make-PerfLog-work-on-Darwin branch from 037b758 to 7f950e0 Compare August 24, 2023 00:31
@webkit-commit-queue
Copy link
Collaborator

Committed 267211@main (7f950e0): https://commits.webkit.org/267211@main

Reviewed commits have been landed. Closing PR #16989 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 7f950e0 into WebKit:main Aug 24, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Aug 24, 2023
@Constellation Constellation deleted the eng/JSC-Make-PerfLog-work-on-Darwin branch August 25, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Projects
None yet
4 participants