Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ftrace_event_write

Proto:static ssize_t ftrace_event_write(struct file *file, const char __user *ubuf, size_t cnt, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *ubuf
size_tcnt
loff_t *ppos
888  m = needed for tty driver, and maybe others
889  tr = private
892  If Not cnt Then Return 0
895  ret = racing_update_buffers - used by tracing facility to expand ring buffers* To save on memory when the tracing is never used on a system with it* configured in
896  If ret < 0 Then Return ret
899  If race_parser_get_init - gets the buffer for trace parser Then Return -ENOMEM
902  read = race_get_user - reads the user input string separated by space* (matched by isspace(ch))* For each string found the 'struct trace_parser' is updated,* and the function returns.* Returns number of bytes read.* See kernel/trace/trace
904  If read >= 0 && trace_parser_loaded(( & parser)) Then
905  set = 1
907  If buffer == '!' Then set = 0
910  ret = ftrace_set_clr_event(tr, buffer + !set, set)
911  If ret Then Go to out_put
915  ret = read
917  out_put :
918  race_parser_put - frees the buffer for trace parser
920  Return ret