The key_t structure was too large for the BPF stack (512 bytes limit),
causing verification failures. Fixed by:
- Adding BPF_MAP_TYPE_PERCPU_ARRAY for key storage
- Moving key allocation from stack to per-CPU map
- Replacing __builtin_memset with manual initialization loop
(memset not supported in eBPF)
Test results: Successfully profiled Python process, captured 31 unique
native stack traces over 3 seconds at 49 Hz sampling frequency.
🤖 Generated with Claude Code (https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>