Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Description

The superpmi_aspnet2.py script ran each benchmark scenario only once. Modified to run each scenario 6 times with different JIT configuration environment variables to collect comprehensive SPMI data across compilation modes.

Changes

  • Modified run_crank_scenario signature: Added env_vars: dict parameter to accept environment variable configurations
  • Added environment variable processing: Converts dictionary to --application.environmentVariables DOTNET_<variable>=<value> crank arguments
  • Defined 6 environment variable sets:
    1. Dummy=0
    2. TieredCompilation=0
    3. TieredPGO=0
    4. TieredPGO=1, ReadyToRun=0
    5. ReadyToRun=0, OSR_HitLimit=0, TC_OnStackReplacement_InitialCounter=10
    6. TC_PartialCompilation=1
  • Updated main loop: Nested iteration runs each of 4 scenarios with all 6 environment sets (24 total runs)

Impact

Before: 4 scenarios × 1 run = 4 total runs
After: 4 scenarios × 6 env sets = 24 total runs

Each run now displays the active configuration:

### Running about-sqlite benchmark (set 1/6: Dummy=0)... ###
### Running about-sqlite benchmark (set 2/6: TieredCompilation=0)... ###
...

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /usr/bin/curl curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Add more scenarios to aspnet2 SPMI collection

superpmi_aspnet2.py script currently runs all scenarios just once (e.g. "about-sqlite", "json", etc). I want you to runeach scenario multiple times with different sets of environment variables here are the sets:

Dummy=0
TieredCompilation=0
TieredPGO=0
TieredPGO=1, ReadyToRun=0
ReadyToRun=0, OSR_HitLimit=0, TC_OnStackReplacement_InitialCounter=10
TC_PartialCompilation=1

6 sets in total (some of them have multiple variables).

each variable is basically extra --application.environmentVariables DOTNET_<variable>=<value> argument passed to crank.

You don't have to build the whole runtime or run the script (it requires a complex setup). Just modify the script to add the above functionality. Make sure the code is correct and compiles without errors.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Modified superpmi_aspnet2.py to run each scenario 6 times with different environment variable sets:
1. Dummy=0
2. TieredCompilation=0
3. TieredPGO=0
4. TieredPGO=1, ReadyToRun=0
5. ReadyToRun=0, OSR_HitLimit=0, TC_OnStackReplacement_InitialCounter=10
6. TC_PartialCompilation=1

Each variable is passed as --application.environmentVariables DOTNET_<variable>=<value> to crank.

Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Copilot AI changed the title [WIP] Add multiple scenario runs to superpmi_aspnet2.py Add multiple environment variable sets to aspnet2 SPMI collection Jan 16, 2026
Copilot AI requested a review from EgorBo January 16, 2026 01:01
@EgorBo
Copy link
Member

EgorBo commented Jan 16, 2026

/azp run runtime-coreclr superpmi-collect-test

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@EgorBo EgorBo marked this pull request as ready for review January 16, 2026 14:20
Copilot AI review requested due to automatic review settings January 16, 2026 14:20
@EgorBo
Copy link
Member

EgorBo commented Jan 16, 2026

PTAL @dotnet/jit-contrib @AndyAyersMS added a few variations for benchmarks with different env. knobs.
Similar to what Andy has in his TE aspnet script already.

@EgorBo EgorBo requested a review from AndyAyersMS January 16, 2026 14:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modifies the superpmi_aspnet2.py script to run ASP.NET benchmarks multiple times with different JIT configuration environment variables for comprehensive SPMI (SuperPMI) data collection. The script previously ran each benchmark scenario once; now it runs each scenario with multiple environment variable configurations.

Changes:

  • Modified the run_crank_scenario function to accept and process custom environment variables
  • Added environment variable sets to configure JIT behavior (TieredCompilation, TieredPGO, ReadyToRun, etc.)
  • Updated the main loop to run each of 4 scenarios with multiple environment configurations

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@EgorBo EgorBo merged commit 7e28f6e into main Jan 16, 2026
100 checks passed
@EgorBo EgorBo deleted the copilot/add-scenario-iterations-aspnet2 branch January 16, 2026 17:51
rosebyte pushed a commit that referenced this pull request Jan 19, 2026
…23242)

## Description

The `superpmi_aspnet2.py` script ran each benchmark scenario only once.
Modified to run each scenario 6 times with different JIT configuration
environment variables to collect comprehensive SPMI data across
compilation modes.

## Changes

- **Modified `run_crank_scenario` signature**: Added `env_vars: dict`
parameter to accept environment variable configurations
- **Added environment variable processing**: Converts dictionary to
`--application.environmentVariables DOTNET_<variable>=<value>` crank
arguments
- **Defined 6 environment variable sets**:
  1. `Dummy=0`
  2. `TieredCompilation=0`
  3. `TieredPGO=0`
  4. `TieredPGO=1, ReadyToRun=0`
5. `ReadyToRun=0, OSR_HitLimit=0,
TC_OnStackReplacement_InitialCounter=10`
  6. `TC_PartialCompilation=1`
- **Updated main loop**: Nested iteration runs each of 4 scenarios with
all 6 environment sets (24 total runs)

## Impact

Before: 4 scenarios × 1 run = 4 total runs  
After: 4 scenarios × 6 env sets = 24 total runs

Each run now displays the active configuration:
```
### Running about-sqlite benchmark (set 1/6: Dummy=0)... ###
### Running about-sqlite benchmark (set 2/6: TieredCompilation=0)... ###
...
```

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `aka.ms`
> - Triggering command: `/usr/bin/curl curl -I -sSL --retry 5
--retry-delay 2 --connect-timeout 15 REDACTED` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/dotnet/runtime/settings/copilot/coding_agent)
(admins only)
>
> </details>

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> # Add more scenarios to aspnet2 SPMI collection
> 
> superpmi_aspnet2.py script currently runs all scenarios just once
(e.g. "about-sqlite", "json", etc). I want you to runeach scenario
multiple times with different sets of environment variables here are the
sets:
> 
> ```
> Dummy=0
> TieredCompilation=0
> TieredPGO=0
> TieredPGO=1, ReadyToRun=0
> ReadyToRun=0, OSR_HitLimit=0, TC_OnStackReplacement_InitialCounter=10
> TC_PartialCompilation=1
> ```
> 6 sets in total (some of them have multiple variables).
> 
> each variable is basically extra `--application.environmentVariables
DOTNET_<variable>=<value>` argument passed to crank.
> 
> You don't have to build the whole runtime or run the script (it
requires a complex setup). Just modify the script to add the above
functionality. Make sure the code is correct and compiles without
errors.


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com>
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@EgorBo EgorBo added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants