Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Instrument C/C++ with -finstrument-functions for execution tracing and Perfetto visualisation
.claude/skills/gadievron-function-call-tracing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | -21% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 61% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -6% | 0% |
Trace all function calls in C/C++ programs with per-thread logs and Perfetto visualization.
Captures function entry/exit, writes per-thread logs.
Build:
bashgcc -c -fPIC trace_instrument.c -o trace_instrument.o gcc -shared trace_instrument.o -o libtrace.so -ldl -lpthread
Converts logs to Chrome JSON for Perfetto UI.
Build:
bashg++ -O3 -std=c++17 trace_to_perfetto.cpp -o trace_to_perfetto
makefileCFLAGS += -finstrument-functions -g LDFLAGS += -L. -ltrace -ldl -lpthread
bashmake
bashexport LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./program # Creates trace_<tid>.log files
bash./trace_to_perfetto trace_*.log -o trace.json # Open trace.json in ui.perfetto.dev
[seq] [timestamp] [dots] [ENTRY|EXIT!] function_name
[0] [1.000000000] [ENTRY] main
[1] [1.000050000] . [ENTRY] helper
[2] [1.000100000] . [EXIT!] helper
[3] [1.000150000] [EXIT!] maintrace_instrument.c and trace_to_perfetto.cpp to project-finstrument-functions to CFLAGS-L. -ltrace -ldl -lpthread to LDFLAGSLD_LIBRARY_PATH and run./trace_to_perfetto trace_*.log -o trace.jsonMakefile: Add flags conditionally
makefileENABLE_TRACE ?= 0 ifeq ($(ENABLE_TRACE),1) CFLAGS += -finstrument-functions -g LDFLAGS += -L. -ltrace -ldl -lpthread endif
CMake: Add option
cmakeoption(ENABLE_TRACE "Enable tracing" OFF) if(ENABLE_TRACE) add_compile_options(-finstrument-functions -g) link_libraries(trace dl pthread) endif()
Function ENTRY → "B" (begin) event Function EXIT! → "E" (end) event All threads aligned by timestamp in single file.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-08 | fail→pass | 13,197 | 5,830 | -56% | 1 | 1 | 0% | 2,294 | 1,821 | -21% | 0 | 0 | — |
case-01 | fail→pass | 24,876 | 16,836 | -32% | 1 | 1 | 0% | 5,219 | 4,730 | -9% | 0 | 0 | — |
case-02 | fail→pass | 25,912 | 18,259 | -30% | 1 | 1 | 0% | 5,717 | 5,161 | -10% | 0 | 0 | — |
case-03 | fail→pass | 18,584 | 18,482 | -1% | 1 | 1 | 0% | 3,000 | 4,820 | +61% | 0 | 0 | — |
case-13 | fail→pass | 6,324 | 2,016 | -68% | 1 | 1 | 0% | 1,202 | 1,133 | -6% | 0 | 0 | — |
case-04 | pass→pass | 4,877 | 5,108 | +5% | 1 | 1 | 0% | 959 | 1,800 | +88% | 0 | 0 | — |
case-05 | pass→pass | 5,841 | 4,467 | -24% | 1 | 1 | 0% | 1,157 | 1,582 | +37% | 0 | 0 | — |
case-06 | pass→pass | 7,333 | 4,715 | -36% | 1 | 1 | 0% | 1,456 | 1,760 | +21% | 0 | 0 | — |
case-07 | fail→pass | 6,617 | 3,231 | -51% | 1 | 1 | 0% | 1,311 | 1,468 | +12% | 0 | 0 | — |
case-09 | pass→pass | 8,531 | 4,198 | -51% | 1 | 1 | 0% | 1,583 | 1,542 | -3% | 0 | 0 | — |
case-10 | fail→pass | 8,603 | 3,822 | -56% | 1 | 1 | 0% | 1,624 | 1,486 | -8% | 0 | 0 | — |
case-11 | pass→pass | 6,394 | 3,990 | -38% | 1 | 1 | 0% | 1,198 | 1,500 | +25% | 0 | 0 | — |
case-12 | fail→pass | 11,185 | 1,563 | -86% | 1 | 1 | 0% | 1,926 | 1,049 | -46% | 0 | 0 | — |
case-14 | fail→pass | 9,014 | 6,651 | -26% | 1 | 1 | 0% | 484 | 1,010 | +109% | 0 | 0 | — |
case-15 | pass→pass | 8,192 | 3,123 | -62% | 1 | 1 | 0% | 1,343 | 1,404 | +5% | 0 | 0 | — |
case-16 | fail→pass | 8,665 | 3,218 | -63% | 1 | 1 | 0% | 1,668 | 1,356 | -19% | 0 | 0 | — |
case-17 | fail→pass | 9,737 | 2,513 | -74% | 1 | 1 | 0% | 1,763 | 1,248 | -29% | 0 | 0 | — |
case-18 | pass→pass | 3,379 | 1,592 | -53% | 1 | 1 | 0% | 564 | 1,026 | +82% | 0 | 0 | — |
case-19 | pass→pass | 8,666 | 3,904 | -55% | 1 | 1 | 0% | 1,680 | 1,492 | -11% | 0 | 0 | — |
case-20 | pass→pass | 10,006 | 6,047 | -40% | 1 | 1 | 0% | 2,002 | 2,047 | +2% | 0 | 0 | — |
case-21 | fail→pass | 26,254 | 5,421 | -79% | 1 | 1 | 0% | 971 | 1,811 | +87% | 0 | 0 | — |
case-22 | fail→pass | 15,784 | 11,016 | -30% | 1 | 1 | 0% | 2,898 | 2,789 | -4% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +59 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.