Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__set_print_fmt

Proto:static int __set_print_fmt(struct trace_probe *tp, char *buf, int len, bool is_return)

Type:int

Parameter:

TypeParameterName
struct trace_probe *tp
char *buf
intlen
boolis_return
846  pos = 0
849  If Not is_return Then
850  fmt = "(%lx)"
851  arg = "REC->" Reserved field names
852  Else
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  When i < nr_args cycle
860  parg = args + i
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  If Array count Then
869  Else 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  When i < nr_args cycle
877  parg = args + i
878  If Array count Then
879  If strcmp(Name of type , "string") == 0 || strcmp(Name of type , "ustring") == 0 Then fmt = ", __get_str(%s[%d])"
882  Else fmt = ", REC->%s[%d]"
887  Else
888  If strcmp(Name of type , "string") == 0 || strcmp(Name of type , "ustring") == 0 Then fmt = ", __get_str(%s)"
891  Else fmt = ", REC->%s"
899  Return pos
Caller
NameDescribe
traceprobe_set_print_fmt