Skip to content

Conversation

lewing
Copy link
Member

@lewing lewing commented Sep 16, 2025

This pull request adds support for collecting telemetry on the RunAOTCompilation property in both the build targets and the associated telemetry tests. The changes ensure that the value of RunAOTCompilation is now tracked and included in telemetry output, which will help with diagnostics and analytics related to Ahead-Of-Time (AOT) compilation.

Telemetry enhancements:

  • Added a new TFTelemetry item for RunAOTCompilation in the Microsoft.NET.TargetFrameworkInference.targets file to capture its value during builds.
  • Updated the CreateTargetFrameworkEvalTelemetryJson method in GivenThatWeWantToBuildANetCoreAppForTelemetry.cs to include the runAotCompilation parameter and property in the generated telemetry JSON.

@lewing
Copy link
Member Author

lewing commented Sep 16, 2025

cc @danroth27

@vitek-karas
Copy link
Member

/cc @matouskozak

@matouskozak matouskozak self-requested a review September 18, 2025 06:07
Copy link
Member

@matouskozak matouskozak left a comment

Choose a reason for hiding this comment

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

Do you need to add interpreter tracking as well or is it enough to track AOT for WASM and consider that interpreter is used when RunAotCompiliaton=false? Not sure what are all the possible configurations for WASM...

FYI: In Workload telemetry there is:

<_WorkloadUsesInterpreter>$(MonoForceInterpreter)</_WorkloadUsesInterpreter>
<_WorkloadUsesInterpreter Condition="'$(_WorkloadUsesInterpreter)' == '' and '$(UseInterpreter)' == 'true'">true</_WorkloadUsesInterpreter>
<_WorkloadUsesInterpreter Condition="'$(_WorkloadUsesInterpreter)' == '' and '$(RunAOTCompilation)' != 'true' and ('$(_WorkloadUsesBlazorWasm)' == 'true' or '$(_WorkloadUsesWasmSDK)' == 'true')">true</_WorkloadUsesInterpreter>

@lewing lewing requested a review from Copilot September 29, 2025 21:55
Copy link
Contributor

@Copilot 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 adds telemetry tracking for the RunAOTCompilation property to monitor Ahead-Of-Time compilation usage alongside existing AOT-related telemetry. The changes ensure that mono AOT compilation scenarios are now captured in diagnostic data.

  • Added RunAOTCompilation to the target framework telemetry collection
  • Updated test infrastructure to include the new telemetry parameter in JSON generation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets Added RunAOTCompilation property to TFTelemetry collection
test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppForTelemetry.cs Updated telemetry JSON generation method to include runAotCompilation parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants