zbpf
zbpf copied to clipboard
The embeded BPF program can't be used directly
Nowadays, we have to duplicate the original BPF program as follows:
const obj_bytes = @embedFile("@perf_event");
const bytes = try allocator.dupe(u8, obj_bytes);
defer allocator.free(bytes);
Once https://github.com/ziglang/zig/issues/4680 is resolved, this WA could be removed.