Skip to content

[Cocoa] Remove unneeded WTFLogChannel::subsystem#47429

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
aperezdc:remove-logchannel-subsys-more
Aug 11, 2025
Merged

[Cocoa] Remove unneeded WTFLogChannel::subsystem#47429
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
aperezdc:remove-logchannel-subsys-more

Conversation

@aperezdc
Copy link
Copy Markdown
Contributor

@aperezdc aperezdc commented Jul 1, 2025

7b4b061

[Cocoa] Remove unneeded WTFLogChannel::subsystem
https://bugs.webkit.org/show_bug.cgi?id=295263

Reviewed by Alex Christensen.

The Cocoa ports only use the WTFLogChannel::subsystem struct member
when calling os_log_create(), and as with the other ports, the value
is picked from the LOG_CHANNEL_WEBKIT_SUBSYSTEM macro for every
WTFLogChannel instance. Therefore, it is possible to use the macro
directly in the os_log_create() call.

As the subsystem is always picked from LOG_CHANNEL_WEBKIT_SUBSYSTEM,
this also simplifies the DEFINE_LOG_CHANNEL_[WITH_DETAILS] macros to
remove the parameter and removes the need for DEFINE_*_LOG_CHANNEL
in each component, where it is possible to use DEFINE_LOG_CHANNEL
instead.

This is a follow-up to 296858@main.

* Source/WTF/wtf/Assertions.cpp:
* Source/WTF/wtf/Assertions.h:
* Source/WTF/wtf/Logging.cpp:
* Source/WebCore/PAL/pal/Logging.cpp:
* Source/WebCore/platform/Logging.cpp:
* Source/WebDriver/Logging.cpp:
* Source/WebGPU/WebGPU/Internal/Logging.cpp:
* Source/WebKit/Platform/Logging.cpp:
* Source/WebKitLegacy/mac/Misc/WebKitLogging.m:
* Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp:

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

93cfc3e

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 💥 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp 🛠 jsc-armv7
✅ 🛠 tv-sim 🧪 jsc-armv7-tests
✅ 🛠 watch
✅ 🛠 watch-sim

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jul 1, 2025
@aperezdc aperezdc removed the merging-blocked Applied to prevent a change from being merged label Jul 4, 2025
@aperezdc aperezdc force-pushed the remove-logchannel-subsys-more branch from d32f1b3 to 1cf1cd0 Compare July 4, 2025 20:25
@aperezdc aperezdc requested a review from rkirsling July 4, 2025 20:28
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jul 4, 2025
@annevk
Copy link
Copy Markdown
Contributor

annevk commented Jul 15, 2025

Someone else should probably review, but I noticed a typo in the commit message: "the value is the picked from the LOG_CHANNEL_WEBKIT_SUBSYSTEM macro" should presumably read "the value is picked from ..."

@aperezdc aperezdc removed the merging-blocked Applied to prevent a change from being merged label Aug 11, 2025
@aperezdc aperezdc force-pushed the remove-logchannel-subsys-more branch from 1cf1cd0 to 93cfc3e Compare August 11, 2025 08:19
@aperezdc
Copy link
Copy Markdown
Contributor Author

Someone else should probably review, but I noticed a typo in the commit message: "the value is the picked from the LOG_CHANNEL_WEBKIT_SUBSYSTEM macro" should presumably read "the value is picked from ..."

Indeed, thanks. I have now updated the patch with the typo fixed in the commit log.

@aperezdc aperezdc added the merge-queue Applied to send a pull request to merge-queue label Aug 11, 2025
https://bugs.webkit.org/show_bug.cgi?id=295263

Reviewed by Alex Christensen.

The Cocoa ports only use the WTFLogChannel::subsystem struct member
when calling os_log_create(), and as with the other ports, the value
is picked from the LOG_CHANNEL_WEBKIT_SUBSYSTEM macro for every
WTFLogChannel instance. Therefore, it is possible to use the macro
directly in the os_log_create() call.

As the subsystem is always picked from LOG_CHANNEL_WEBKIT_SUBSYSTEM,
this also simplifies the DEFINE_LOG_CHANNEL_[WITH_DETAILS] macros to
remove the parameter and removes the need for DEFINE_*_LOG_CHANNEL
in each component, where it is possible to use DEFINE_LOG_CHANNEL
instead.

This is a follow-up to 296858@main.

* Source/WTF/wtf/Assertions.cpp:
* Source/WTF/wtf/Assertions.h:
* Source/WTF/wtf/Logging.cpp:
* Source/WebCore/PAL/pal/Logging.cpp:
* Source/WebCore/platform/Logging.cpp:
* Source/WebDriver/Logging.cpp:
* Source/WebGPU/WebGPU/Internal/Logging.cpp:
* Source/WebKit/Platform/Logging.cpp:
* Source/WebKitLegacy/mac/Misc/WebKitLogging.m:
* Tools/TestWebKitAPI/Tests/WebCore/Logging.cpp:

Canonical link: https://commits.webkit.org/298529@main
@webkit-commit-queue webkit-commit-queue force-pushed the remove-logchannel-subsys-more branch from 93cfc3e to 7b4b061 Compare August 11, 2025 21:27
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 298529@main (7b4b061): https://commits.webkit.org/298529@main

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

@webkit-commit-queue webkit-commit-queue merged commit 7b4b061 into WebKit:main Aug 11, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 11, 2025
@aperezdc aperezdc deleted the remove-logchannel-subsys-more branch August 15, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants