ring_buffer_entries_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« ring_buffer_entries_cpu β€” like, the Kernel API Manual page you actually wanna read πŸ’«

okay so bestie, welcome to the Kernel API Manual corner of the internet, section 9, and today's main character is ring_buffer_entries_cpu. no cap, this one's a little function with a very specific job and i'm obsessed with how unbothered it is about it. ✨


πŸŽ€ NAME πŸŽ€

ring_buffer_entries_cpu β€” get the number of entries in a cpu buffer

like literally that's it, that's the whole personality. it counts the entries in a cpu buffer. slay. πŸ’…


🌸 SYNOPSIS 🌸

unsigned long ring_buffer_entries_cpu (struct trace_buffer *buffer , int cpu );

look at her. returning an unsigned long, taking a struct trace_buffer *buffer and an int cpu. clean lines, no drama, ate. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • buffer β€” the ring buffer itself, the whole vibe, the main character we're poking at πŸ’–
  • cpu β€” the per CPU buffer you wanna get the entries from. you're picking which cpu's little corner of the world you care about 🎯

πŸ”₯ SEE ALSO πŸ”₯

and now for the group chat roll call, because this function does not exist in a vacuum, she has friends:

Kernel file ./kernel/trace/ring_buffer.c β€” that's where she lives, go say hi 🏠

ring_buffer_event_length(9), ring_buffer_event_data(9), rb_page_capacity(9), rb_subbuf_capacity(9), rb_subbuf_max_data_size(9), rb_subbuf_start(9), ring_buffer_event_time_stamp(9), ring_buffer_nr_dirty_pages(9), ring_buffer_wake_waiters(9), ring_buffer_wait(9), ring_buffer_poll_wait(9), rb_check_pages(9), rb_validate_buffer(9), __ring_buffer_alloc(9), __ring_buffer_alloc_range(9), __ring_buffer_alloc_remote(9), ring_buffer_free(9), ring_buffer_resize(9), rb_update_event(9), ring_buffer_nest_start(9), ring_buffer_nest_end(9), ring_buffer_unlock_commit(9), ring_buffer_lock_reserve(9), ring_buffer_discard_commit(9), ring_buffer_write(9), ring_buffer_record_disable(9), ring_buffer_record_enable(9), ring_buffer_record_off(9), ring_buffer_record_on(9), ring_buffer_record_is_on(9), ring_buffer_record_is_set_on(9), ring_buffer_record_is_on_cpu(9), ring_buffer_record_disable_cpu(9), ring_buffer_record_enable_cpu(9), ring_buffer_oldest_event_ts(9), ring_buffer_bytes_cpu(9), ring_buffer_overrun_cpu(9), ring_buffer_commit_overrun_cpu(9), ring_buffer_dropped_events_cpu(9), ring_buffer_read_events_cpu(9), ring_buffer_entries(9), ring_buffer_overruns(9), ring_buffer_iter_reset(9), ring_buffer_iter_empty(9), ring_buffer_peek(9), ring_buffer_iter_peek(9), ring_buffer_consume(9), ring_buffer_read_start(9), ring_buffer_read_finish(9), ring_buffer_iter_advance(9), ring_buffer_size(9), ring_buffer_max_event_size(9), ring_buffer_reset_cpu(9), ring_buffer_reset_online_cpus(9), ring_buffer_reset(9), ring_buffer_empty(9), ring_buffer_empty_cpu(9), ring_buffer_swap_cpu(9), ring_buffer_alloc_read_page(9), ring_buffer_free_read_page(9), ring_buffer_read_page(9), ring_buffer_read_page_data(9), ring_buffer_read_page_size(9), ring_buffer_subbuf_size_get(9), ring_buffer_subbuf_order_get(9), ring_buffer_subbuf_order_set(9)

that's the whole squad, iykyk 🌈


lowkey reminder: every one of those is a real function with a real (9) section number and i did not make any of them up. don't come for me πŸ’€

okay that's the page!! πŸ’– this lil beauty comes to you from the source ./kernel/trace, dated October 2026, and it's ring_buffer_entries_cpu(9) forever and always. go forth and count those entries, bestie β€” periodt. βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from