Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:stack_trace_snprint - Print the entries in the stack trace into a buffer*@buf: Pointer to the print buffer*@size: Size of the print buffer*@entries: Pointer to storage array*@nr_entries: Number of entries in the storage array*@spaces: Number of leading

Proto:int stack_trace_snprint(char *buf, size_t size, const unsigned long *entries, unsigned int nr_entries, int spaces)

Type:int

Parameter:

TypeParameterName
char *buf
size_tsize
const unsigned long *entries
unsigned intnr_entries
intspaces
49  total = 0
51  If WARN_ON(!entries) Then Return 0
54  When i < nr_entries && size cycle
55  generated = 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*@
58  total += generated
59  If generated >= size Then
60  buf += size
61  size = 0
62  Else
63  buf += generated
64  size -= generated
68  Return total