Function report |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-28 11:55:05 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rb_get_reader_page
Proto:static struct buffer_page *rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
Type:struct buffer_page
Parameter:
Type | Parameter | Name |
---|---|---|
struct ring_buffer_per_cpu * | cpu_buffer |
3674 | struct buffer_page * reader = NULL |
3677 | nr_loops = 0 |
3680 | local_irq_save(flags) |
3681 | r sched/core.c and kernel_lock.c: ( & lock) |
3683 | again : |
3690 | If uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, ++nr_loops > 3) Then |
3695 | reader = reader_page |
3698 | If dex for next read < Size is determined by what has been committed Then Go to out |
3702 | If uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, dex for next read > Size is determined by what has been committed ) Then Go to out |
3707 | reader = NULL |
3708 | If committed pages == reader_page Then Go to out |
3718 | local_set( & dex for next write , 0) |
3719 | local_set( & ries on this page , 0) |
3720 | local_set( & write committed index , 0) |
3721 | al end of data = 0 |
3723 | spin : |
3727 | reader = rb_set_head_page(cpu_buffer) |
3730 | next = _list_head - remove any bit |
3752 | smp_mb() |
3753 | overwrite = local_read( & (overrun)) |
3766 | ret = rb_head_page_replace(reader, reader_page) |
3779 | prev = list of buffer pages |
3780 | rb_inc_page(cpu_buffer, & ad from head ) |
3782 | local_inc( & pages_read) |
3785 | reader_page = reader |
3786 | dex for next read = 0 |
3788 | If overwrite != last_overrun Then |
3789 | lost_events = overwrite - last_overrun |
3790 | last_overrun = overwrite |
3793 | Go to again |
3795 | out : |
3797 | If reader && dex for next read == 0 Then read_stamp = page time stamp |
3800 | arch_spin_unlock( & lock) |
3801 | local_irq_restore(flags) |
3803 | Return reader |
Name | Describe |
---|---|
rb_advance_reader | |
rb_buffer_peek | |
ring_buffer_read_page | g_buffer_read_page - extract a page from the ring buffer*@buffer: buffer to extract from*@data_page: the page to use allocated from ring_buffer_alloc_read_page*@len: amount to extract*@cpu: the cpu of the buffer to extract |
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 |