Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_event_perf.c Create Date:2022-07-28 12:23:27
Last Modify:2020-03-17 20:20:33 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:perf_trace_buf_alloc

Proto:void *perf_trace_buf_alloc(int size, struct pt_regs **regs, int *rctxp)

Type:void

Parameter:

TypeParameterName
intsize
struct pt_regs **regs
int *rctxp
400  BUILD_BUG_ON - break compile if a condition is true(PERF_MAX_TRACE_SIZE % sizeof(unsignedlong))
402  If WARN_ONCE(size > PERF_MAX_TRACE_SIZE, "perf buffer not large enough") Then Return NULL
406  rctxp = rctx = perf_swevent_get_recursion_context()
407  If rctx < 0 Then Return NULL
410  If regs Then regs = this_cpu_ptr( & __perf_regs[rctx])
412  raw_data = this_cpu_ptr(perf_trace_buf[rctx])
415  memset( & raw_data[size - sizeof(u64)], 0, sizeof(u64))
416  Return raw_data
Caller
NameDescribe
perf_ftrace_function_call