Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:trace_set_options

Proto:static int trace_set_options(struct trace_array *tr, char *option)

Type:int

Parameter:

TypeParameterName
struct trace_array *tr
char *option
4748  neg = 0
4750  orig_len = strlen - Find the length of a string*@s: The string to be sized
4753  cmp = strstrip(option)
4755  len = str_has_prefix - Test if a string has a given prefix*@str: The string to test*@prefix: The string to see if @str starts with* A common way to test a prefix of a string is to do:* strncmp(str, prefix, sizeof(prefix) - 1)* But this can lead to bugs due to
4756  If len Then neg = 1
4759  cmp += len
4761  mutex_lock( & event_mutex)
4762  mutex_lock( & race_types_lock is used to protect the trace_types list.)
4764  ret = match_string - matches given string in an array*@array: array of strings*@n: number of strings in the array or -1 for NULL terminated arrays*@string: string to match with* Return:* index of a @string in the @array if matches, or %-EINVAL otherwise.
4766  If ret < 0 Then ret = Try to assign a tracer specific option
4768  Else ret = set_tracer_flag(tr, 1 << ret, !neg)
4771  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
4772  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
4778  If orig_len > strlen - Find the length of a string*@s: The string to be sized Then option[strlen - Find the length of a string*@s: The string to be sized] = ' '
4781  Return ret
Caller
NameDescribe
apply_trace_boot_options
tracing_trace_options_write