⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 280795 in webkit


Ignore:
Timestamp:
Aug 9, 2021, 2:14:53 PM (5 years ago)
Author:
mmaxfield@apple.com
Message:

Support WTF logging channels
https://bugs.webkit.org/show_bug.cgi?id=228768

Source/WebKit:

Reviewed by Fujii Hironori.

No new tests because there is no behavior change.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):

  • GPUProcess/GPUProcessCreationParameters.cpp:

(WebKit::GPUProcessCreationParameters::encode const):
(WebKit::GPUProcessCreationParameters::decode):

  • GPUProcess/GPUProcessCreationParameters.h:
  • Shared/AuxiliaryProcess.cpp:

(WebKit::AuxiliaryProcess::initialize):

  • Shared/WebKit2Initialize.cpp:

(WebKit::InitializeWebKit2):

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/GPUProcessProxyCocoa.mm:

(WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters):

  • UIProcess/WebProcessPool.cpp:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

Source/WebKitLegacy/mac:

Reviewed by Fujii Hironori.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WTF:

This patch builds on top of https://bugs.webkit.org/show_bug.cgi?id=228809, which added shared infrastructure
for logging. This patch simply triggers that shared infrastructure for WTF. There is no change in behavior -
the existing WTF logging channels currently are all implemented independently in custom ways, so this patch
just migrates them over to use the shared infrastructure.

Reviewed by Fujii Hironori.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Assertions.h:
  • wtf/CMakeLists.txt:
  • wtf/LogInitialization.cpp: Added.

(WTF::logChannels):

  • wtf/LogInitialization.h: Added.
  • wtf/Logging.cpp: Added.
  • wtf/Logging.h: Added.
  • wtf/MemoryPressureHandler.cpp:

(WTF::MemoryPressureHandler::singleton):

  • wtf/MemoryPressureHandler.h:
  • wtf/PlatformFTW.cmake:
  • wtf/PlatformGTK.cmake:
  • wtf/PlatformJSCOnly.cmake:
  • wtf/PlatformMac.cmake:
  • wtf/PlatformPlayStation.cmake:
  • wtf/PlatformWPE.cmake:
  • wtf/PlatformWin.cmake:
  • wtf/RefCountedLeakCounter.cpp:
  • wtf/cocoa/LoggingCocoa.mm: Copied from Source/WebKit/UIProcess/Cocoa/GPUProcessProxyCocoa.mm.

(WTF::logLevelString):

  • wtf/cocoa/MachSendRight.cpp:
  • wtf/cocoa/MainThreadCocoa.mm:
  • wtf/cocoa/MemoryPressureHandlerCocoa.mm:
  • wtf/unix/LoggingUnix.cpp: Added.

(WTF::logLevelString):

  • wtf/win/LoggingWin.cpp: Added.

(WTF::logLevelString):

