函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__set_print_fmt

函数原型:static int __set_print_fmt(struct trace_probe *tp, char *buf, int len, bool is_return)

返回类型:int

参数:

类型参数名称
struct trace_probe *tp
char *buf
intlen
boolis_return
846  pos等于0
849  如果非is_return
850  fmt等于"(%lx)"
851  arg = "REC->" Reserved field names
852  否则
853  fmt等于"(%lx <- %lx)"
854  arg = "REC->" FIELD_STRING_FUNC ", REC->" FIELD_STRING_RETIP
857  pos加等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
859 i小于nr_args循环
860  parg等于argsi
861  pos加等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
862  如果 Array count
869  否则pos加等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
874  pos加等于snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
876 i小于nr_args循环
877  parg等于argsi
878  如果 Array count
879  如果字符串比较恒等于0或字符串比较恒等于0则fmt等于", __get_str(%s[%d])"
882  否则fmt等于", REC->%s[%d]"
887  否则
888  如果字符串比较恒等于0或字符串比较恒等于0则fmt等于", __get_str(%s)"
891  否则fmt等于", REC->%s"
899  返回:pos
调用者
名称描述
traceprobe_set_print_fmt