Function report |
Source Code:kernel\events\ring_buffer.c |
Create Date:2022-07-28 13:42:38 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rb_alloc_aux
Proto:int rb_alloc_aux(struct ring_buffer *rb, struct perf_event *event, unsigned long pgoff, int nr_pages, long watermark, int flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct ring_buffer * | rb | |
struct perf_event * | event | |
unsigned long | pgoff | |
int | nr_pages | |
long | watermark | |
int | flags |
668 | overwrite = Not (flags & Buffer handling ) |
669 | node = If cpu == -1 Then -1 Else cpu_to_node(cpu) |
672 | If Not has_aux(event) Then Return -EOPNOTSUPP |
685 | If Not overwrite Then |
692 | aux_pages = kcalloc_node(nr_pages, size of * , GFP_KERNEL, node) |
698 | When aux_nr_pages < nr_pages cycle |
703 | page = rb_alloc_aux_page(node, order) |
707 | When last > aux_nr_pages cycle aux_pages[aux_nr_pages] = page_address(page++) |
718 | If capabilities & PERF_PMU_CAP_AUX_NO_SG && overwrite Then |
720 | page = virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(aux_pages[0]) |
722 | If page_private(page) != max_order Then Go to out |
731 | ret = 0 |
741 | aux_overwrite = overwrite |
742 | aux_watermark = watermark |
744 | If Not aux_watermark && Not aux_overwrite Then aux_watermark = nr_pages << PAGE_SHIFT determines the page size - 1 |
747 | out : |
750 | Else __rb_free_aux(rb) |
753 | Return ret |
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 |