函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events.c Create Date:2022-07-27 13:26:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ftrace_event_write

函数原型:static ssize_t ftrace_event_write(struct file *file, const char __user *ubuf, size_t cnt, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
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  如果非cnt则返回: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  如果ret小于0则返回:ret
899  如果race_parser_get_init - gets the buffer for trace parser则返回:负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  如果read大于等于0且trace_parser_loaded(( & parser))则
905  set等于1
907  如果buffer恒等于'!'则set等于0
910  ret等于ftrace_set_clr_event(tr, buffer + !set, set)
911  如果ret则转到:out_put
915  ret等于read
917  out_put :
918  race_parser_put - frees the buffer for trace parser
920  返回:ret