函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\core.c Create Date:2022-07-27 14:56:01
Last Modify:2022-05-20 07:50:19 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:perf_sample_ustack_size

函数原型:static u16 perf_sample_ustack_size(u16 stack_size, u16 header_size, struct pt_regs *regs)

返回类型:u16

参数:

类型参数名称
u16stack_size
u16header_size
struct pt_regs *regs
6198  如果非regs则返回:0
6211  task_size等于两数取小((u64)USHRT_MAX, Get remaining task size from user stack pointer.* It'd be better to take stack vma map and limit this more* precisely, but there's no way to get it safely under interrupt,* so using TASK_SIZE as limit.)
6212  stack_size等于两数取小(stack_size, (u16)task_size)
6215  header_size加等于2乘sizeof(u64)
6218  如果header_sizestack_size小于header_size
6223  stack_size等于USHRT_MAXheader_sizesizeof(u64)
6224  stack_size等于und_up - round up to next specified power of 2*@x: the value to round*@y: multiple to round up to (must be a power of 2)* Rounds @x up to next multiple of @y (which must be a power of 2).* To perform arbitrary rounding up, use roundup() below.(stack_size, sizeof(u64))
6227  返回:stack_size
调用者
名称描述
perf_prepare_sample