# janestreet/magic-trace

magic-trace collects and displays high-resolution traces of what a process is doing

Repository: https://github.com/janestreet/magic-trace
Canonical: https://ross.abutalabs.com/products/magic-trace
Homepage: https://magic-trace.org
Language: OCaml
License: MIT
License Family: permissive
Topics: intel, x86, visualizer, tracing, profile, performance-tools, introspection
Last push: 2026-08-19T16:49:41+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 8, longevity 100
- inputs: {"age_days": 1680, "days_push": 14, "days_rel": 507, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6249, forks 209 (observed 2026-08-28T04:09:40.984782+00:00)

## What it is
magic-trace is an OCaml CLI tool that uses Intel Processor Trace to capture high-resolution traces of every function call a process makes, with ~40ns resolution and low overhead. It renders an interactive timeline of call stacks leading up to a chosen point in time, useful for diagnosing latency spikes and pre-crash behavior.

## Use cases
- find why some production requests are slow while others are fast
- trace every function call of a running process without code changes
- see what an application did before it crashed
- snapshot a trace when a specific function is called
- profile a program with low overhead like perf but with full control flow

## When to choose
- you need high-resolution function-level tracing on Linux with Intel PT hardware
- you want to capture a trace of the moments before a crash or slow request
- you can't modify the application to add instrumentation

## When to avoid
- you're on non-x86 hardware or lack Intel Processor Trace support
- you need long-duration traces rather than ~10ms ring-buffer snapshots
- you need a sampling-based statistical profiler across long time windows

## Facets
- artifact type: cli-tool
- maturity: active
- function: tracing, monitoring, developer-tools, cli
- domain: developer-tools, performance
- platform: cli
- tags: intel-processor-trace, profiling, call-stack-timeline, perf, x86, perfetto, command-line, linux

## Member repositories
- janestreet/magic-trace (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:40.984782+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:47:09.128407+00:00, confidence not recorded.
  - readme: https://github.com/janestreet/magic-trace (fetched 2026-08-28T04:09:40.984782+00:00, sha edab268b7f05)
  - homepage: https://magic-trace.org (fetched 2026-08-29T08:43:16.596041+00:00, sha f3b3e1304afb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
