Function report |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-28 11:54:36 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rb_reserve_next_event
Proto:static __always_inline struct ring_buffer_event *rb_reserve_next_event(struct ring_buffer *buffer, struct ring_buffer_per_cpu *cpu_buffer, unsigned long length)
Type:struct ring_buffer_event
Parameter:
Type | Parameter | Name |
---|---|---|
struct ring_buffer * | buffer | |
struct ring_buffer_per_cpu * | cpu_buffer | |
unsigned long | length |
2877 | nr_loops = 0 |
2880 | rb_start_commit(cpu_buffer) |
2897 | length = rb_calculate_event_length(length) |
2898 | again : |
2899 | add_timestamp = 0 |
2900 | delta = 0 |
2911 | If uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ++nr_loops > 1000) Then Go to out_fail |
2914 | ts = rb_time_stamp(buffer) |
2915 | diff = ts - write_stamp |
2920 | If ring_buffer_time_stamp_abs(buffer) Then |
2922 | rb_handle_timestamp(cpu_buffer, & info) |
2923 | Else If Value is more likely to compile time(ts >= write_stamp) Then |
2930 | event = __rb_reserve_next(cpu_buffer, & info) |
2932 | If Value for the false possibility is greater at compile time(PTR_ERR(event) == - EAGAIN) Then |
2933 | If add_timestamp Then length -= RB_LEN_TIME_EXTEND |
2935 | Go to again |
2941 | Return event |
2943 | out_fail : |
2944 | rb_end_commit(cpu_buffer) |
2945 | Return NULL |
Name | Describe |
---|---|
ring_buffer_lock_reserve | g_buffer_lock_reserve - reserve a part of the buffer*@buffer: the ring buffer to reserve from*@length: the length of the data to reserve (excluding event header)* Returns a reserved event on the ring buffer to copy directly to |
ring_buffer_write | g_buffer_write - write data to the buffer without reserving*@buffer: The ring buffer to write to |
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 |