Function report |
Source Code:kernel\trace\ring_buffer.c |
Create Date:2022-07-28 11:53:47 |
Last Modify:2020-03-17 19:30:04 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rb_remove_pages
Proto:static int rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct ring_buffer_per_cpu * | cpu_buffer | |
unsigned long | nr_pages |
1504 | head_bit = 0 |
1506 | raw_spin_lock_irq( & serialize readers ) |
1507 | atomic_inc( & record_disabled) |
1517 | tail_page = list of buffer pages |
1523 | If write to tail == reader_page Then tail_page = _list_head - remove any bit |
1531 | When nr_removed < nr_pages cycle |
1533 | head_bit |= to_remove & RB_PAGE_HEAD |
1560 | read = 0 |
1563 | atomic_dec( & record_disabled) |
1564 | raw_spin_unlock_irq( & serialize readers ) |
1566 | uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, list_empty - tests whether a list is empty*@head: the list to test.) |
1571 | tmp_iter_page = first_page |
1573 | Do |
1574 | cond_resched() |
1576 | to_remove_page = tmp_iter_page |
1577 | rb_inc_page(cpu_buffer, & tmp_iter_page) |
1581 | If page_entries Then |
1588 | local_add(page_entries, & overrun) |
1589 | local_sub(BUF_PAGE_SIZE, & entries_bytes) |
1597 | nr_removed-- |
1599 | When to_remove_page != last_page cycle |
1603 | Return nr_removed == 0 |
Name | Describe |
---|---|
rb_update_pages |
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 |