Skip to content

Commit 088d199

Browse files
authored
Add benchmarks.run_pgo_optrepeat collection (#112750)
1 parent b658cd2 commit 088d199

File tree

6 files changed

+27
-6
lines changed

6 files changed

+27
-6
lines changed

eng/pipelines/coreclr/superpmi-collect-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ extends:
241241
jobParameters:
242242
testGroup: outerloop
243243
liveLibrariesBuildConfig: Release
244-
collectionType: run_tiered
244+
collectionType: run_pgo
245245
collectionName: benchmarks
246246
collectionUpload: false
247247

@@ -262,7 +262,7 @@ extends:
262262
jobParameters:
263263
testGroup: outerloop
264264
liveLibrariesBuildConfig: Release
265-
collectionType: run_pgo
265+
collectionType: run_pgo_optrepeat
266266
collectionName: benchmarks
267267
collectionUpload: false
268268

eng/pipelines/coreclr/superpmi-collect.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ extends:
258258
jobParameters:
259259
testGroup: outerloop
260260
liveLibrariesBuildConfig: Release
261-
collectionType: run_tiered
261+
collectionType: run_pgo
262262
collectionName: benchmarks
263263

264264
- template: /eng/pipelines/common/platform-matrix.yml
@@ -278,7 +278,7 @@ extends:
278278
jobParameters:
279279
testGroup: outerloop
280280
liveLibrariesBuildConfig: Release
281-
collectionType: run_pgo
281+
collectionType: run_pgo_optrepeat
282282
collectionName: benchmarks
283283

284284
#

src/coreclr/scripts/superpmi-collect.proj

+3
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120
<PropertyGroup Condition=" '$(CollectionType)' == 'run_pgo' ">
121121
<RunArguments>--tiered_pgo</RunArguments>
122122
</PropertyGroup>
123+
<PropertyGroup Condition=" '$(CollectionType)' == 'run_pgo_optrepeat' ">
124+
<RunArguments>--tiered_pgo --jitoptrepeat_all</RunArguments>
125+
</PropertyGroup>
123126
<PropertyGroup Condition=" '$(CollectionType)' != 'run_tiered' and '$(CollectionType)' != 'run_pgo' ">
124127
<RunArguments></RunArguments>
125128
</PropertyGroup>

src/coreclr/scripts/superpmi.py

+9
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ def add_core_root_arguments(parser, build_type_default, build_type_help):
314314
collect_parser.add_argument("--disable_r2r", action="store_true", help="Sets DOTNET_ReadyToRun=0 when doing collection to cause ReadyToRun images to not be used, and thus causes JIT compilation and SuperPMI collection of these methods.")
315315
collect_parser.add_argument("--tiered_compilation", action="store_true", help="Sets DOTNET_TieredCompilation=1 when doing collections.")
316316
collect_parser.add_argument("--tiered_pgo", action="store_true", help="Sets DOTNET_TieredCompilation=1 and DOTNET_TieredPGO=1 when doing collections.")
317+
collect_parser.add_argument("--jitoptrepeat_all", action="store_true", help="Sets DOTNET_JitOptRepeat=* when doing collections.")
317318
collect_parser.add_argument("--ci", action="store_true", help="Special collection mode for handling zero-sized files in Azure DevOps + Helix pipelines collections.")
318319

319320
# Allow for continuing a collection in progress
@@ -864,6 +865,9 @@ def __collect_mc_files__(self):
864865
else:
865866
dotnet_env["TieredCompilation"] = "0"
866867

868+
if self.coreclr_args.jitoptrepeat_all:
869+
dotnet_env["JitOptRepeat"] = "*"
870+
867871
if self.coreclr_args.disable_r2r:
868872
dotnet_env["ReadyToRun"] = "0"
869873

@@ -4911,6 +4915,11 @@ def verify_base_diff_args():
49114915
lambda unused: True,
49124916
"Unable to set tiered_pgo")
49134917

4918+
coreclr_args.verify(args,
4919+
"jitoptrepeat_all",
4920+
lambda unused: True,
4921+
"Unable to set jitoptrepeat_all")
4922+
49144923
coreclr_args.verify(args,
49154924
"pmi_path",
49164925
lambda unused: True,

src/coreclr/scripts/superpmi_benchmarks.py

+9
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
parser.add_argument("-benchmark_binary", help="Benchmark binary to execute")
4040
parser.add_argument("--tiered_compilation", action="store_true", help="Sets DOTNET_TieredCompilation=1 when doing collections.")
4141
parser.add_argument("--tiered_pgo", action="store_true", help="Sets DOTNET_TieredCompilation=1 and DOTNET_TieredPGO=1 when doing collections.")
42+
parser.add_argument("--jitoptrepeat_all", action="store_true", help="Sets DOTNET_JitOptRepeat=*.")
4243

4344
def setup_args(args):
4445
""" Setup the args for SuperPMI to use.
@@ -113,6 +114,11 @@ def setup_args(args):
113114
lambda unused: True,
114115
"Unable to set tiered_pgo")
115116

117+
coreclr_args.verify(args,
118+
"jitoptrepeat_all",
119+
lambda unused: True,
120+
"Unable to set jitoptrepeat_all")
121+
116122
return coreclr_args
117123

118124

@@ -288,6 +294,9 @@ def build_and_run(coreclr_args, output_mch_name):
288294
else:
289295
collection_command += "DOTNET_TieredCompilation:0"
290296

297+
if coreclr_args.jitoptrepeat_all:
298+
collection_command += " DOTNET_JitOptRepeat:\"*\""
299+
291300
# Generate the execution script in Temp location
292301
with TempDir() as temp_location:
293302
script_name = os.path.join(temp_location, script_name)

src/coreclr/scripts/superpmi_collect_setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
parser = argparse.ArgumentParser(description="description")
4545

46-
parser.add_argument("-collection_type", required=True, help="Type of the SPMI collection to be done (nativeaot, crossgen2, pmi, run, run_tiered, run_pgo)")
46+
parser.add_argument("-collection_type", required=True, help="Type of the SPMI collection to be done (nativeaot, crossgen2, pmi, run, run_tiered, run_pgo, run_pgo_optrepeat)")
4747
parser.add_argument("-collection_name", required=True, help="Name of the SPMI collection to be done (e.g., libraries, libraries_tests, coreclr_tests, benchmarks)")
4848
parser.add_argument("-payload_directory", required=True, help="Path to payload directory to create: subdirectories are created for the correlation payload as well as the per-partition work items")
4949
parser.add_argument("-source_directory", required=True, help="Path to source directory")
@@ -57,7 +57,7 @@
5757

5858
is_windows = platform.system() == "Windows"
5959

60-
legal_collection_types = [ "nativeaot", "crossgen2", "pmi", "run", "run_tiered", "run_pgo" ]
60+
legal_collection_types = [ "nativeaot", "crossgen2", "pmi", "run", "run_tiered", "run_pgo", "run_pgo_optrepeat" ]
6161

6262
directories_to_ignore = [
6363
"runtimes", # This appears to be the result of a nuget package that includes a bunch of native code

0 commit comments

Comments
 (0)