Modified: trunk/Tools/ChangeLog (293909 => 293910)
--- trunk/Tools/ChangeLog 2022-05-06 17:59:27 UTC (rev 293909)
+++ trunk/Tools/ChangeLog 2022-05-06 18:37:28 UTC (rev 293910)
@@ -1,3 +1,13 @@
+2022-05-06 Justin Michaud <[email protected]>
+
+ Update PGO profile collection scripts to include MotionMark
+ https://bugs.webkit.org/show_bug.cgi?id=240171
+
+ Reviewed by Mark Lam.
+
+ * Scripts/build-and-collect-pgo-profiles:
+ * Scripts/pgo-profile:
+
2022-05-06 Jonathan Bedard <[email protected]>
[ews-build.webkit.org] Do not block EWS queues for merging-blocked label
Modified: trunk/Tools/Scripts/build-and-collect-pgo-profiles (293909 => 293910)
--- trunk/Tools/Scripts/build-and-collect-pgo-profiles 2022-05-06 17:59:27 UTC (rev 293909)
+++ trunk/Tools/Scripts/build-and-collect-pgo-profiles 2022-05-06 18:37:28 UTC (rev 293910)
@@ -24,6 +24,7 @@
mkdir -p "$BASE/speedometer"
mkdir -p "$BASE/jetstream"
+mkdir -p "$BASE/motionmark"
mkdir -p "$BASE/output"
mkdir -p "$BASE/Internal/WebKit/WebKitAdditions/Profiling/"
@@ -32,17 +33,20 @@
rm -rf ../OpenSource/WebKitBuild
make release WK_LTO_MODE=thin ENABLE_LLVM_PROFILE_GENERATION=ON
-run-benchmark --plan jetstream2 --diagnose-directory=/Volumes/WebKit/BenchmarkProfiles/jetstream --generate-profiles --build-directory=../OpenSource/WebKitBuild/Release --count 1
+run-benchmark --plan jetstream2 --diagnose-directory="$BASE/jetstream" --generate-profiles --build-directory=../OpenSource/WebKitBuild/Release --count 1
pgo-profile merge "$BASE/jetstream"
-run-benchmark --plan speedometer --diagnose-directory=/Volumes/WebKit/BenchmarkProfiles/speedometer --generate-profiles --build-directory=../OpenSource/WebKitBuild/Release --count 1
+run-benchmark --plan speedometer --diagnose-directory="$BASE/speedometer" --generate-profiles --build-directory=../OpenSource/WebKitBuild/Release --count 1
pgo-profile merge "$BASE/speedometer"
+run-benchmark --plan motionmark --diagnose-directory="$BASE/motionmark" --generate-profiles --build-directory=../OpenSource/WebKitBuild/Release --count 1
+pgo-profile merge "$BASE/motionmark"
+
rm *.result
-pgo-profile combine --jetstream "$BASE/jetstream" --speedometer "$BASE/speedometer" --output "$BASE/output"
+pgo-profile combine --jetstream "$BASE/jetstream" --speedometer "$BASE/speedometer" --motionmark "$BASE/motionmark" --output "$BASE/output"
pgo-profile compress --input "$BASE/output" --output "$BASE/Internal/WebKit/WebKitAdditions/Profiling/"
echo "Done! Find your profiles in $BASE/Internal/WebKit/WebKitAdditions/Profiling/"
-echo "To check these in, do: 'cp -r /Volumes/WebKit/BenchmarkProfiles/Internal/ ../Internal/'"
\ No newline at end of file
+echo "To check these in, do: 'cp -r $BASE/Internal/ ../Internal/'"
Modified: trunk/Tools/Scripts/pgo-profile (293909 => 293910)
--- trunk/Tools/Scripts/pgo-profile 2022-05-06 17:59:27 UTC (rev 293909)
+++ trunk/Tools/Scripts/pgo-profile 2022-05-06 18:37:28 UTC (rev 293910)
@@ -7,7 +7,7 @@
import os
PROFILED_DYLIBS = ["_javascript_Core", "WebCore", "WebKit"]
-BENCHMARK_GROUP_WEIGHTS = [("speedometer", 0.6), ("jetstream", 0.4)]
+BENCHMARK_GROUP_WEIGHTS = [("speedometer", 0.6), ("jetstream", 0.2), ("motionmark", 0.2)]
def pad(string, max_length):
if len(string) > max_length:
@@ -75,13 +75,14 @@
inputs = [f"\"{i}\"" for i in inputs]
inputs = " ".join(inputs)
output_file = os.path.join(path, lib + '.profdata')
- print(shell(f"xcrun -sdk macosx.internal llvm-profdata merge {inputs} -output=\"{output_file}\""))
+ print(shell(f"xcrun -sdk macosx.internal llvm-profdata merge --sparse {inputs} -output=\"{output_file}\""))
def combine_parser(subparsers):
parser = subparsers.add_parser("combine", help="Combine directories containing *.profdata files from different platforms together.")
- parser.add_argument("--speedometer", default=None, help="Path to the directory containing the *.profdata files from a speedometer run.")
- parser.add_argument("--jetstream", default=None, help="Path to the directory containing the *.profdata files from a jetstream run.")
+ for i in range(0, len(BENCHMARK_GROUP_WEIGHTS)):
+ group, _ = BENCHMARK_GROUP_WEIGHTS[i]
+ parser.add_argument(f"--{group}", default=None, help=f"Path to the directory containing the *.profdata files from a {group} run.")
parser.add_argument("--output", help="Path to the directory where the output will be placed.")
parser.set_defaults(func=combine)
return parser
@@ -125,7 +126,7 @@
group_input = ["--weighted-input={},\"{}\"".format(weight, os.path.join(path, lib + ".profdata")) for path, weight in group_paths]
group_input = " ".join(group_input)
output_file = os.path.join(out, lib + '.profdata')
- print(shell(f"xcrun -sdk macosx.internal llvm-profdata merge {group_input} -output=\"{output_file}\""))
+ print(shell(f"xcrun -sdk macosx.internal llvm-profdata merge --sparse {group_input} -output=\"{output_file}\""))
def compress_parser(subparsers):