Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\ring_buffer.c Create Date:2022-07-28 13:42:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Copy out AUX data from an AUX handle.

Proto:long perf_output_copy_aux(struct perf_output_handle *aux_handle, struct perf_output_handle *handle, unsigned long from, unsigned long to)

Type:long

Parameter:

TypeParameterName
struct perf_output_handle *aux_handle
struct perf_output_handle *handle
unsigned longfrom
unsigned longto
572  len = 0
573  rb = rb
576  from &= (aux_nr_pages << PAGE_SHIFT determines the page size ) - 1
577  to &= (aux_nr_pages << PAGE_SHIFT determines the page size ) - 1
579  Do
580  tocopy = PAGE_SIZE - offset_in_page(from)
581  If to > from Then tocopy = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(tocopy, to - from)
583  If Not tocopy Then Break
586  addr = aux_pages[from >> PAGE_SHIFT determines the page size ]
587  addr += offset_in_page(from)
589  remainder = perf_output_copy(handle, addr, tocopy)
590  If remainder Then Return -EFAULT
593  len += tocopy
594  from += tocopy
595  from &= (aux_nr_pages << PAGE_SHIFT determines the page size ) - 1
596  When to != from cycle
598  Return len