Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\vsprintf.c Create Date:2022-07-28 06:11:57
Last Modify:2022-05-21 09:47:42 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:This will print a single '0' even if r == 0, since we would* immediately jump to out_r where two 0s would be written but only* one of them accounted for in buf. This is needed by ip4_string* below. All other callers pass a non-zero value of r.

Proto:static __attribute__((__noinline__)) char *put_dec_trunc8(char *buf, unsigned r)

Type:char

Parameter:

TypeParameterName
char *buf
unsignedr
192  If r < 100 Then Go to out_r
196  q = r * 0x28f5c29 >> 32
197  *buf = Decimal conversion is by far the most typical, and is used for* /proc and /sys data. This directly impacts e.g. top performance* with many processes running. We optimize it for speed by emitting* two characters at a time, using a 200 byte lookup table[r - 100 * q]
198  buf += 2
201  If q < 100 Then Go to out_q
205  r = q * 0x28f5c29 >> 32
206  *buf = Decimal conversion is by far the most typical, and is used for* /proc and /sys data. This directly impacts e.g. top performance* with many processes running. We optimize it for speed by emitting* two characters at a time, using a 200 byte lookup table[q - 100 * r]
207  buf += 2
210  If r < 100 Then Go to out_r
214  q = r * 0x147b >> 19
215  *buf = Decimal conversion is by far the most typical, and is used for* /proc and /sys data. This directly impacts e.g. top performance* with many processes running. We optimize it for speed by emitting* two characters at a time, using a 200 byte lookup table[r - 100 * q]
216  buf += 2
217  out_q :
219  r = q
220  out_r :
222  *buf = Decimal conversion is by far the most typical, and is used for* /proc and /sys data. This directly impacts e.g. top performance* with many processes running. We optimize it for speed by emitting* two characters at a time, using a 200 byte lookup table[r]
223  buf += If r < 10 Then 1 Else 2
224  Return buf
Caller
NameDescribe
put_decBased on code by Douglas W. Jones found at* * (with permission from the author).* Performs no 64-bit division and hence should be fast on 32-bit machines.
ip4_string