Merged
Conversation
… (#120535) Fixes #119468 — **Fix indentation in .json files**. ### Summary This PR fixes inconsistent indentation and formatting in various `.json` files across the repository. ### Changes - Reindented all `.json` files to use consistent 2-space (or project-defined) indentation. - Removed extra whitespace and aligned nested objects uniformly. - Ensured no semantic or structural modifications were made to JSON content. --------- Co-authored-by: Viviana Dueñas Chavez <vivianad@microsoft.com> Co-authored-by: Viviana Dueñas <50237907+ViveliDuCh@users.noreply.github.com>
…ts on startup (#123919) - Avoid string comparison against servicing directory name for every asset (assembly, native, or resources) - Avoid copying every `deps_asset_t` asset when building the TPA list This removes ~1000 allocations for startup of an empty console app (linear based on the number of assemblies the app depends on). Local runs of staticconsoletemplate on Windows indicated a difference that was within measurement noise range, but it was consistent across 10 runs of 10 iterations each - combined summary: | Metric | Baseline | Feature | Delta | |--------|----------|---------|-------| | Average | 55.77 ms | 55.48 ms | -0.29 ms (-0.5%) | | Min | 53.28 ms | 53.14 ms | — | | Max | 57.29 ms | 56.24 ms | — | | StdDev | 0.50 ms | 0.35 ms | — | | Rounds Won | 0 | 10 | — |
Context: https://github.com/dotnet/runtime/blob/741b7157472b9a5c83a78f781ccfa8cd39707763/docs/design/features/host-startup-hook.md Context: dotnet/android#10755 Mono does not appear to read the `$DOTNET_STARTUP_HOOKS` env var when calling `System.StartupHookProvider.ProcessStartupHooks()` and only passes in `""`. So, to get the same behavior as other runtimes, you would need to workaround with something like: <RuntimeHostConfigurationOption Include="STARTUP_HOOKS" Value="MyStartupHook" Condition=" '$(UseMonoRuntime)' == 'true' " /> Let's read the env var in Mono so that it works the same way as other runtimes.
External tools interested in connecting to the runtime's diagnostic ports benefit from a low-overhead IO signal that a .NET process is ready to receive IPC commands, instead of trying to IO over all known temp file directories looking for diagnostic ports for each process. Following the discussion in microsoft/one-collect#226, this PR adds a new mapping, `dotnet_ipc_created`, that is created once a .NET process' singular listen port is successfully created. ## Testing userevents runtime tests now work on NativeAOT with the record-trace change microsoft/one-collect#229 ``` mihw@CPC-mihw-6KMZDM:~/repo/runtime$ ./artifacts/tests/coreclr/linux.x64.Release/tracing/userevents/basic/basic/basic.sh BEGIN EXECUTION /home/mihw/repo/runtime/src/tests/Common/scripts/nativeaottest.sh /home/mihw/repo/runtime/artifacts/tests/coreclr/linux.x64.Release/tracing/userevents/basic/basic/ basic.dll '' traceeAssemblyPath: Starting record-trace: sudo -n /home/mihw/repo/runtime/artifacts/tests/coreclr/linux.x64.Release/tracing/userevents/common/userevents_common/record-trace --script-file /home/mihw/repo/runtime/artifacts/tests/coreclr/linux.x64.Release/tracing/userevents/basic/basic/native/../basic.script --out /tmp/tmpBoli5K.nettrace --log-mode console --log-filter error,one_collect::helpers::dotnet::os::linux=debug record-trace started with PID: 1543079 [record-trace] 2026-01-29T22:55:19.967428Z DEBUG one_collect::helpers::dotnet::os::linux: Registered .NET tracepoint: name=OC_DotNet_Microsoft_Windows_DotNETRuntime_1543081_All, callstacks=false, use_names=true Starting tracee process: /home/mihw/repo/runtime/artifacts/tests/coreclr/linux.x64.Release/tracing/userevents/basic/basic/native/basic tracee Tracee process started with PID: 1543083 Waiting for tracee process to exit... [record-trace] 2026-01-29T22:55:20.093460Z DEBUG one_collect::helpers::dotnet::os::linux: Opened diagnostic socket: pid=1543063, nspid=1543063 [record-trace] 2026-01-29T22:55:20.093476Z DEBUG one_collect::helpers::dotnet::os::linux: Opened diagnostic socket: pid=1543063, nspid=1543063 [record-trace] 2026-01-29T22:55:20.094446Z DEBUG one_collect::helpers::dotnet::os::linux: Opened diagnostic socket: pid=1543063, nspid=1543063 [record-trace] Recording started. Press CTRL+C to stop. [record-trace] 2026-01-29T22:55:20.097795Z INFO one_collect::helpers::dotnet::os::linux: Enabled .NET events for process: pid=1543063 [record-trace] 2026-01-29T22:55:20.098955Z DEBUG one_collect::helpers::dotnet::os::linux: Opened diagnostic socket: pid=1543083, nspid=1543083 [record-trace] 2026-01-29T22:55:20.099085Z DEBUG one_collect::helpers::dotnet::os::linux: Opened diagnostic socket: pid=1543083, nspid=1543083 [record-trace] 2026-01-29T22:55:20.100017Z DEBUG one_collect::helpers::dotnet::os::linux: Opened diagnostic socket: pid=1543083, nspid=1543083 [record-trace] 2026-01-29T22:55:20.104842Z INFO one_collect::helpers::dotnet::os::linux: Enabled .NET events for process: pid=1543083 Stopping record-trace with SIGINT. Waiting for record-trace to exit... [record-trace] Recording stopped. [record-trace] Resolving symbols. [record-trace] Finished recording trace. [record-trace] Trace written to /tmp/tmpBoli5K.nettrace Expected: 100 Actual: 100 END EXECUTION - PASSED ```
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )