Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add signposts and profiling support to JetStream2
https://bugs.webkit.org/show_bug.cgi?id=247907 rdar://102328951 Reviewed by Dewei Zhu. Two things are needed to add profiling support to JetStream: - Support for subtests, since by default trying to profile JetStream may sometimes result in the profile being cut off before the test finishes due to file size issues. - Signposting to help label generated profiles In this patch: - Added two new fields to plan files in order to allow them to support subtests - `subtest_url_format`: a string template for formatting subtest URL parameters - `subtests`: a dictionary of suites and tests in the following form: {"suite1": ["test1, test2"]} If a test does not have a suite associated with it, the key is "". - Added a new argument to run-benchmarks, `--list-subtests`, that prints out available subtests from a specified plan. - Modified and added helper functions to BenchmarkRunner to support listing and validating subtests. - Added a new argument to run-benchmarks, `--subtests`, that limits a test with subtest support to only run those subtests. - Added a new signposting patch to help annotate generated profiles. * Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py: (BenchmarkRunner.__init__): (BenchmarkRunner): (BenchmarkRunner._find_plan_file): (BenchmarkRunner._load_plan_data): (BenchmarkRunner.format_subtests): (BenchmarkRunner.available_subtests): (BenchmarkRunner.validate_subtests): * Tools/Scripts/webkitpy/benchmark_runner/data/patches/signposts/JetStream2.patch: Added. * Tools/Scripts/webkitpy/benchmark_runner/data/plans/jetstream2.1.plan: * Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py: (config_argument_parser): (run_benchmark_plan): (list_subtests): (start): * Tools/Scripts/webkitpy/benchmark_runner/webdriver_benchmark_runner.py: (WebDriverBenchmarkRunner._construct_subtest_url): (WebDriverBenchmarkRunner._run_one_test): * Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: (WebServerBenchmarkRunner.__init__): (WebServerBenchmarkRunner): Canonical link: https://commits.webkit.org/257642@main
- Loading branch information
Showing
6 changed files
with
239 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
Tools/Scripts/webkitpy/benchmark_runner/data/patches/signposts/JetStream2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/PerformanceTests/JetStream2/JetStreamDriver.js b/PerformanceTests/JetStream2/JetStreamDriver.js | ||
index 0bc36c9e62a1..ec4aaa0c2f1d 100644 | ||
--- a/JetStreamDriver.js | ||
+++ b/JetStreamDriver.js | ||
@@ -645,6 +645,8 @@ class Benchmark { | ||
if (RAMification) | ||
resetMemoryPeak(); | ||
|
||
+ __signpostStart(this.name) | ||
+ | ||
let magicFrame; | ||
try { | ||
magicFrame = JetStream.runCode(code); | ||
@@ -654,6 +656,8 @@ class Benchmark { | ||
} | ||
let results = await promise; | ||
|
||
+ __signpostStop(this.name) | ||
+ | ||
this.endTime = new Date(); | ||
|
||
if (RAMification) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.