Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\profile.c Create Date:2022-07-28 10:37:24
Last Modify:2020-03-17 15:11:09 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:profile_setup

Proto:int profile_setup(char *str)

Type:int

Parameter:

TypeParameterName
char *str
58  schedstr[] = "schedule"
59  sleepstr[] = "sleep"
60  kvmstr[] = "kvm"
63  If Not strncmp(str, sleepstr, strlen - Find the length of a string*@s: The string to be sized) Then
74  pr_warn("kernel sleep profiling requires CONFIG_SCHEDSTATS\n")
76  Else if Not strncmp(str, schedstr, strlen - Find the length of a string*@s: The string to be sized) Then
77  prof_on = SCHED_PROFILING
78  If str[strlen - Find the length of a string*@s: The string to be sized] == ',' Then str += strlen - Find the length of a string*@s: The string to be sized + 1
80  If get_option - Parse integer from an option string*@str: option string*@pint: (output) integer value parsed from @str* Read an int from an option string; if available accept a subsequent* comma as well Then prof_shift = par
82  pr_info("kernel schedule profiling enabled (shift: %ld)\n", prof_shift)
84  Else if Not strncmp(str, kvmstr, strlen - Find the length of a string*@s: The string to be sized) Then
85  prof_on = KVM_PROFILING
86  If str[strlen - Find the length of a string*@s: The string to be sized] == ',' Then str += strlen - Find the length of a string*@s: The string to be sized + 1
88  If get_option - Parse integer from an option string*@str: option string*@pint: (output) integer value parsed from @str* Read an int from an option string; if available accept a subsequent* comma as well Then prof_shift = par
90  pr_info("kernel KVM profiling enabled (shift: %ld)\n", prof_shift)
92  Else if get_option - Parse integer from an option string*@str: option string*@pint: (output) integer value parsed from @str* Read an int from an option string; if available accept a subsequent* comma as well Then
93  prof_shift = par
94  prof_on = CPU_PROFILING
95  pr_info("kernel profiling enabled (shift: %ld)\n", prof_shift)
98  Return 1