函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-27 14:56:38
Last Modify:2022-05-20 07:50:19 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:perf_output_sample

函数原型:void perf_output_sample(struct perf_output_handle *handle, struct perf_event_header *header, struct perf_sample_data *data, struct perf_event *event)

返回类型:void

参数:

类型参数名称
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  如果sample_type按位与PERF_SAMPLE_IDENTIFIERperf_output_put(handle, id)
6570  如果sample_type按位与PERF_SAMPLE_IPperf_output_put(handle, ip)
6573  如果sample_type按位与PERF_SAMPLE_TIDperf_output_put(handle, tid_entry)
6576  如果sample_type按位与PERF_SAMPLE_TIMEperf_output_put(handle, time)
6579  如果sample_type按位与PERF_SAMPLE_ADDRperf_output_put(handle, addr)
6582  如果sample_type按位与PERF_SAMPLE_IDperf_output_put(handle, id)
6585  如果sample_type按位与PERF_SAMPLE_STREAM_IDperf_output_put(handle, stream_id)
6588  如果sample_type按位与PERF_SAMPLE_CPUperf_output_put(handle, cpu_entry)
6591  如果sample_type按位与PERF_SAMPLE_PERIODperf_output_put(handle, period)
6594  如果sample_type按位与PERF_SAMPLE_READXXX 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  如果sample_type按位与PERF_SAMPLE_CALLCHAIN
6598  size等于1
6600  size加等于nr
6601  size乘等于sizeof(u64)
6602  __output_copy(handle, callchain, size)
6605  如果sample_type按位与PERF_SAMPLE_RAW
6606  raw等于raw
6608  如果raw
6609  frag等于frag
6612  循环
6613  如果copy
6616  否则
6620  如果perf_raw_frag_last(frag)则退出
6622  frag等于next
6623  当1循环
6624  如果pad__output_skip(handle, NULL, pad)
6626  否则
6627  struct{u32 size;u32 data;}raw = {size = sizeof(u32), data = 0, }
6638  如果sample_type按位与PERF_SAMPLE_BRANCH_STACK
6639  如果br_stack
6642  size等于nrsizeof(structperf_branch_entry)
6647  否则
6651  nr等于0
6656  如果sample_type按位与PERF_SAMPLE_REGS_USER
6657  abi等于abi
6663  perf_output_put(handle, abi)
6665  如果abi
6666  mask等于sample_regs_user
6673  如果sample_type按位与PERF_SAMPLE_STACK_USER
6674  perf_output_sample_ustack(handle, stack_user_size, regs)
6679  如果sample_type按位与PERF_SAMPLE_WEIGHTperf_output_put(handle, weight)
6682  如果sample_type按位与PERF_SAMPLE_DATA_SRCperf_output_put(handle, val)
6685  如果sample_type按位与PERF_SAMPLE_TRANSACTIONperf_output_put(handle, txn)
6688  如果sample_type按位与PERF_SAMPLE_REGS_INTR
6689  abi等于abi
6694  perf_output_put(handle, abi)
6696  如果abi
6697  mask等于sample_regs_intr
6705  如果sample_type按位与PERF_SAMPLE_PHYS_ADDRperf_output_put(handle, phys_addr)
6708  如果sample_type按位与PERF_SAMPLE_AUX
6709  perf_output_put(handle, aux_size)
6711  如果aux_sizeperf_aux_sample_output(event, handle, data)
6715  如果非watermark
6716  wakeup_events等于wakeup_events
6718  如果wakeup_events
6719  rb等于rb
6722  如果events大于等于wakeup_events
调用者
名称描述
__perf_event_output