Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 60eee3f8f2c5bd21389fedb90964c8e78942800e
      
https://github.com/WebKit/WebKit/commit/60eee3f8f2c5bd21389fedb90964c8e78942800e
  Author: Dan Glastonbury <[email protected]>
  Date:   2026-08-23 (Sun, 23 Aug 2026)

  Changed paths:
    M Source/WebKit/Platform/IPC/StreamClientConnection.cpp
    M Source/WebKit/Platform/IPC/StreamClientConnection.h

  Log Message:
  -----------
  Avoid an out-of-line call per stream IPC send to check whether signposts are 
enabled
https://bugs.webkit.org/show_bug.cgi?id=322260
rdar://185491104

Reviewed by Kimmo Kinnunen.

StreamClientConnection::send() called emitSendSignpost() unconditionally on 
every
message, and both it and signpostsEnabled() were defined out-of-line in the .cpp
while send<T>() is a header template. Without LTO, which local Release builds
disable, the compiler could not inline the enabled check, so every send paid a
call just to read a static bool. ENABLE_CORE_IPC_SIGNPOSTS is unconditionally 1
on Cocoa, so release builds paid it too.

Move the fast path inline and guard the emitSendSignpost() call on it, leaving
only the one-time preference read out-of-line in signpostsEnabledSlow().

* Source/WebKit/Platform/IPC/StreamClientConnection.cpp:
(IPC::StreamClientConnection::forceEnableSignposts):
(IPC::StreamClientConnection::signpostsEnabledSlow):
* Source/WebKit/Platform/IPC/StreamClientConnection.h:
(IPC::StreamClientConnection::signpostsEnabled):
(IPC::StreamClientConnection::send):

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



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

Reply via email to