Location:
trunk/Source
Files:
6 added
32 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r280758 r280795  
     12021-08-09  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Support WTF logging channels
     4        https://bugs.webkit.org/show_bug.cgi?id=228768
     5
     6        This patch builds on top of https://bugs.webkit.org/show_bug.cgi?id=228809, which added shared infrastructure
     7        for logging. This patch simply triggers that shared infrastructure for WTF. There is no change in behavior -
     8        the existing WTF logging channels currently are all implemented independently in custom ways, so this patch
     9        just migrates them over to use the shared infrastructure.
     10
     11        Reviewed by Fujii Hironori.
     12
     13        * WTF.xcodeproj/project.pbxproj:
     14        * wtf/Assertions.h:
     15        * wtf/CMakeLists.txt:
     16        * wtf/LogInitialization.cpp: Added.
     17        (WTF::logChannels):
     18        * wtf/LogInitialization.h: Added.
     19        * wtf/Logging.cpp: Added.
     20        * wtf/Logging.h: Added.
     21        * wtf/MemoryPressureHandler.cpp:
     22        (WTF::MemoryPressureHandler::singleton):
     23        * wtf/MemoryPressureHandler.h:
     24        * wtf/PlatformFTW.cmake:
     25        * wtf/PlatformGTK.cmake:
     26        * wtf/PlatformJSCOnly.cmake:
     27        * wtf/PlatformMac.cmake:
     28        * wtf/PlatformPlayStation.cmake:
     29        * wtf/PlatformWPE.cmake:
     30        * wtf/PlatformWin.cmake:
     31        * wtf/RefCountedLeakCounter.cpp:
     32        * wtf/cocoa/LoggingCocoa.mm: Copied from Source/WebKit/UIProcess/Cocoa/GPUProcessProxyCocoa.mm.
     33        (WTF::logLevelString):
     34        * wtf/cocoa/MachSendRight.cpp:
     35        * wtf/cocoa/MainThreadCocoa.mm:
     36        * wtf/cocoa/MemoryPressureHandlerCocoa.mm:
     37        * wtf/unix/LoggingUnix.cpp: Added.
     38        (WTF::logLevelString):
     39        * wtf/win/LoggingWin.cpp: Added.
     40        (WTF::logLevelString):
     41
    1422021-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
    243
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r280758 r280795  
    6161                1C181C961D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C181C951D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp */; };
    6262                1C503BE623AAE0AE0072E66B /* LanguageCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C503BE523AAE0AE0072E66B /* LanguageCocoa.mm */; };
     63                1C96836426BE74DF00A2A2F9 /* LogInitialization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C96836226BE74DF00A2A2F9 /* LogInitialization.cpp */; };
     64                1C96836726BE754600A2A2F9 /* Logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C96836526BE754600A2A2F9 /* Logging.cpp */; };
     65                1C96836926BE76B600A2A2F9 /* LoggingCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C96836826BE76B600A2A2F9 /* LoggingCocoa.mm */; };
    6366                1CA85CA9241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */; };
    6467                1CF18F3B26BB579E004B1722 /* LogChannels.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CF18F3926BB579E004B1722 /* LogChannels.cpp */; };
     
    348351                1C503BE423AADEEA0072E66B /* NSLocaleSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSLocaleSPI.h; sourceTree = "<group>"; };
    349352                1C503BE523AAE0AE0072E66B /* LanguageCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LanguageCocoa.mm; sourceTree = "<group>"; };
     353                1C96836226BE74DF00A2A2F9 /* LogInitialization.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LogInitialization.cpp; sourceTree = "<group>"; };
     354                1C96836326BE74DF00A2A2F9 /* LogInitialization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LogInitialization.h; sourceTree = "<group>"; };
     355                1C96836526BE754600A2A2F9 /* Logging.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Logging.cpp; sourceTree = "<group>"; };
     356                1C96836626BE754600A2A2F9 /* Logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Logging.h; sourceTree = "<group>"; };
     357                1C96836826BE76B600A2A2F9 /* LoggingCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LoggingCocoa.mm; sourceTree = "<group>"; };
    350358                1CA85CA7241B0B110071C2F5 /* RuntimeApplicationChecksCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RuntimeApplicationChecksCocoa.h; sourceTree = "<group>"; };
    351359                1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeApplicationChecksCocoa.cpp; sourceTree = "<group>"; };
     
    11311139                                077CD86A1FD9CFD200828587 /* Logger.h */,
    11321140                                077CD86B1FD9CFD300828587 /* LoggerHelper.h */,
     1141                                1C96836526BE754600A2A2F9 /* Logging.cpp */,
     1142                                1C96836626BE754600A2A2F9 /* Logging.h */,
    11331143                                513E170A1CD7D5BF00E3650B /* LoggingAccumulator.h */,
    11341144                                0F30BA8C1E78708E002CA847 /* LoggingHashID.h */,
     
    11361146                                0F30BA8E1E78708E002CA847 /* LoggingHashSet.h */,
    11371147                                0F30BA8F1E78708E002CA847 /* LoggingHashTraits.h */,
     1148                                1C96836226BE74DF00A2A2F9 /* LogInitialization.cpp */,
     1149                                1C96836326BE74DF00A2A2F9 /* LogInitialization.h */,
    11381150                                7A6EBA3220746C33004F9C44 /* MachSendRight.h */,
    11391151                                A8A472C6151A825A004123FF /* MainThread.cpp */,
     
    15861598                                A331D95E21F249F6009F02AA /* FileSystemCocoa.mm */,
    15871599                                1C503BE523AAE0AE0072E66B /* LanguageCocoa.mm */,
     1600                                1C96836826BE76B600A2A2F9 /* LoggingCocoa.mm */,
    15881601                                7A6EBA3320746C34004F9C44 /* MachSendRight.cpp */,
    15891602                                A8A472C5151A825A004123FF /* MainThreadCocoa.mm */,
     
    17461759                                1CF18F3B26BB579E004B1722 /* LogChannels.cpp in Sources */,
    17471760                                93B5B45122171EEA004B7AA7 /* Logger.cpp in Sources */,
     1761                                1C96836726BE754600A2A2F9 /* Logging.cpp in Sources */,
     1762                                1C96836926BE76B600A2A2F9 /* LoggingCocoa.mm in Sources */,
     1763                                1C96836426BE74DF00A2A2F9 /* LogInitialization.cpp in Sources */,
    17481764                                53534F2A1EC0E10E00141B2F /* MachExceptions.defs in Sources */,
    17491765                                7A6EBA3420746C34004F9C44 /* MachSendRight.cpp in Sources */,
  • trunk/Source/WTF/wtf/Assertions.h

    r278474 r280795  
    188188#if !defined(DEFINE_LOG_CHANNEL)
    189189#if RELEASE_LOG_DISABLED
    190 #define DEFINE_LOG_CHANNEL(name, subsystem) \
    191     WTFLogChannel LOG_CHANNEL(name) = { (WTFLogChannelState)0, #name, (WTFLogLevel)1 };
     190#define DEFINE_LOG_CHANNEL_WITH_DETAILS(name, initialState, level, subsystem) \
     191    WTFLogChannel LOG_CHANNEL(name) = { initialState, #name, level };
    192192#endif
    193193#if USE(OS_LOG) && !RELEASE_LOG_DISABLED
    194 #define DEFINE_LOG_CHANNEL(name, subsystem) \
    195     WTFLogChannel LOG_CHANNEL(name) = { (WTFLogChannelState)0, #name, (WTFLogLevel)1, subsystem, OS_LOG_DEFAULT };
     194#define DEFINE_LOG_CHANNEL_WITH_DETAILS(name, initialState, level, subsystem) \
     195    WTFLogChannel LOG_CHANNEL(name) = { initialState, #name, level, subsystem, OS_LOG_DEFAULT };
    196196#endif
    197197#if USE(JOURNALD) && !RELEASE_LOG_DISABLED
    198 #define DEFINE_LOG_CHANNEL(name, subsystem)                             \
    199     WTFLogChannel LOG_CHANNEL(name) = { (WTFLogChannelState)0, #name, (WTFLogLevel)1, subsystem };
    200 #endif
    201 #endif
     198#define DEFINE_LOG_CHANNEL_WITH_DETAILS(name, initialState, level, subsystem) \
     199    WTFLogChannel LOG_CHANNEL(name) = { initialState, #name, level, subsystem };
     200#endif
     201#endif
     202
     203// This file is included from C (not C++) files, so we can't say things like WTFLogChannelState::Off.
     204static const WTFLogChannelState logChannelStateOff = (WTFLogChannelState)0;
     205static const WTFLogChannelState logChannelStateOn = (WTFLogChannelState)1;
     206static const WTFLogLevel logLevelError = (WTFLogLevel)1;
     207#define DEFINE_LOG_CHANNEL(name, subsystem) DEFINE_LOG_CHANNEL_WITH_DETAILS(name, logChannelStateOff, logLevelError, subsystem);
    202208
    203209WTF_EXPORT_PRIVATE void WTFReportNotImplementedYet(const char* file, int line, const char* function);
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r280758 r280795  
    125125    LocklessBag.h
    126126    LogChannels.h
     127    LogInitialization.h
    127128    Logger.h
    128129    LoggerHelper.h
     130    Logging.h
    129131    LoggingAccumulator.h
    130132    LoggingHashID.h
     
    425427    LockedPrintStream.cpp
    426428    LogChannels.cpp
     429    LogInitialization.cpp
    427430    Logger.cpp
     431    Logging.cpp
    428432    MainThread.cpp
    429433    MediaTime.cpp
  • trunk/Source/WTF/wtf/MemoryPressureHandler.cpp

    r280155 r280795  
    2727#include <wtf/MemoryPressureHandler.h>
    2828
     29#include <wtf/Logging.h>
    2930#include <wtf/MemoryFootprint.h>
    3031#include <wtf/NeverDestroyed.h>
    3132#include <wtf/RAMSize.h>
    3233
    33 #define LOG_CHANNEL_PREFIX Log
    34 
    3534namespace WTF {
    36 
    37 DEFINE_LOG_CHANNEL(MemoryPressure, LOG_CHANNEL_WEBKIT_SUBSYSTEM);
    3835
    3936WTF_EXPORT_PRIVATE bool MemoryPressureHandler::ReliefLogger::s_loggingEnabled = false;
     
    5451    static std::once_flag onceKey;
    5552    std::call_once(onceKey, [&] {
    56         WTFLogChannel* channels[] = { &LogMemoryPressure };
    57         WTFInitializeLogChannelStatesFromString(channels, 1, "");
    58 
    5953        memoryPressureHandler.construct();
    6054    });
  • trunk/Source/WTF/wtf/MemoryPressureHandler.h

    r280155 r280795  
    273273};
    274274
    275 extern WTFLogChannel LogMemoryPressure;
    276 
    277275} // namespace WTF
    278276
  • trunk/Source/WTF/wtf/PlatformFTW.cmake

    r279339 r280795  
    2525    win/FileSystemWin.cpp
    2626    win/LanguageWin.cpp
     27    win/LoggingWin.cpp
    2728    win/MainThreadWin.cpp
    2829    win/MemoryFootprintWin.cpp
  • trunk/Source/WTF/wtf/PlatformGTK.cmake

    r279007 r280795  
    4545
    4646    unix/LanguageUnix.cpp
     47    unix/LoggingUnix.cpp
    4748    unix/UniStdExtrasUnix.cpp
    4849)
  • trunk/Source/WTF/wtf/PlatformJSCOnly.cmake

    r279007 r280795  
    1212        win/FileSystemWin.cpp
    1313        win/LanguageWin.cpp
     14        win/LoggingWin.cpp
    1415        win/MainThreadWin.cpp
    1516        win/OSAllocatorWin.cpp
     
    3839
    3940        unix/LanguageUnix.cpp
     41        unix/LoggingUnix.cpp
    4042    )
    4143    if (WTF_OS_FUCHSIA)
  • trunk/Source/WTF/wtf/PlatformMac.cmake

    r279339 r280795  
    6565    cocoa/FileSystemCocoa.mm
    6666    cocoa/LanguageCocoa.mm
     67    cocoa/LoggingCocoa.mm
    6768    cocoa/MachSendRight.cpp
    6869    cocoa/MainThreadCocoa.mm
  • trunk/Source/WTF/wtf/PlatformPlayStation.cmake

    r279007 r280795  
    1616    text/unix/TextBreakIteratorInternalICUUnix.cpp
    1717
     18    unix/LoggingUnix.cpp
    1819    unix/MemoryPressureHandlerUnix.cpp
    1920)
  • trunk/Source/WTF/wtf/PlatformWPE.cmake

    r279007 r280795  
    3838
    3939    unix/LanguageUnix.cpp
     40    unix/LoggingUnix.cpp
    4041    unix/MemoryPressureHandlerUnix.cpp
    4142    unix/UniStdExtrasUnix.cpp
  • trunk/Source/WTF/wtf/PlatformWin.cmake

    r279339 r280795  
    1818    win/FileSystemWin.cpp
    1919    win/LanguageWin.cpp
     20    win/LoggingWin.cpp
    2021    win/MainThreadWin.cpp
    2122    win/MemoryFootprintWin.cpp
  • trunk/Source/WTF/wtf/RefCountedLeakCounter.cpp

    r261661 r280795  
    2222#include <wtf/RefCountedLeakCounter.h>
    2323
     24#include <wtf/Logging.h>
     25
    2426#ifdef NDEBUG
    2527namespace WTF {
     
    3941
    4042namespace WTF {
    41 
    42 #define LOG_CHANNEL_PREFIX Log
    43 #if RELEASE_LOG_DISABLED
    44 static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelState::On, "RefCountedLeaks", WTFLogLevel::Error };
    45 #endif
    46 #if USE(OS_LOG) && !RELEASE_LOG_DISABLED
    47 static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelState::On, "RefCountedLeaks", WTFLogLevel::Error, LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT };
    48 #endif
    49 #if USE(JOURNALD) && !RELEASE_LOG_DISABLED
    50 static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelState::On, "RefCountedLeaks", WTFLogLevel::Error, LOG_CHANNEL_WEBKIT_SUBSYSTEM };
    51 #endif
    5243
    5344typedef HashCountedSet<const char*, PtrHash<const char*>> ReasonSet;
  • trunk/Source/WTF/wtf/cocoa/LoggingCocoa.mm

    r280794 r280795  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUProcessProxy.h"
     26#import "config.h"
     27#import <wtf/LogInitialization.h>
    2828
    29 #if ENABLE(GPU_PROCESS)
     29#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
    3030
    31 #include "GPUProcessCreationParameters.h"
     31namespace WTF {
    3232
    33 namespace WebKit {
    34 
    35 void GPUProcessProxy::platformInitializeGPUProcessParameters(GPUProcessCreationParameters& parameters)
     33String logLevelString()
    3634{
    37 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
    38     parameters.webCoreLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebCoreLogging"];
    39     parameters.webKitLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebKit2Logging"];
     35#if !LOG_DISABLED
     36    return [[NSUserDefaults standardUserDefaults] stringForKey:@"WTFLogging"];
     37#else
     38    return String();
    4039#endif
    4140}
    4241
    43 }
     42} // namespace WebKit
    4443
    4544#endif
  • trunk/Source/WTF/wtf/cocoa/MachSendRight.cpp

    r273288 r280795  
    3131#include <utility>
    3232
    33 #define LOG_CHANNEL_PREFIX Log
     33#include <wtf/Logging.h>
    3434
    3535namespace WTF {
    36 
    37 #if RELEASE_LOG_DISABLED
    38 WTFLogChannel LogProcess = { WTFLogChannelState::On, "Process", WTFLogLevel::Error };
    39 #else
    40 WTFLogChannel LogProcess = { WTFLogChannelState::On, "Process", WTFLogLevel::Error, LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT };
    41 #endif
    4236
    4337static void retainSendRight(mach_port_t port)
  • trunk/Source/WTF/wtf/cocoa/MainThreadCocoa.mm

    r276880 r280795  
    3636#import <wtf/Assertions.h>
    3737#import <wtf/BlockPtr.h>
     38#import <wtf/Logging.h>
    3839#import <wtf/RetainPtr.h>
    3940#import <wtf/RunLoop.h>
     
    4546#endif
    4647
    47 #define LOG_CHANNEL_PREFIX Log
    48 
    4948namespace WTF {
    50 
    51 #if RELEASE_LOG_DISABLED
    52 WTFLogChannel LogThreading = { WTFLogChannelState::On, "Threading", WTFLogLevel::Error };
    53 #else
    54 WTFLogChannel LogThreading = { WTFLogChannelState::On, "Threading", WTFLogLevel::Error, LOG_CHANNEL_WEBKIT_SUBSYSTEM, OS_LOG_DEFAULT };
    55 #endif
    5649
    5750#if USE(WEB_THREAD)
  • trunk/Source/WTF/wtf/cocoa/MemoryPressureHandlerCocoa.mm

    r278253 r280795  
    3131#import <malloc/malloc.h>
    3232#import <notify.h>
     33#import <wtf/Logging.h>
    3334#import <wtf/ResourceUsage.h>
    3435#import <wtf/spi/darwin/DispatchSPI.h>
     
    3738
    3839extern "C" void cache_simulate_memory_warning_event(uint64_t);
    39 
    40 #define LOG_CHANNEL_PREFIX Log
    4140
    4241namespace WTF {
  • trunk/Source/WebKit/ChangeLog

    r280789 r280795  
     12021-08-09  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Support WTF logging channels
     4        https://bugs.webkit.org/show_bug.cgi?id=228768
     5
     6        Reviewed by Fujii Hironori.
     7
     8        No new tests because there is no behavior change.
     9
     10        * GPUProcess/GPUProcess.cpp:
     11        (WebKit::GPUProcess::initializeGPUProcess):
     12        * GPUProcess/GPUProcessCreationParameters.cpp:
     13        (WebKit::GPUProcessCreationParameters::encode const):
     14        (WebKit::GPUProcessCreationParameters::decode):
     15        * GPUProcess/GPUProcessCreationParameters.h:
     16        * Shared/AuxiliaryProcess.cpp:
     17        (WebKit::AuxiliaryProcess::initialize):
     18        * Shared/WebKit2Initialize.cpp:
     19        (WebKit::InitializeWebKit2):
     20        * Shared/WebProcessCreationParameters.cpp:
     21        (WebKit::WebProcessCreationParameters::encode const):
     22        (WebKit::WebProcessCreationParameters::decode):
     23        * Shared/WebProcessCreationParameters.h:
     24        * UIProcess/Cocoa/GPUProcessProxyCocoa.mm:
     25        (WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters):
     26        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
     27        (WebKit::WebProcessPool::platformInitializeWebProcess):
     28        * UIProcess/GPU/GPUProcessProxy.cpp:
     29        (WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters):
     30        * UIProcess/WebProcessPool.cpp:
     31        * WebProcess/cocoa/WebProcessCocoa.mm:
     32        (WebKit::WebProcess::platformInitializeWebProcess):
     33
    1342021-08-09  Said Abou-Hallawa  <said@apple.com>
    235
  • trunk/Source/WebKit/GPUProcess/GPUProcess.cpp

    r280758 r280795  
    5050#include <wtf/Algorithms.h>
    5151#include <wtf/CallbackAggregator.h>
     52#include <wtf/LogInitialization.h>
    5253#include <wtf/MemoryPressureHandler.h>
    5354#include <wtf/OptionSet.h>
     
    244245
    245246#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     247    WTF::logChannels().initializeLogChannelsIfNecessary(parameters.wtfLoggingChannels);
    246248    WebCore::logChannels().initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels);
    247249    WebKit::logChannels().initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels);
  • trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp

    r278253 r280795  
    6060#endif
    6161
     62    encoder << wtfLoggingChannels;
    6263    encoder << webCoreLoggingChannels;
    6364    encoder << webKitLoggingChannels;
     
    110111#endif
    111112
     113    if (!decoder.decode(result.wtfLoggingChannels))
     114        return false;
    112115    if (!decoder.decode(result.webCoreLoggingChannels))
    113116        return false;
  • trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.h

    r278007 r280795  
    5858#endif
    5959
     60    String wtfLoggingChannels;
    6061    String webCoreLoggingChannels;
    6162    String webKitLoggingChannels;
  • trunk/Source/WebKit/Shared/AuxiliaryProcess.cpp

    r280758 r280795  
    3434#include <WebCore/LogInitialization.h>
    3535#include <pal/SessionID.h>
     36#include <wtf/LogInitialization.h>
    3637
    3738#if !OS(WINDOWS)
     
    8384
    8485#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     86    WTF::logChannels().initializeLogChannelsIfNecessary();
    8587    WebCore::logChannels().initializeLogChannelsIfNecessary();
    8688    WebKit::logChannels().initializeLogChannelsIfNecessary();
  • trunk/Source/WebKit/Shared/WebKit2Initialize.cpp

    r280758 r280795  
    3131#include <WebCore/LogInitialization.h>
    3232#include <WebCore/WebCoreJITOperations.h>
     33#include <wtf/LogInitialization.h>
    3334#include <wtf/MainThread.h>
    3435#include <wtf/RefCounted.h>
     
    4849
    4950#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     51    WTF::logChannels().initializeLogChannelsIfNecessary();
    5052    WebCore::logChannels().initializeLogChannelsIfNecessary();
    5153    WebKit::logChannels().initializeLogChannelsIfNecessary();
  • trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp

    r280789 r280795  
    6060    encoder << enableRemoteWebInspectorExtensionHandle;
    6161#endif
     62    encoder << wtfLoggingChannels;
    6263    encoder << webCoreLoggingChannels;
    6364    encoder << webKitLoggingChannels;
     
    263264#endif
    264265
     266    if (!decoder.decode(parameters.wtfLoggingChannels))
     267        return false;
    265268    if (!decoder.decode(parameters.webCoreLoggingChannels))
    266269        return false;
  • trunk/Source/WebKit/Shared/WebProcessCreationParameters.h

    r280789 r280795  
    9595#endif
    9696
     97    String wtfLoggingChannels;
    9798    String webCoreLoggingChannels;
    9899    String webKitLoggingChannels;
  • trunk/Source/WebKit/UIProcess/Cocoa/GPUProcessProxyCocoa.mm

    r279796 r280795  
    3636{
    3737#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     38    parameters.wtfLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WTFLogging"];
    3839    parameters.webCoreLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebCoreLogging"];
    3940    parameters.webKitLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebKit2Logging"];
  • trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm

    r280789 r280795  
    389389
    390390#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     391    parameters.wtfLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WTFLogging"];
    391392    parameters.webCoreLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebCoreLogging"];
    392393    parameters.webKitLoggingChannels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebKit2Logging"];
  • trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp

    r280699 r280795  
    5050#include <WebCore/RuntimeApplicationChecks.h>
    5151#include <wtf/CompletionHandler.h>
     52#include <wtf/LogInitialization.h>
    5253#include <wtf/TranslatedProcess.h>
    5354
     
    608609{
    609610#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     611    parameters.wtfLoggingChannels = WTF::logLevelString();
    610612    parameters.webCoreLoggingChannels = WebCore::logLevelString();
    611613    parameters.webKitLoggingChannels = WebKit::logLevelString();
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r280758 r280795  
    9797#include <pal/SessionID.h>
    9898#include <wtf/CallbackAggregator.h>
     99#include <wtf/LogInitialization.h>
    99100#include <wtf/MainThread.h>
    100101#include <wtf/NeverDestroyed.h>
     
    252253
    253254#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     255    WTF::logChannels().initializeLogChannelsIfNecessary();
    254256    WebCore::logChannels().initializeLogChannelsIfNecessary();
    255257    WebKit::logChannels().initializeLogChannelsIfNecessary();
  • trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

    r280789 r280795  
    101101#import <wtf/FileSystem.h>
    102102#import <wtf/Language.h>
     103#import <wtf/LogInitialization.h>
    103104#import <wtf/ProcessPrivilege.h>
    104105#import <wtf/SoftLinking.h>
     
    280281
    281282#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     283    WTF::logChannels().initializeLogChannelsIfNecessary(parameters.wtfLoggingChannels);
    282284    WebCore::logChannels().initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels);
    283285    WebKit::logChannels().initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels);
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r280758 r280795  
     12021-08-09  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Support WTF logging channels
     4        https://bugs.webkit.org/show_bug.cgi?id=228768
     5
     6        Reviewed by Fujii Hironori.
     7
     8        * WebView/WebView.mm:
     9        (-[WebView _commonInitializationWithFrameName:groupName:]):
     10
    1112021-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
    212
  • trunk/Source/WebKitLegacy/mac/WebView/WebView.mm

    r280758 r280795  
    253253#import <wtf/HashTraits.h>
    254254#import <wtf/Language.h>
     255#import <wtf/LogInitialization.h>
    255256#import <wtf/MainThread.h>
    256257#import <wtf/MathExtras.h>
     
    14821483    if (!didOneTimeInitialization) {
    14831484#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     1485        WTF::logChannels().initializeLogChannelsIfNecessary();
    14841486        WebCore::logChannels().initializeLogChannelsIfNecessary();
    14851487        WebKit::logChannels().initializeLogChannelsIfNecessary();
Note: See TracChangeset for help on using the changeset viewer.