Title: [292345] branches/safari-613-branch
Revision
292345
Author
[email protected]
Date
2022-04-04 14:56:30 -0700 (Mon, 04 Apr 2022)

Log Message

Cherry-pick r291889. rdar://91259284

    Enable PGO when building for release and production
    https://bugs.webkit.org/show_bug.cgi?id=238119
    rdar://90182309

    Reviewed by Alexey Proskuryakov and Geoff Garen.

    Source/_javascript_Core:

    See WebCore/ChangeLog for more information.

    Configurations/Base.xcconfig:
    Configurations/_javascript_Core.xcconfig:
    _javascript_Core.xcodeproj/project.pbxproj:
    Source/WebCore:

    Attempt to re-land support for compiling against profiling data, after it was reverted due to the profiling data
    files being too large. We mitigate this by instead storing sparse profdata files as compressed files in
    WebKitAdditions through git lfs, such that they don't cause the repo to grow significantly each time we update
    profiling data.

    At build time, we then introduce new build phase scripts to the _javascript_Core, WebCore and WebKit builds to
    decompress their respective .profdata.compressed files into .profdata files in the build, using
    compression_tool. We compile against these profdata files when building for release and production
    configurations, via the -fprofile-instr-use flag.

    In the case where the *.profdata.compressed files are non-existent or haven't been downloaded yet, we instead
    fall back to using an empty profiling data file, but only on non-production builds; this allows us to continue
    passing in the -fprofile-instr-use flag, without running into build failures.

    Note that we intentionally require production builds to use the (real) profiling data, and explicitly fail the
    build with a specific error message in the case where the profiles are missing.

    Additionally, note that in order to check for and deal with the case where the *.profdata.compressed files are
    only undownloaded git-lfs stubs, we not only check whether or not the profdata.compressed file exists, but
    also whether or not the file size is at least an arbitrary cutoff of 4 KB (which should already be an order of
    magnitude larger than the git-lfs stub). While mostly arbitrary, I chose this cutoff due to the fact that it's
    very close to the size of the Empty.profdata placeholder file in Tools; in practice, we should expect the
    profiles for WebKit, WebCore and _javascript_Core to be much, much larger than this empty file.

    Configurations/Base.xcconfig:
    Configurations/WebCore.xcconfig:
    WebCore.xcodeproj/project.pbxproj:
    Source/WebKit:

    See WebCore/ChangeLog for more information.

    Configurations/Base.xcconfig:
    Configurations/BaseTarget.xcconfig:
    WebKit.xcodeproj/project.pbxproj:
    Tools:

    Add an empty profiling data file that can be used as a fallback only for release (non-production) builds, when
    the _javascript_Core, WebCore or WebKit profiling data hasn't been locally downloaded.

    Profiling/Empty.profdata: Added.

Modified Paths

Added Paths

Diff

Modified: branches/safari-613-branch/Source/_javascript_Core/Configurations/Base.xcconfig (292344 => 292345)


--- branches/safari-613-branch/Source/_javascript_Core/Configurations/Base.xcconfig	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/_javascript_Core/Configurations/Base.xcconfig	2022-04-04 21:56:30 UTC (rev 292345)
@@ -98,7 +98,7 @@
 GCC_WARN_UNUSED_VARIABLE = YES;
 CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled;
 
 HEADER_SEARCH_PATHS = . "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
 

Modified: branches/safari-613-branch/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig (292344 => 292345)


--- branches/safari-613-branch/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig	2022-04-04 21:56:30 UTC (rev 292345)
@@ -37,10 +37,19 @@
 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/_javascript_Core.order;
 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,_javascript_Core.order;
 
