Function Call Tracing

Community

Trace C/C++ function calls with Perfetto.

Authorgadievron
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Trace all function calls in C/C++ programs to generate per-thread logs for Perfetto visualization.

Core Features & Use Cases

  • Instrumentation Library (trace_instrument.c) captures function entry/exit, writes per-thread logs.
  • Perfetto Converter (trace_to_perfetto.cpp) converts logs to Perfetto Chrome JSON format.
  • Use Case: Profiling multi-threaded applications to visualize call graphs and performance hotspots in Perfetto.

Quick Start

  1. Copy trace_instrument.c and trace_to_perfetto.cpp to your project.
  2. Build the instrumentation library and your project.
  3. Enable -finstrument-functions in CFLAGS and link with -ltrace and -lpthread as needed.
  4. Run your program to generate trace_<tid>.log files.
  5. Convert logs to Perfetto: ./trace_to_perfetto trace_*.log -o trace.json and view it at ui.perfetto.dev.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Function Call Tracing
Download link: https://github.com/gadievron/raptor/archive/main.zip#function-call-tracing

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.