Repository navigation
Description
Decision
Remove FastTiming instead of integrating its native recorder and output formats with another telemetry system.
.NET for Android already uses dotnet-trace to investigate managed startup and JIT performance. CoreCLR's existing EventPipe providers cover the useful standardized runtime data, and the remaining Android-specific measurements can use managed EventSource instrumentation where they are still valuable.
We accept losing the custom measurements for pre-CoreCLR Android host initialization, coreclr_initialize(), and assembly-store decompression. They are not important enough to retain the native timing infrastructure.
Dropping MonoVM support also removes the need to design a cross-runtime replacement.
Coverage decisions
| Current measurement | Decision |
|---|---|
| Assembly loading | Drop the custom measurement and use CoreCLR loader/binder EventPipe events. |
| JIT | Drop the MonoVM timing path and use CoreCLR JIT EventPipe events. |
| GC bridge | Add managed Start/Stop events in a separate PR, building on #12258. |
| LLVM-IR typemap lookups | Add managed EventSource instrumentation in a separate PR. |
| Trimmable typemap lookups | Add managed EventSource instrumentation in a separate PR. |
Runtime.register |
Drop without replacement. |
JNIEnv.Initialize |
Drop without replacement. |
Android.Runtime.TimingLogger |
Mark obsolete now, retain behavior temporarily, and remove in a later breaking release. |
| Android assembly decompression and assembly-store memcpy | Drop without replacement. |
coreclr_initialize() |
Drop without replacement. |
Whole native Runtime.initInternal |
Drop without replacement. |
| FastTiming initialization and self-overhead measurements | Drop. |
The GC bridge is not currently measured by FastTiming. Its EventSource instrumentation is new coverage rather than a migration.
Android.Runtime.TimingLogger
Android.Runtime.TimingLogger is a shipped public API for timing arbitrary managed scopes through the native timing implementation. There are no in-repository consumers.
The API should be marked obsolete with guidance to use standard .NET diagnostics such as Stopwatch or EventSource, depending on whether the caller needs a local duration or trace integration. Its native implementation remains until the API is removed later.
This does not affect Android.Util.TimingLogger, which is an unrelated Android framework binding.
Removal scope
Remove:
FastTiming,TimingEvent,Timing, event chunk storage, TLS event nesting, formatting, summaries, and dump logic.- CoreCLR and MonoVM FastTiming instrumentation call sites.
- MonoVM
methods.txtJIT timing. monodroid_timing_startandmonodroid_timing_stopafterAndroid.Runtime.TimingLoggeris removed; retain them while the obsolete API remains functional.debug.dotnet.timinganddebug.mono.timing.timing,timing=bare, andtiming=fast-barehandling.- The
mono.android.app.DUMP_TIMING_DATAreceiver and manifest overlay. _AndroidFastTiming.FastTimingTests.- FastTiming-specific documentation and log format descriptions.
No compatibility is required for the timing system properties, broadcast receiver, text output format, timing files, or internal MSBuild property.
Disabled-overhead outcome
Removing FastTiming eliminates its native enabled checks from assembly probing, typemap lookup, registration, and runtime initialization. New managed EventSource instrumentation must use feature-switch and IsEnabled() gating so unused instrumentation can be trimmed and payload work is avoided when no listener is enabled.
Implementation plan
- Mark
Android.Runtime.TimingLoggerobsolete. - Add GC bridge Start/Stop EventSource events based on Add EventPipe interop instrumentation for wrapper lifecycle and GC-bridge reachability #12258.
- Add LLVM-IR typemap EventSource instrumentation.
- Add trimmable typemap EventSource instrumentation.
- Remove all FastTiming instrumentation and infrastructure.
- Remove the timing system properties, logging modes, dump receiver, manifest overlay, tests, and documentation.
- Record the native host size reduction and cross-reference [native] Investigate further CoreCLR host size reductions #12640.
- Remove
Android.Runtime.TimingLoggerand its native entry points in a later breaking release.
Related work
- Add EventPipe interop instrumentation for wrapper lifecycle and GC-bridge reachability #12258 adds EventPipe instrumentation for Java interop lifecycle and GC-bridge reachability.
- [native] Investigate further CoreCLR host size reductions #12640 measured disabling FastTiming as reducing the stripped ARM64 CoreCLR host by approximately 25 KB.
- [CoreCLR] FastTiming::start_event corrupts the heap when debug.mono.log=timing (Scudo "invalid chunk state when deallocating") #12437 and [flaky test] FastTimingTests.ConcurrentEventsCanGrowAndDump loses dump completion marker in logcat #12491 become obsolete once FastTiming is removed.
Activity
[-][Investigation] Integrate FastTiming with standardized tracing and metrics[/-][+][native] Remove FastTiming in favor of EventPipe diagnostics[/+]simonrozsival commentedon Sep 30, 2026
Completed