+PROFILE_DATA_FLAGS = $(PROFILE_DATA_FLAGS_$(CONFIGURATION)_$(WK_PLATFORM_NAME));
+PROFILE_DATA_FLAGS_Release_macosx = $(PROFILE_DATA_FLAGS_Release_macosx$(WK_MACOS_1200));
+PROFILE_DATA_FLAGS_Release_macosx_MACOS_SINCE_1200 = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Release_iphoneos = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Production_macosx = $(PROFILE_DATA_FLAGS_Production_macosx$(WK_MACOS_1200));
+PROFILE_DATA_FLAGS_Production_macosx_MACOS_SINCE_1200 = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Production_iphoneos = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_ENABLED = -fprofile-instr-use=$(BUILT_PRODUCTS_DIR)/DerivedSources/_javascript_Core/_javascript_Core.profdata;
+
 GCC_PREFIX_HEADER = _javascript_CorePrefix.h;
 GCC_SYMBOLS_PRIVATE_EXTERN = YES;
-OTHER_CFLAGS = $(inherited) -fno-slp-vectorize --system-header-prefix=unicode/;
-OTHER_CPLUSPLUSFLAGS = $(inherited) -fno-slp-vectorize --system-header-prefix=unicode/;
+OTHER_CFLAGS = $(inherited) -fno-slp-vectorize --system-header-prefix=unicode/ $(PROFILE_DATA_FLAGS);
+OTHER_CPLUSPLUSFLAGS = $(inherited) -fno-slp-vectorize --system-header-prefix=unicode/ $(PROFILE_DATA_FLAGS);
 HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core" $(HEADER_SEARCH_PATHS);
 INFOPLIST_FILE = Info.plist;
 INSTALL_PATH = $(_javascript_CORE_FRAMEWORKS_DIR);

Modified: branches/safari-613-branch/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (292344 => 292345)


--- branches/safari-613-branch/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2022-04-04 21:56:30 UTC (rev 292345)
@@ -11474,6 +11474,7 @@
 			buildPhases = (
 				5D2F7CF90C6875BB00B5B72B /* Update Info.plist with version information */,
 				A53F1ABF18C90F8B0072EB6D /* Resources */,
+				F4CDF3C927E9147500191928 /* Copy Profiling Data */,
 				932F5B3F0822A1C700736975 /* Headers */,
 				3732811A17FCD235004AD519 /* Postprocess Headers */,
 				932F5B910822A1C700736975 /* Sources */,
@@ -11987,6 +11988,28 @@
 			shellPath = /bin/sh;
 			shellScript = "Scripts/process-entitlements.sh\n";
 		};
+		F4CDF3C927E9147500191928 /* Copy Profiling Data */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 12;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"$(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions/Profiling/_javascript_Core.profdata.compressed",
+				"$(SRCROOT)/../../Tools/Profiling/Empty.profdata",
+				"$(SDK_DIR)/usr/local/include/WebKitAdditions/Profiling/_javascript_Core.profdata.compressed",
+			);
+			name = "Copy Profiling Data";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+				"$(BUILT_PRODUCTS_DIR)/DerivedSources/_javascript_Core/_javascript_Core.profdata",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n    exit 0;\nfi\n\nif [ -z \"${PROFILE_DATA_FLAGS}\" ]; then\n    exit 0;\nfi\n\nRELATIVE_PROFILE_DATA_PATH=\"usr/local/include/WebKitAdditions/Profiling/_javascript_Core.profdata.compressed\";\nABSOLUTE_PROFILE_DATA_PATH=\"${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\n\nif [ ! -f \"${ABSOLUTE_PROFILE_DATA_PATH}\" ]; then\n    ABSOLUTE_PROFILE_DATA_PATH=\"${SDK_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\nfi\n\nif [ ! -f \"${ABSOLUTE_PROFILE_DATA_PATH}\" ] || [ $(wc -c <${ABSOLUTE_PROFILE_DATA_PATH}) -lt 4096 ]; then\n    if [ \"${CONFIGURATION}\" = \"Production\" ]; then\n        echo \"Error: production build missing profiling data at both ${ABSOLUTE_PROFILE_DATA_PATH} and ${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\n        exit 1;\n  
   fi\n    echo \"Missing or invalid profiling data at both ${ABSOLUTE_PROFILE_DATA_PATH} and ${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH} - falling back to empty file\";\n    cp ${SRCROOT}/../../Tools/Profiling/Empty.profdata ${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core/_javascript_Core.profdata;\nelse\n    echo \"Copying profiling data at ${ABSOLUTE_PROFILE_DATA_PATH}\";\n    compression_tool -decode -i ${ABSOLUTE_PROFILE_DATA_PATH} -o ${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core/_javascript_Core.profdata -a lzfse;\nfi\n";
+		};
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */

Modified: branches/safari-613-branch/Source/WebCore/Configurations/Base.xcconfig (292344 => 292345)


--- branches/safari-613-branch/Source/WebCore/Configurations/Base.xcconfig	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/WebCore/Configurations/Base.xcconfig	2022-04-04 21:56:30 UTC (rev 292345)
@@ -90,7 +90,7 @@
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wno-unknown-warning-option -Wliteral-conversion -Wthread-safety;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wno-unknown-warning-option -Wliteral-conversion -Wthread-safety -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled;
 
 TARGET_MACOS_LEGACY_VERSION_IDENTIFIER = $(TARGET_MACOS_LEGACY_VERSION_IDENTIFIER_$(MACOSX_DEPLOYMENT_TARGET:base))
 TARGET_MACOS_LEGACY_VERSION_IDENTIFIER_10 = 10$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier)

Modified: branches/safari-613-branch/Source/WebCore/Configurations/WebCore.xcconfig (292344 => 292345)


--- branches/safari-613-branch/Source/WebCore/Configurations/WebCore.xcconfig	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/WebCore/Configurations/WebCore.xcconfig	2022-04-04 21:56:30 UTC (rev 292345)
@@ -29,6 +29,17 @@
 GCC_PREFIX_HEADER = WebCorePrefix.h;
 GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) BUILDING_WEBKIT GL_SILENCE_DEPRECATION=1 GLES_SILENCE_DEPRECATION=1 $(inherited);
 
+PROFILE_DATA_FLAGS = $(PROFILE_DATA_FLAGS_$(CONFIGURATION)_$(WK_PLATFORM_NAME));
+PROFILE_DATA_FLAGS_Release_macosx = $(PROFILE_DATA_FLAGS_Release_macosx$(WK_MACOS_1200));
+PROFILE_DATA_FLAGS_Release_macosx_MACOS_SINCE_1200 = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Release_iphoneos = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Production_macosx = $(PROFILE_DATA_FLAGS_Production_macosx$(WK_MACOS_1200));
+PROFILE_DATA_FLAGS_Production_macosx_MACOS_SINCE_1200 = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Production_iphoneos = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_ENABLED = -fprofile-instr-use=$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.profdata;
+
+OTHER_CFLAGS = $(inherited) $(PROFILE_DATA_FLAGS);
+
 WK_PRIVATE_FRAMEWORKS_DIR = $(WK_PRIVATE_FRAMEWORKS_DIR_$(USE_INTERNAL_SDK));
 WK_PRIVATE_FRAMEWORKS_DIR_[sdk=macos*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/$(TARGET_MAC_OS_X_VERSION_MAJOR);
 WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphone*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);

Modified: branches/safari-613-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (292344 => 292345)


--- branches/safari-613-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-04-04 21:56:30 UTC (rev 292345)
@@ -38101,6 +38101,7 @@
 				446EE4E7255DF00D00454463 /* Concatenate and Copy Localizable.strings */,
 				93F199FD08245E59001E9ABC /* Resources */,
 				CD0DBF001422765700280263 /* Copy Audio Resources */,
+				F4CDF3CA27E9187200191928 /* Copy Profiling Data */,
 				93F19A0C08245E59001E9ABC /* Sources */,
 				93F19B1208245E59001E9ABC /* Frameworks */,
 				5D0D540D0E9862F60029E223 /* Check For Weak VTables and Externals */,
