Function report |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-28 11:55:12 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rb_buffer_peek
Proto:static struct ring_buffer_event *rb_buffer_peek(struct ring_buffer_per_cpu *cpu_buffer, u64 *ts, unsigned long *lost_events)
Type:struct ring_buffer_event
Parameter:
Type | Parameter | Name |
---|---|---|
struct ring_buffer_per_cpu * | cpu_buffer | |
u64 * | ts | |
unsigned long * | lost_events |
3882 | nr_loops = 0 |
3886 | again : |
3893 | If uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ++nr_loops > 2) Then Return NULL |
3896 | reader = rb_get_reader_page(cpu_buffer) |
3897 | If Not reader Then Return NULL |
3900 | event = rb_reader_event(cpu_buffer) |
3903 | Case type_len == RINGBUF_TYPE_PADDING |
3904 | If rb_null_event(event) Then uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, 1) |
3914 | Return event |
3916 | Case type_len == RINGBUF_TYPE_TIME_EXTEND |
3918 | rb_advance_reader(cpu_buffer) |
3919 | Go to again |
3921 | Case type_len == RINGBUF_TYPE_TIME_STAMP |
3922 | If ts Then |
3923 | ts = g_buffer_event_time_stamp - return the event's extended timestamp*@event: the event to get the timestamp of* Returns the extended timestamp associated with a data event |
3924 | ring_buffer_normalize_time_stamp(buffer, cpu, ts) |
3928 | rb_advance_reader(cpu_buffer) |
3929 | Go to again |
3933 | ts = read_stamp + time_delta |
3934 | ring_buffer_normalize_time_stamp(buffer, cpu, ts) |
3937 | If lost_events Then lost_events = rb_lost_events(cpu_buffer) |
3939 | Return event |
3941 | Default |
3942 | BUG() |
3945 | Return NULL |
Name | Describe |
---|---|
ring_buffer_peek | g_buffer_peek - peek at the next event to be read*@buffer: The ring buffer to read*@cpu: The cpu to peak at*@ts: The timestamp counter of this event |
ring_buffer_consume | g_buffer_consume - return an event and consume it*@buffer: The ring buffer to get the next event from*@cpu: the cpu to read the buffer from*@ts: a variable to store the timestamp (may be NULL)*@lost_events: a variable to store if events were lost (may be |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |