Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-28 13:36:52
Last Modify:2022-05-20 07:50:19 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:perf_output_sample

Proto:void perf_output_sample(struct perf_output_handle *handle, struct perf_event_header *header, struct perf_sample_data *data, struct perf_event *event)

Type:void

Parameter:

TypeParameterName
struct perf_output_handle *handle
struct perf_event_header *header
struct perf_sample_data *data
struct perf_event *event
6563  sample_type = type
6565  perf_output_put(handle, * header)
6567  If sample_type & PERF_SAMPLE_IDENTIFIER Then perf_output_put(handle, id)
6570  If sample_type & PERF_SAMPLE_IP Then perf_output_put(handle, ip)
6573  If sample_type & PERF_SAMPLE_TID Then perf_output_put(handle, tid_entry)
6576  If sample_type & PERF_SAMPLE_TIME Then perf_output_put(handle, time)
6579  If sample_type & PERF_SAMPLE_ADDR Then perf_output_put(handle, addr)
6582  If sample_type & PERF_SAMPLE_ID Then perf_output_put(handle, id)
6585  If sample_type & PERF_SAMPLE_STREAM_ID Then perf_output_put(handle, stream_id)
6588  If sample_type & PERF_SAMPLE_CPU Then perf_output_put(handle, cpu_entry)
6591  If sample_type & PERF_SAMPLE_PERIOD Then perf_output_put(handle, period)
6594  If sample_type & PERF_SAMPLE_READ Then XXX PERF_SAMPLE_READ vs inherited events seems difficult.* The problem is that its both hard and excessively expensive to iterate the* child list, not to mention that its impossible to IPI the children running* on another CPU, from interrupt/NMI context.
6597  If sample_type & PERF_SAMPLE_CALLCHAIN Then
6598  size = 1
6600  size += nr
6601  size *= sizeof(u64)
6602  __output_copy(handle, callchain, size)
6605  If sample_type & PERF_SAMPLE_RAW Then
6606  raw = raw
6608  If raw Then
6609  frag = frag
6612  Do
6613  If copy Then
6616  Else
6620  If perf_raw_frag_last(frag) Then Break
6622  frag = next
6623  When 1 cycle
6624  If pad Then __output_skip(handle, NULL, pad)
6626  Else
6627  struct{u32 size;u32 data;}raw = {size = sizeof(u32), data = 0, }
6638  If sample_type & PERF_SAMPLE_BRANCH_STACK Then
6639  If br_stack Then
6642  size = nr * sizeof(structperf_branch_entry)
6647  Else
6651  nr = 0
6656  If sample_type & PERF_SAMPLE_REGS_USER Then
6657  abi = abi
6663  perf_output_put(handle, abi)
6665  If abi Then
6673  If sample_type & PERF_SAMPLE_STACK_USER Then
6674  perf_output_sample_ustack(handle, stack_user_size, regs)
6679  If sample_type & PERF_SAMPLE_WEIGHT Then perf_output_put(handle, weight)
6682  If sample_type & PERF_SAMPLE_DATA_SRC Then perf_output_put(handle, val)
6685  If sample_type & PERF_SAMPLE_TRANSACTION Then perf_output_put(handle, txn)
6688  If sample_type & PERF_SAMPLE_REGS_INTR Then
6689  abi = abi
6694  perf_output_put(handle, abi)
6696  If abi Then
6705  If sample_type & PERF_SAMPLE_PHYS_ADDR Then perf_output_put(handle, phys_addr)
6708  If sample_type & PERF_SAMPLE_AUX Then
6709  perf_output_put(handle, aux_size)
6711  If aux_size Then perf_aux_sample_output(event, handle, data)
6715  If Not watermark Then
6716  wakeup_events = wakeup_events
6718  If wakeup_events Then
6719  rb = rb
6722  If events >= wakeup_events Then
Caller
NameDescribe
__perf_event_output