rb_ctx
ASSERT_TRUE(rb_ctx.found, "found_test_ws_in_rb");
ASSERT_GT(rb_ctx.active_time_ns, 0, "active_time_gt_0");
ASSERT_GT(rb_ctx.total_time_ns, 0, "total_time_gt_0");
unlock_ws(rb_ctx.name);
struct rb_ctx *rb_ctx = ctx;
if (strcmp(e->name, rb_ctx->name) == 0) {
rb_ctx->found = true;
rb_ctx->active_time_ns = e->active_time_ns;
rb_ctx->total_time_ns = e->total_time_ns;
struct rb_ctx rb_ctx = {
rb = ring_buffer__new(bpf_map__fd(skel->maps.rb), process_sample, &rb_ctx, NULL);
if (!ASSERT_OK(lock_ws(rb_ctx.name), "lock_ws"))
static __always_inline struct rb_ctx __rb_event_reserve(__u32 sz)
struct rb_ctx rb_ctx = {};
return rb_ctx;
rb_ctx.rb = rb;
bpf_ringbuf_reserve_dynptr(rb, sz, 0, &rb_ctx.dptr);
return rb_ctx;
static __noinline void __rb_event_submit(struct rb_ctx *ctx)
struct rb_ctx event_ctx = __rb_event_reserve(256);