summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 12:07:53 -0300
committerGabriel Schneider <[email protected]>2026-11-10 12:09:56 -0300
commita10e1691dbe5b944812dc8761a450636bc247e3d (patch)
tree68b4ae8b519496dd35a94bb799f3fd564ec42569 /include
parent08d36ff6295a5f04e503ffe0aaa8a4e712af865f (diff)
downloadcomputeranim-a10e1691dbe5b944812dc8761a450636bc247e3d.tar.gz
computeranim-a10e1691dbe5b944812dc8761a450636bc247e3d.zip
agent: bench-agent and its numbers, hooks with names, an archive cc can link
zig build bench-agent runs each capability against its native loop and prints what it costs and writes; README has the table. ztrace run looks at the ring a little longer before sleeping (a target that finds the tracer asleep pays a futex wake an event). A hooked function's name is defined as the string of its address, so the recorder's call stack reads fib. A static link without libc's malloc says which -u to add. The archive carries no stack probes, so cc links it in debug builds too. Tests for --wrap (musl, zig cc) and for a recording that fills. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/ztrace.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ztrace.h b/include/ztrace.h
index fc6f263..1b7893c 100644
--- a/include/ztrace.h
+++ b/include/ztrace.h
@@ -8,6 +8,9 @@
* -Wl,--wrap=malloc,--wrap=calloc,--wrap=realloc,--wrap=free
* -Wl,--wrap=posix_memalign,--wrap=aligned_alloc,--wrap=memalign
* -Wl,--wrap=pthread_create,--wrap=fork
+ * and, when libc is linked statically too (glibc with -static), so that its
+ * own are still there to call:
+ * -Wl,-u,malloc,-u,pthread_create,-u,fork
*/
#ifndef ZTRACE_H
#define ZTRACE_H