# janestreet/magic-trace

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/janestreet-magic-trace).**

6,108 stars · 195 forks · OCaml · MIT

## Links

- GitHub: https://github.com/janestreet/magic-trace
- Homepage: https://magic-trace.org
- awesome-repositories: https://awesome-repositories.com/repository/janestreet-magic-trace.md

## Topics

`intel` `introspection` `performance-tools` `profile` `tracing` `visualizer` `x86`

## Description

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

## Tags

### System Administration & Monitoring

- [Intel Processor Trace Captures](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/observability-platforms/metric-performance-monitors/infrastructure-metrics/intel-processors/intel-processor-trace-captures.md) — Records every function call by decoding compressed control-flow packets from Intel CPU hardware at nanosecond granularity.
- [Trace Snapshot Capturers](https://awesome-repositories.com/f/system-administration-monitoring/diagnostic-tools/diagnostics/execution-tracers/kernel-tracing-frameworks/system-call-tracing/trace-recording/trace-snapshot-capturers.md) — Captures high-resolution snapshots of program execution using Intel Processor Trace at nanosecond granularity. ([source](https://github.com/janestreet/magic-trace/wiki/Unsolicited-reviews))
- [Ring Buffer Control-Flow Snapshots](https://awesome-repositories.com/f/system-administration-monitoring/diagnostic-tools/diagnostics/execution-tracers/kernel-tracing-frameworks/system-call-tracing/trace-recording/trace-snapshot-capturers/ring-buffer-control-flow-snapshots.md) — Records every function call into a ring buffer and snapshots it on trigger for interactive timeline analysis. ([source](https://cdn.jsdelivr.net/gh/janestreet/magic-trace@master/README.md))
- [Full Function Call Recorders](https://awesome-repositories.com/f/system-administration-monitoring/function-monitoring/call-graph-visualizers/function-call-mapping/full-function-call-recorders.md) — Records every function call made by a process using Intel Processor Trace hardware for complete execution histories. ([source](https://github.com/janestreet/magic-trace/wiki))
- [Intel Processor Trace Execution Tracers](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/execution-tracing-analysis/execution-tracing/intel-processor-trace-execution-tracers.md) — Captures every function call a process makes using Intel Processor Trace to diagnose sub-microsecond performance issues.
- [Running Process Tracers](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/execution-tracing-analysis/execution-tracing/process-lifecycle-tracing/running-process-tracers.md) — Attaches to running Linux processes to capture high-resolution traces of every function call using Intel Processor Trace. ([source](https://github.com/janestreet/magic-trace/wiki/Overhead))
- [Function-Call Triggered Snapshots](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/execution-tracing-analysis/execution-tracing/trigger-based-tracing-lifecycles/function-call-triggered-snapshots.md) — Snapshots the control-flow ring buffer when a specified function is called or on manual interrupt for targeted analysis.
- [Function-Level Execution Diagnosis](https://awesome-repositories.com/f/system-administration-monitoring/network-bottleneck-diagnosis/function-level-execution-diagnosis.md) — Revealing function-level execution details invisible to sampling profilers for precise identification of slow code paths.
- [Hardware-Assisted Function Traces](https://awesome-repositories.com/f/system-administration-monitoring/user-space-function-tracing/function-io-tracing/hardware-assisted-function-traces.md) — Provides nanosecond-resolution function call traces using Intel Processor Trace hardware for performance diagnosis. ([source](https://cdn.jsdelivr.net/gh/janestreet/magic-trace@master/README.md))
- [Execution Event Correlation](https://awesome-repositories.com/f/system-administration-monitoring/hardware-performance-monitoring/hardware-latency-detectors/execution-event-correlation.md) — Records architectural event counts alongside execution traces to correlate code paths with CPU events.
- [Call Stack Samplers](https://awesome-repositories.com/f/system-administration-monitoring/interval-based-resource-sampling/call-stack-samplers.md) — Periodically captures call stack snapshots to build statistical profiles of where a program spends its time. ([source](https://github.com/janestreet/magic-trace/wiki))
- [Multi-Language Execution Tracers](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/execution-tracing-analysis/execution-tracing/multi-language-execution-tracers.md) — Traces function calls across OCaml, C, C++, Rust, and Python in mixed-language programs.
- [Process Attachment Tools](https://awesome-repositories.com/f/system-administration-monitoring/process-attachment-tools.md) — Attaches to an already-running process and captures its execution trace without restarting it. ([source](https://github.com/janestreet/magic-trace/wiki))
- [Hardware Event Samplers](https://awesome-repositories.com/f/system-administration-monitoring/trace-sampling/hardware-event-samplers.md) — Captures sampled hardware events like branch and cache misses and displays them as separate tracks in the trace. ([source](https://github.com/janestreet/magic-trace/wiki/Sampling-architectural-events))
- [Sampling Callstack Tracers](https://awesome-repositories.com/f/system-administration-monitoring/trace-sampling/sampling-callstack-tracers.md) — Captures callstacks at intervals using sampling as an alternative to Intel Processor Trace for machines without PT support. ([source](https://github.com/janestreet/magic-trace/wiki/Sampling-mode))
- [Triggered Function Snapshots](https://awesome-repositories.com/f/system-administration-monitoring/user-space-function-tracing/function-io-tracing/triggered-function-snapshots.md) — Snapshots the control-flow ring buffer when a user-specified function is called for targeted code path analysis. ([source](https://cdn.jsdelivr.net/gh/janestreet/magic-trace@master/README.md))
- [Post-Request Completion Snapshots](https://awesome-repositories.com/f/system-administration-monitoring/user-space-function-tracing/function-io-tracing/triggered-function-snapshots/post-request-completion-snapshots.md) — Interrupt the application for approximately 10 microseconds only after a user request is fully serviced, preventing snapshot overhead from affecting end-user experience. ([source](https://github.com/janestreet/magic-trace/wiki/Overhead))

### Part of an Awesome List

- [Multi-Language Symbol Resolvers](https://awesome-repositories.com/f/awesome-lists/devtools/unpacking-and-deobfuscation/trace-symbol-resolvers/debug-symbol-resolvers/multi-language-symbol-resolvers.md) — Resolves function names across OCaml, C, C++, Rust, and Python using debug symbols and JIT perf maps.
- [Manual Interrupt Trace Triggers](https://awesome-repositories.com/f/awesome-lists/data/backend-as-a-service/heap-profile-importers/on-demand-snapshot-triggers/manual-interrupt-trace-triggers.md) — Snapshots the control-flow ring buffer on Ctrl+C to capture program state at an arbitrary moment. ([source](https://cdn.jsdelivr.net/gh/janestreet/magic-trace@master/README.md))
- [Interactive Trace Viewers](https://awesome-repositories.com/f/awesome-lists/devtools/debugging-and-tracing/interactive-trace-viewers.md) — Ships a web-based interactive timeline viewer with zoom, pan, measurement, and annotation tools for trace exploration. ([source](https://cdn.jsdelivr.net/gh/janestreet/magic-trace@master/README.md))

### Business & Productivity Software

- [Call Stack Timelines](https://awesome-repositories.com/f/business-productivity-software/chronological-timelines/call-stack-timelines.md) — Provides an interactive timeline viewer for exploring recorded call stacks with zoom, pan, and measurement tools. ([source](https://cdn.jsdelivr.net/gh/janestreet/magic-trace@master/README.md))

### Development Tools & Productivity

- [Performance Profiling](https://awesome-repositories.com/f/development-tools-productivity/performance-profiling.md) — Reveals function-level execution details invisible to sampling profilers for precise bottleneck identification. ([source](https://github.com/janestreet/magic-trace/wiki))
- [Multi-Backend Callstack Reconstructors](https://awesome-repositories.com/f/development-tools-productivity/trace-event-callstack-attachments/multi-backend-callstack-reconstructors.md) — Rebuilds callstacks from sampled data using LBR, DWARF, or frame pointers with different depth and compatibility trade-offs. ([source](https://github.com/janestreet/magic-trace/wiki/Sampling-mode))

### Networking & Communication

- [Trace Ring Buffer Snapshots](https://awesome-repositories.com/f/networking-communication/packet-capture-engines/ring-buffer-capture/trace-ring-buffer-snapshots.md) — Maintains a circular buffer of trace data frozen on a trigger event to capture execution history leading up to that moment.

### Programming Languages & Runtimes

- [Intel Processor Trace Profilers](https://awesome-repositories.com/f/programming-languages-runtimes/execution-flow-tracing/intel-processor-trace-profilers.md) — Provides nanosecond-granularity execution traces using Intel Processor Trace hardware for performance diagnosis.
- [Program Execution Tracing](https://awesome-repositories.com/f/programming-languages-runtimes/program-execution-tracing.md) — Displays a full zoomable trace of all function calls to show program behavior during execution windows. ([source](https://github.com/janestreet/magic-trace/wiki/Unsolicited-reviews))
- [Multi-Backend Callstack Reconstructors](https://awesome-repositories.com/f/programming-languages-runtimes/callstack-navigation/multi-backend-callstack-reconstructors.md) — Rebuilds call stacks from sampled data using LBR, DWARF, or frame pointers with different depth and compatibility trade-offs.
- [Multi-Language Trace Resolvers](https://awesome-repositories.com/f/programming-languages-runtimes/language-interoperability/native-c-interoperability/c-function-bindings/rust-to-c-function-exposures/multi-language-trace-resolvers.md) — Traces function calls across OCaml, C, C++, Rust, and Python in mixed-language programs. ([source](https://github.com/janestreet/magic-trace/wiki/Supported-platforms,-programming-languages,-and-runtimes))

### User Interface & Experience

- [Execution Trace Visualizers](https://awesome-repositories.com/f/user-interface-experience/execution-trace-visualizers.md) — Ships an interactive web-based timeline viewer for exploring captured execution traces with zoom and measurement.
- [Interactive Timeline Visualizations](https://awesome-repositories.com/f/user-interface-experience/interactive-timeline-visualizations.md) — Serves captured traces as an interactive HTML timeline in the browser with zoom, pan, measurement, and annotation tools.

### Operating Systems & Systems Programming

- [Trace Timer Resolution Adjusters](https://awesome-repositories.com/f/operating-systems-systems-programming/high-resolution-timers/trace-timer-resolution-adjusters.md) — Reduce memory bandwidth consumption of Intel PT tracing by lowering the timing resolution to decrease overall performance overhead. ([source](https://github.com/janestreet/magic-trace/wiki/Overhead))