@@ -38447,6 +38448,28 @@
 			shellPath = /bin/sh;
 			shellScript = "Scripts/generate-derived-sources.sh\n";
 		};
+		F4CDF3CA27E9187200191928 /* Copy Profiling Data */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 12;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"$(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions/Profiling/WebCore.profdata.compressed",
+				"$(SRCROOT)/../../Tools/Profiling/Empty.profdata",
+				"$(SDK_DIR)/usr/local/include/WebKitAdditions/Profiling/WebCore.profdata.compressed",
+			);
+			name = "Copy Profiling Data";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+				"$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.profdata",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n    exit 0;\nfi\n\nif [ -z \"${PROFILE_DATA_FLAGS}\" ]; then\n    exit 0;\nfi\n\nRELATIVE_PROFILE_DATA_PATH=\"usr/local/include/WebKitAdditions/Profiling/WebCore.profdata.compressed\";\nABSOLUTE_PROFILE_DATA_PATH=\"${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\n\nif [ ! -f \"${ABSOLUTE_PROFILE_DATA_PATH}\" ]; then\n    ABSOLUTE_PROFILE_DATA_PATH=\"${SDK_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\nfi\n\nif [ ! -f \"${ABSOLUTE_PROFILE_DATA_PATH}\" ] || [ $(wc -c <${ABSOLUTE_PROFILE_DATA_PATH}) -lt 4096 ]; then\n    if [ \"${CONFIGURATION}\" = \"Production\" ]; then\n        echo \"Error: production build missing profiling data at both ${ABSOLUTE_PROFILE_DATA_PATH} and ${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\n        exit 1;\n    fi\n 
    echo \"Missing or invalid profiling data at both ${ABSOLUTE_PROFILE_DATA_PATH} and ${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH} - falling back to empty file\";\n    cp ${SRCROOT}/../../Tools/Profiling/Empty.profdata ${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/WebCore.profdata;\nelse\n    echo \"Copying profiling data at ${ABSOLUTE_PROFILE_DATA_PATH}\";\n    compression_tool -decode -i ${ABSOLUTE_PROFILE_DATA_PATH} -o ${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/WebCore.profdata -a lzfse;\nfi\n";
+		};
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */

Modified: branches/safari-613-branch/Source/WebKit/Configurations/Base.xcconfig (292344 => 292345)


--- branches/safari-613-branch/Source/WebKit/Configurations/Base.xcconfig	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/WebKit/Configurations/Base.xcconfig	2022-04-04 21:56:30 UTC (rev 292345)
@@ -86,7 +86,7 @@
 GCC_WARN_UNUSED_VARIABLE = YES;
 OTHER_MIGFLAGS = -F$(BUILT_PRODUCTS_DIR);
 PREBINDING = NO;
-WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled;
 
 SWIFT_VERSION = 5.0;
 

Modified: branches/safari-613-branch/Source/WebKit/Configurations/BaseTarget.xcconfig (292344 => 292345)


--- branches/safari-613-branch/Source/WebKit/Configurations/BaseTarget.xcconfig	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/WebKit/Configurations/BaseTarget.xcconfig	2022-04-04 21:56:30 UTC (rev 292345)
@@ -53,9 +53,17 @@
 
 HEADER_SEARCH_PATHS = $(ALTERNATE_HEADER_SEARCH_PATHS) $(BUILT_PRODUCTS_DIR)/usr/local/include "$(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders" $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit $(WEBGPU_HEADER_SEARCH_PATHS) $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(LIBWEBRTC_HEADER_SEARCH_PATHS) $(SRCROOT) $(HEADER_SEARCH_PATHS);
 
-OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
-OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS) -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders;
+PROFILE_DATA_FLAGS = $(PROFILE_DATA_FLAGS_$(CONFIGURATION)_$(WK_PLATFORM_NAME));
+PROFILE_DATA_FLAGS_Release_macosx = $(PROFILE_DATA_FLAGS_Release_macosx$(WK_MACOS_1200));
+PROFILE_DATA_FLAGS_Release_macosx_MACOS_SINCE_1200 = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Release_iphoneos = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Production_macosx = $(PROFILE_DATA_FLAGS_Production_macosx$(WK_MACOS_1200));
+PROFILE_DATA_FLAGS_Production_macosx_MACOS_SINCE_1200 = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_Production_iphoneos = $(PROFILE_DATA_FLAGS_ENABLED);
+PROFILE_DATA_FLAGS_ENABLED = -fprofile-instr-use=$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/WebKit.profdata;
 
+OTHER_CFLAGS = $(inherited) -iframework $(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(PROFILE_DATA_FLAGS);
+
 NORMAL_WEBCORE_FRAMEWORKS_DIR = $(NORMAL_WEBCORE_FRAMEWORKS_DIR_COCOA_TOUCH_$(WK_IS_COCOA_TOUCH));
 NORMAL_WEBCORE_FRAMEWORKS_DIR_COCOA_TOUCH_YES = $(PRODUCTION_FRAMEWORKS_DIR);
 NORMAL_WEBCORE_FRAMEWORKS_DIR_COCOA_TOUCH_NO = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;

Modified: branches/safari-613-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj (292344 => 292345)


--- branches/safari-613-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-04-04 21:56:25 UTC (rev 292344)
+++ branches/safari-613-branch/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-04-04 21:56:30 UTC (rev 292345)
@@ -14082,6 +14082,7 @@
 				99CA3862207286DB00BAD578 /* Copy WebDriver Atoms to Framework Private Headers */,
 				37E531011B2391090074F0DF /* Copy iOS Sandbox Profiles for Manual Sandboxing */,
 				1A07D2F71919B36500ECDA16 /* Copy Message Generation Scripts */,
+				F4CDF3CC27E918D900191928 /* Copy Profiling Data */,
 				8DC2EF540486A6940098B216 /* Sources */,
 				8DC2EF560486A6940098B216 /* Frameworks */,
 				5DF408C5131DD46700130071 /* Check For Weak VTables and Externals */,
@@ -15139,6 +15140,28 @@
 			shellPath = /bin/sh;
 			shellScript = "if [ \"${XCODE_VERSION_ACTUAL}\" -ge \"1140\" -a \"${WK_USE_NEW_BUILD_SYSTEM}\" = \"YES\" ]; then\n    # In this configuration, post-processing is performed at the same time as copying in the postprocess-header-rule script, so there's no need for this separate step.\n    exit 0\nfi\n\nif [ \"${ACTION}\" = \"analyze\" -o \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n    for HEADERS_DIRECTORY in \"${PUBLIC_HEADERS_FOLDER_PATH}\" \"${PRIVATE_HEADERS_FOLDER_PATH}\"; do\n        for HEADER_PATH in \"${TARGET_BUILD_DIR}/${HEADERS_DIRECTORY}/\"*.*; do\n            if [[ ! -z `grep '#import <WebKitAdditions/.*>' \"${HEADER_PATH}\"` ]]; then\n                python \"${S
 RCROOT}/mac/replace-webkit-additions-includes.py\" \"${HEADER_PATH}\" \"${BUILT_PRODUCTS_DIR}\" \"${SDKROOT}\" || exit $?\n            fi\n        done\n    done\nfi\n\n\n";
 		};
+		F4CDF3CC27E918D900191928 /* Copy Profiling Data */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 12;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"$(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions/Profiling/WebKit.profdata.compressed",
+				"$(SRCROOT)/../../Tools/Profiling/Empty.profdata",
+				"$(SDK_DIR)/usr/local/include/WebKitAdditions/Profiling/WebKit.profdata.compressed",
+			);
+			name = "Copy Profiling Data";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+				"$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit/WebKit.profdata",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "if [ \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n    exit 0;\nfi\n\nif [ -z \"${PROFILE_DATA_FLAGS}\" ]; then\n    exit 0;\nfi\n\nRELATIVE_PROFILE_DATA_PATH=\"usr/local/include/WebKitAdditions/Profiling/WebKit.profdata.compressed\";\nABSOLUTE_PROFILE_DATA_PATH=\"${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\n\nif [ ! -f \"${ABSOLUTE_PROFILE_DATA_PATH}\" ]; then\n    ABSOLUTE_PROFILE_DATA_PATH=\"${SDK_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\nfi\n\nif [ ! -f \"${ABSOLUTE_PROFILE_DATA_PATH}\" ] || [ $(wc -c <${ABSOLUTE_PROFILE_DATA_PATH}) -lt 4096 ]; then\n    if [ \"${CONFIGURATION}\" = \"Production\" ]; then\n        echo \"Error: production build missing profiling data at both ${ABSOLUTE_PROFILE_DATA_PATH} and ${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH}\";\n        exit 1;\n    fi\n  
   echo \"Missing or invalid profiling data at both ${ABSOLUTE_PROFILE_DATA_PATH} and ${BUILT_PRODUCTS_DIR}/${RELATIVE_PROFILE_DATA_PATH} - falling back to empty file\";\n    cp ${SRCROOT}/../../Tools/Profiling/Empty.profdata ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit/WebKit.profdata;\nelse\n    echo \"Copying profiling data at ${ABSOLUTE_PROFILE_DATA_PATH}\";\n    compression_tool -decode -i ${ABSOLUTE_PROFILE_DATA_PATH} -o ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit/WebKit.profdata -a lzfse;\nfi\n";
+		};
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */

Added: branches/safari-613-branch/Tools/Profiling/Empty.profdata (0 => 292345)


--- branches/safari-613-branch/Tools/Profiling/Empty.profdata	                        (rev 0)
+++ branches/safari-613-branch/Tools/Profiling/Empty.profdata	2022-04-04 21:56:30 UTC (rev 292345)
@@ -0,0 +1,8 @@
+\xFFlprofi\x81����������������������������������������������\xA8+��������������������������������������������������������������������������������������������������������������0��������������'��������������������������������������������\xA0\x86��������������������������������������@+��������������������������������������\xE0\x93��������������������������������������\x80�������������������������������������� \xA1��������������������������������������\xC0'	��������������������������������������`\xAE
+����������������������������������������5��������������������������������������\xA0\xBB+��������������������������������������\xF0~��������������������������������������0��������������������������������������X>��������������������������������������\xDCA��������������������������������������6B��������������������������������������?B����������������������������������������AfR\x82Ց}?I�������������� ��������������_ZNSt3__14moveIRPN3WTF10StringImplEEEONS_16remove_referenceIT_E4typeEOS6_����������������������������������������������������������b\xB9\xA4\xBFa(<5�������������� ��������������_ZNSt3__18exchangeIPN3WTF10StringImplERDnEET_RS5_OT0_����������������������������������������������������������\xE4\xED\xE8\xC9R�������������� ��������������_ZN3WTF10AtomStringC2EPKc������������������������������������������������������������e\xF2\xF7:\x95\x98�������������� ��������������_ZN3WTF6StringD2Ev������������������������������������������
 ����������������\x85\xA9\xBF\xBCW(\xEEqE��������������(��������������_ZN3WTF21DefaultRefDerefTraitsINS_10StringImplEE14derefIfNotNullEPS1_\x91j\x9A����������������������������������������������������������������FB\xF5\x93RD�������������� ��������������_ZN3WTF12RawPtrTraitsINS_14AtomStringImplEE8exchangeIDnEEPS1_RS4_OT_����������������������������������������������������������.\xA9\x94\xCA\xF3|\xFFI��������������(��������������_
 ZN3WTF21DefaultRefDerefTraitsINS_14AtomStringImplEE14derefIfNotNullEPS1_\x91j\x9A������������������������������������������������������������������\xEF\xFBc?`\xED\xEC\x89e�������������� ��������������_ZN3WTF6RefPtrINS_14AtomStringImplENS_12RawPtrTraitsIS1_EENS_21DefaultRefDerefTraitsIS1_EEE7leakRefEv����������������������������������������������������������0id\xFA\xC3\xF3م�������������� ��������������_ZN3WTF14AtomStringImpl3addEPKc����������������������������������������������������������\xF12\x89Y\xFF\x82\x86;�������������� ��������������_ZNSt3__17forwardIRDnEEOT_RNS_16remove_referenceIS2_E4typeE����������������������������������������������������������3"\xC8yq\x9D\xCF\xD1��������������(��������������_ZN3WTF10StringImpl5derefEv&i
