Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:create_trace_option_files

Proto:static void create_trace_option_files(struct trace_array *tr, struct tracer *tracer)

Type:void

Parameter:

TypeParameterName
struct trace_array *tr
struct tracer *tracer
8175  If Not tracer Then Return
8178  flags = flags
8180  If Not flags || Not opts Then Return
8187  If Not Some tracers are not suitable for instance buffers.* A tracer is always available for the global array (toplevel)* or if it explicitly states that it is. Then Return
8190  When i < nr_topts cycle
8192  If WARN_ON_ONCE(flags == flags) Then Return
8196  opts = opts
8198  When Will appear on the trace_options file cycle topts = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
8202  If Not topts Then Return
8205  tr_topts = krealloc(topts, size of topts * (nr_topts + 1), GFP_KERNEL)
8207  If Not tr_topts Then
8208  kfree(topts)
8209  Return
8212  topts = tr_topts
8213  tracer = tracer
8214  topts = topts
8215  nr_topts++
8217  When Will appear on the trace_options file cycle
8218  create_trace_option_file(tr, & topts[cnt], flags, & opts[cnt])
8220  WARN_ONCE(entry == NULL, "Failed to create trace option: %s", Will appear on the trace_options file )
Caller
NameDescribe
add_tracer_options