Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ parameters:
runtimeVariant: ''
shouldContinueOnError: false
SuperPmiCollect: ''
SuperPmiReplayType: ''
SuperPmiDiffType: ''
SuperPmiBaseJitOptions: ''
SuperPmiDiffJitOptions: ''
Expand Down Expand Up @@ -65,6 +66,7 @@ steps:
RuntimeFlavor: ${{ parameters.runtimeFlavor }}
_RuntimeVariant: ${{ parameters.runtimeVariant }}
_SuperPmiCollect: ${{ parameters.SuperPmiCollect }}
_SuperPmiReplayType: ${{ parameters.SuperPmiReplayType }}
_SuperPmiDiffType: ${{ parameters.SuperPmiDiffType }}
_SuperPmiBaseJitOptions: ${{ parameters.SuperPmiBaseJitOptions }}
_SuperPmiDiffJitOptions: ${{ parameters.SuperPmiDiffJitOptions }}
Expand Down
19 changes: 19 additions & 0 deletions eng/pipelines/coreclr/superpmi-replay-apx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
trigger: none

schedules:
- cron: "0 7 * * *"
displayName: Daily at 11:00 PM (UTC-8:00)
branches:
include:
- main
always: true

variables:
- template: /eng/pipelines/common/variables.yml

extends:
template: /eng/pipelines/coreclr/templates/jit-replay-pipeline.yml
parameters:
platforms:
- windows_x64
replayType: apx
56 changes: 5 additions & 51 deletions eng/pipelines/coreclr/superpmi-replay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,55 +12,9 @@ variables:
- template: /eng/pipelines/common/variables.yml

extends:
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
template: /eng/pipelines/coreclr/templates/jit-replay-pipeline.yml
parameters:
stages:
# Don't run if the JIT-EE GUID has changed,
# since there won't be any SuperPMI collections with the new GUID until the collection
# pipeline completes after this PR is merged.
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- stage: EvaluatePaths
displayName: Evaluate Paths
jobs:
- template: /eng/pipelines/common/evaluate-paths-job.yml
parameters:
paths:
- subset: jiteeversionguid
include:
- src/coreclr/inc/jiteeversionguid.h

- stage: Build
jobs:

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: checked
platforms:
- windows_x64
- windows_x86
jobParameters:
buildArgs: -s clr.alljits+clr.spmi -c $(_BuildConfig)
postBuildSteps:
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr
includeRootFolder: false
archiveType: $(archiveType)
tarCompression: $(tarCompression)
archiveExtension: $(archiveExtension)
artifactName: CheckedJIT_$(osGroup)$(osSubgroup)_$(archType)
displayName: JIT and SuperPMI Assets
condition: not(eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_jiteeversionguid.containsChange'], true))

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/superpmi-replay-job.yml
buildConfig: checked
platforms:
- windows_x64
- windows_x86
helixQueueGroup: ci
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
jobParameters:
condition: not(eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_jiteeversionguid.containsChange'], true))
platforms:
- windows_x64
- windows_x86
replayType: standard
58 changes: 58 additions & 0 deletions eng/pipelines/coreclr/templates/jit-replay-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
parameters:
- name: platforms
type: object
- name: replayType
type: string
default: standard

extends:
template: /eng/pipelines/common/templates/pipeline-with-resources.yml
parameters:
stages:
# Don't run if the JIT-EE GUID has changed,
# since there won't be any SuperPMI collections with the new GUID until the collection
# pipeline completes after this PR is merged.
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- stage: EvaluatePaths
displayName: Evaluate Paths
jobs:
- template: /eng/pipelines/common/evaluate-paths-job.yml
parameters:
paths:
- subset: jiteeversionguid
include:
- src/coreclr/inc/jiteeversionguid.h

- stage: Build
jobs:

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
buildConfig: checked
platforms: ${{ parameters.platforms }}
jobParameters:
buildArgs: -s clr.alljits+clr.spmi -c $(_BuildConfig)
postBuildSteps:
- template: /eng/pipelines/common/upload-artifact-step.yml
parameters:
rootFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr
includeRootFolder: false
archiveType: $(archiveType)
tarCompression: $(tarCompression)
archiveExtension: $(archiveExtension)
artifactName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
displayName: Build Assets
condition: not(eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_jiteeversionguid.containsChange'], true))

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/superpmi-replay-job.yml
buildConfig: checked
platforms: ${{ parameters.platforms }}
helixQueueGroup: ci
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
jobParameters:
condition: not(eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_jiteeversionguid.containsChange'], true))
replayType: ${{ parameters.replayType }}
unifiedArtifactsName: BuildArtifacts_$(osGroup)$(osSubgroup)_$(archType)_$(_BuildConfig)
9 changes: 7 additions & 2 deletions eng/pipelines/coreclr/templates/run-superpmi-replay-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ parameters:
enableTelemetry: false # optional -- enable for telemetry
liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run
helixQueues: '' # required -- Helix queues
replayType: 'standard' # required -- 'standard', 'apx'

jobs:
- template: /eng/pipelines/common/templates/runtimes/xplat-job.yml
Expand Down Expand Up @@ -47,6 +48,9 @@ jobs:
- ${{ each variable in parameters.variables }}:
- ${{insert}}: ${{ variable }}

- name: replayType
value: ${{ parameters.replayType }}

- template: /eng/pipelines/coreclr/templates/jit-python-variables.yml
parameters:
osGroup: ${{ parameters.osGroup }}
Expand Down Expand Up @@ -74,8 +78,8 @@ jobs:
mkdir $(SpmiLogsLocation)
displayName: Create directories

- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi_replay_setup.py -source_directory $(Build.SourcesDirectory) -product_directory $(buildProductRootFolderPath) -arch $(archType)
displayName: ${{ format('SuperPMI replay setup ({0})', parameters.archType) }}
- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/superpmi_replay_setup.py -source_directory $(Build.SourcesDirectory) -product_directory $(buildProductRootFolderPath) -type $(replayType) -arch $(archType)
displayName: ${{ format('SuperPMI replay setup ({0} {1})', parameters.replayType, parameters.archType) }}

# Run superpmi replay in helix
- template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml
Expand All @@ -93,6 +97,7 @@ jobs:
BuildConfig: ${{ parameters.buildConfig }}
osGroup: ${{ parameters.osGroup }}
archType: ${{ parameters.archType }}
SuperPmiReplayType: ${{ parameters.replayType }}

# Always upload the available logs for diagnostics
- task: CopyFiles@2
Expand Down
15 changes: 9 additions & 6 deletions eng/pipelines/coreclr/templates/superpmi-replay-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ parameters:
variables: {}
helixQueues: ''
runJobTemplate: '/eng/pipelines/coreclr/templates/run-superpmi-replay-job.yml'
replayType: 'standard'
unifiedArtifactsName: ''

jobs:
- template: ${{ parameters.runJobTemplate }}
parameters:
jobName: ${{ format('superpmi_replay_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('SuperPMI replay {0}{1} {2} {3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
jobName: ${{ format('superpmi_replay_{0}_{1}{2}_{3}_{4}', parameters.replayType, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
displayName: ${{ format('SuperPMI replay {0} {1}{2} {3} {4}', parameters.replayType, parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
pool: ${{ parameters.pool }}
buildConfig: ${{ parameters.buildConfig }}
archType: ${{ parameters.archType }}
Expand All @@ -23,18 +25,19 @@ jobs:
condition: ${{ parameters.condition }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
helixQueues: ${{ parameters.helixQueues }}
replayType: ${{ parameters.replayType }}
dependsOn:
- 'build_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_${{ parameters.buildConfig }}_'

variables: ${{ parameters.variables }}

steps:

# Download jit builds
# Download builds
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
unpackFolder: $(Build.SourcesDirectory)/artifacts/bin/coreclr
artifactFileName: 'CheckedJIT_$(osGroup)$(osSubgroup)_$(archType)$(archiveExtension)'
artifactName: 'CheckedJIT_$(osGroup)$(osSubgroup)_$(archType)'
displayName: 'JIT checked build'
artifactFileName: '${{ parameters.unifiedArtifactsName }}$(archiveExtension)'
artifactName: '${{ parameters.unifiedArtifactsName }}'
displayName: 'unified artifacts'
cleanUnpackFolder: false
29 changes: 25 additions & 4 deletions src/coreclr/scripts/superpmi-replay.proj
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
timeout: %(HelixWorkItem.Timeout) '"/>
</Target> -->

<PropertyGroup>
<!-- Default to standard type -->
<SuperPmiReplayType Condition=" '$(_SuperPmiReplayType)' == '' ">standard</SuperPmiReplayType>
<SuperPmiReplayType Condition=" '$(_SuperPmiReplayType)' != '' ">$(_SuperPmiReplayType)</SuperPmiReplayType>
</PropertyGroup>

<PropertyGroup>
<Python>%HELIX_PYTHONPATH%</Python>
<ProductDirectory>%HELIX_CORRELATION_PAYLOAD%</ProductDirectory>
<SuperpmiLogsLocation>%HELIX_WORKITEM_UPLOAD_ROOT%</SuperpmiLogsLocation>
<WorkItemCommand>$(Python) $(ProductDirectory)\superpmi_replay.py -jit_directory $(ProductDirectory)</WorkItemCommand>
<WorkItemCommand>$(Python) $(ProductDirectory)\superpmi_replay.py -type $(SuperPmiReplayType) -jit_directory $(ProductDirectory)</WorkItemCommand>
<WorkItemTimeout>3:15</WorkItemTimeout>
</PropertyGroup>

Expand All @@ -49,7 +55,7 @@
</HelixCorrelationPayload>
</ItemGroup>

<ItemGroup Condition="'$(Architecture)' == 'x64'">
<ItemGroup Condition="'$(SuperPmiReplayType)' == 'standard' and '$(Architecture)' == 'x64'">
<SPMI_Partition Include="windows-x64-1" Platform="windows" Architecture="x64" Partition="1" PartitionCount="9"/>
<SPMI_Partition Include="windows-x64-2" Platform="windows" Architecture="x64" Partition="2" PartitionCount="9"/>
<SPMI_Partition Include="windows-x64-3" Platform="windows" Architecture="x64" Partition="3" PartitionCount="9"/>
Expand Down Expand Up @@ -97,7 +103,7 @@
<SPMI_Partition Include="osx-arm64-9" Platform="osx" Architecture="arm64" Partition="9" PartitionCount="9"/>
</ItemGroup>

<ItemGroup Condition="'$(Architecture)' == 'x86'">
<ItemGroup Condition="'$(SuperPmiReplayType)' == 'standard' and '$(Architecture)' == 'x86'">
<SPMI_Partition Include="windows-x86-1" Platform="windows" Architecture="x86" Partition="1" PartitionCount="9"/>
<SPMI_Partition Include="windows-x86-2" Platform="windows" Architecture="x86" Partition="2" PartitionCount="9"/>
<SPMI_Partition Include="windows-x86-3" Platform="windows" Architecture="x86" Partition="3" PartitionCount="9"/>
Expand All @@ -118,11 +124,26 @@
<SPMI_Partition Include="linux-arm-9" Platform="linux" Architecture="arm" Partition="9" PartitionCount="9"/>
</ItemGroup>

<ItemGroup Condition="'$(SuperPmiReplayType)' == 'apx' and '$(Architecture)' == 'x64'">
<SPMI_Partition Include="windows-x64-1" Platform="windows" Architecture="x64" Partition="1" PartitionCount="6"/>
<SPMI_Partition Include="windows-x64-2" Platform="windows" Architecture="x64" Partition="2" PartitionCount="6"/>
<SPMI_Partition Include="windows-x64-3" Platform="windows" Architecture="x64" Partition="3" PartitionCount="6"/>
<SPMI_Partition Include="windows-x64-4" Platform="windows" Architecture="x64" Partition="4" PartitionCount="6"/>
<SPMI_Partition Include="windows-x64-5" Platform="windows" Architecture="x64" Partition="5" PartitionCount="6"/>
<SPMI_Partition Include="windows-x64-6" Platform="windows" Architecture="x64" Partition="6" PartitionCount="6"/>
<SPMI_Partition Include="linux-x64-1" Platform="linux" Architecture="x64" Partition="1" PartitionCount="6"/>
<SPMI_Partition Include="linux-x64-2" Platform="linux" Architecture="x64" Partition="2" PartitionCount="6"/>
<SPMI_Partition Include="linux-x64-3" Platform="linux" Architecture="x64" Partition="3" PartitionCount="6"/>
<SPMI_Partition Include="linux-x64-4" Platform="linux" Architecture="x64" Partition="4" PartitionCount="6"/>
<SPMI_Partition Include="linux-x64-5" Platform="linux" Architecture="x64" Partition="5" PartitionCount="6"/>
<SPMI_Partition Include="linux-x64-6" Platform="linux" Architecture="x64" Partition="6" PartitionCount="6"/>
</ItemGroup>

<ItemGroup>
<HelixWorkItem Include="@(SPMI_Partition)">
<Command>$(WorkItemCommand) -arch %(HelixWorkItem.Architecture) -platform %(HelixWorkItem.Platform) -partition %(HelixWorkItem.Partition) -partition_count %(HelixWorkItem.PartitionCount) -log_directory $(SuperpmiLogsLocation)</Command>
<Timeout>$(WorkItemTimeout)</Timeout>
<DownloadFilesFromResults>superpmi_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture)_%(HelixWorkItem.Partition).log</DownloadFilesFromResults>
<DownloadFilesFromResults>superpmi_final_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture)_%(HelixWorkItem.Partition).log</DownloadFilesFromResults>
</HelixWorkItem>
</ItemGroup>
</Project>
Loading
Loading