+������������������������������������������������������������������\xF5T\xD0\xE6\x9C\xD5rٔ�������������� ��������������_ZN3WTF6RefPtrINS_10StringImplENS_12RawPtrTraitsIS1_EENS_21DefaultRefDerefTraitsIS1_EEEC2INS_14AtomStringImplENS2_IS8_EENS4_IS8_EEEEONS0_IT_T0_T1_EE������������������������������������������������������������\xD6\\xA2x\xB7s|\xC29�������������� ��������������_ZNSt3__18exchangeIPN3WTF14AtomStringImplERDnEET_RS5_OT0_����������������������������������������������������������9JÊ\xB1K\xE8Yj�������������� ��������������_ZN3WTF6StringC2EONS_6RefPtrINS_14AtomStringImplENS_12RawPtrTraitsIS2_EENS_21DefaultRefDerefTraitsIS2_EEEE������������������������������������������������������������\xBA\xF1\xDDQ\x88౓�������������� ��������������_ZNSt3__14moveIRN3WTF6RefPtrINS1_14AtomStringImplENS1_12RawPtrTraitsIS3_EENS1_21DefaultRefDerefTraitsIS3_EEEEEEONS_16remove_referenceIT_E4typeEOSB_��������������������������������������������������������\xFAՍ\xE76d\x95\xDB
 �������������� ��������������main��������������������������������������������������������z|]\xFD}\xF2:_�������������� ��������������_ZN3WTF6RefPtrINS_14AtomStringImplENS_12RawPtrTraitsIS1_EENS_21DefaultRefDerefTraitsIS1_EEED2Ev����������������������������������������������������
 ������\xDA\xCArsJ\x81>\x96�������������� ��������������_ZNSt3__17forwardIRN3WTF6RefPtrINS1_14AtomStringImplENS1_12RawPtrTraitsIS3_EENS1_21DefaultRefDerefTraitsIS3_EEEEEEOT_RNS_16remove_referenceISA_E4typeE����������������������������������������������������������\xBBq\xE9d!\xD1[�������������� ��������������_ZN3WTF6RefPtrINS_10StringImplENS_12RawPtrTraitsIS1_EENS_21DefaultRefDerefTraitsIS1_EEED2Ev����������������������������������������������������������{n4T\xAC+\xC5+\xB1�������������� ��������������_ZSt4moveILN3WTF21CheckMoveParameterTagE0ERNS0_6RefPtrINS0_14AtomStringImplENS0_12RawPtrTraitsIS3_EENS0_21DefaultRefDerefTraitsIS3_EEEEEONSt3__116remove_referenceIT0_E4typeEOSC_\x98������������������������������������������������������\x9B\xAF\\xA8\x83x@�������������� ��������������_ZN3WTF12RawPtrTraitsINS_10StringImplEE8exchangeIDnEEPS1_RS4_OT_����������������������������������������������������������!\x80\xAE\x97\xBA\xADrM�������������� ��������������_ZNSt3__14
 moveIRPN3WTF14AtomStringImplEEEONS_16remove_referenceIT_E4typeEOS6_���������������������������������������������������������������������� ��������������������������������������������\xE8������������k����������������������������\xDA������������-������������\xFE����������
 ������������������������������������������������������������������������������������������������������������������|������������������������\xA6������������\xFF����������������������������t����������������������������\xD1������������\x9F��������������������������������������������������������\xB6������������$������������+������������������������������������������������������������
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to