haikuwebkit/Source/WTF/wtf/LogInitialization.h

41 lines
1.6 KiB
C
Raw Permalink Normal View History

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): Canonical link: https://commits.webkit.org/240373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-09 21:14:53 +00:00
/*
* Copyright (C) 2021 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include <wtf/LogChannels.h>
#include <wtf/text/WTFString.h>
namespace WTF {
#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
WTF_EXPORT_PRIVATE LogChannels& logChannels();
WTF_EXPORT_PRIVATE String logLevelString();
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): Canonical link: https://commits.webkit.org/240373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-09 21:14:53 +00:00
#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
} // namespace WTF