Skip to content

[native] Remove FastTiming in favor of EventPipe diagnostics #12458

Closed

Description

@simonrozsival

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.txt JIT timing.
  • monodroid_timing_start and monodroid_timing_stop after Android.Runtime.TimingLogger is removed; retain them while the obsolete API remains functional.
  • debug.dotnet.timing and debug.mono.timing.
  • timing, timing=bare, and timing=fast-bare handling.
  • The mono.android.app.DUMP_TIMING_DATA receiver 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

Related work

Activity

  1. added
    needs-triage
    on Aug 20, 2026
  2. added this to the .NET 12 milestone on Aug 20, 2026
  3. changed the title [-][Investigation] Integrate FastTiming with standardized tracing and metrics[/-] [+][native] Remove FastTiming in favor of EventPipe diagnostics[/+] on Sep 21, 2026
  4. simonrozsival commented on Sep 30, 2026

    @simonrozsival
    MemberAuthor

    Completed

  5. locked and limited conversation to collaborators on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions