Skip to content

refcol: add JSON trace output mode to the ITT API reference collector#238

Open
eparshut wants to merge 10 commits into
intel:masterfrom
eparshut:refcol_json
Open

refcol: add JSON trace output mode to the ITT API reference collector#238
eparshut wants to merge 10 commits into
intel:masterfrom
eparshut:refcol_json

Conversation

@eparshut

Copy link
Copy Markdown
Contributor

Summary

This PR introduces an experimental capability to the ITT API reference collector: in addition to the existing plain-text log, it can now produce a JSON file that opens directly in Perfetto.
Developers who instrument their code with the ITT API can now visualize their traces with zero extra tooling: no profiler, no additional binaries, no conversion step. Point the reference collector at your app, set one environment variable, run, and drag the resulting trace file into Perfetto to see your tasks, regions, frames, counters, and metadata on a timeline.

Changes:

  • New JSON output mode, opt-in via EXP_LIBITTNOTIFY_GEN_JSON=1. Default behavior (plain-text log) is unchanged.
  • Trace event mapping for the core ITT primitives: tasks, regions, frames, counters, metadata with process/thread/timestamp attribution.
  • Smoke test covering both plain text and JSON modes to guard the feature.
  • Docs updated (README + reference docs).

How to use:

python buildall.py --refcol
export INTEL_LIBITTNOTIFY64=<build_dir>/libittnotify_refcol.so
export EXP_LIBITTNOTIFY_GEN_JSON=1
./run_itt_instrumented_app
# open the generated libittnotify_refcol_<timestamp>.json in https://ui.perfetto.dev: (screenshot below)
image

@eparshut
eparshut requested a review from a team July 17, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant