Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:hist_trigger_print_key

Proto:static void hist_trigger_print_key(struct seq_file *m, struct hist_trigger_data *hist_data, void *key, struct tracing_map_elt *elt)

Type:void

Parameter:

TypeParameterName
struct seq_file *m
struct hist_trigger_data *hist_data
void *key
struct tracing_map_elt *elt
5398  bool multiline = false
5403  seq_puts(m, "{ ")
5406  key_field = fields[i]
5408  If i > n_vals Then seq_puts(m, ", ")
5411  field_name = hist_field_name(key_field, 0)
5413  If flags & HIST_FIELD_FL_HEX Then
5414  uval = *(key + offset)
5415  seq_printf(m, "%s: %llx", field_name, uval)
5416  Else if flags & HIST_FIELD_FL_SYM Then
5417  uval = *(key + offset)
5418  sprint_symbol_no_offset - Look up a kernel symbol and return it in a text buffer*@buffer: buffer to be stored*@address: address to lookup* This function looks up a kernel symbol with @address and stores its name* and module name to @buffer if possible
5419  seq_printf(m, "%s: [%llx] %-45s", field_name, uval, str)
5421  Else if flags & HIST_FIELD_FL_SYM_OFFSET Then
5422  uval = *(key + offset)
5423  sprint_symbol - Look up a kernel symbol and return it in a text buffer*@buffer: buffer to be stored*@address: address to lookup* This function looks up a kernel symbol with @address and stores its name,* offset, size and module name to @buffer if possible
5424  seq_printf(m, "%s: [%llx] %-55s", field_name, uval, str)
5426  Else if flags & HIST_FIELD_FL_EXECNAME Then
5427  elt_data = private_data
5430  If WARN_ON_ONCE(!elt_data) Then Return
5433  comm = comm
5435  uval = *(key + offset)
5436  seq_printf(m, "%s: %-16s[%10llu]", field_name, comm, uval)
5438  Else if flags & HIST_FIELD_FL_SYSCALL Then
5441  uval = *(key + offset)
5442  syscall_name = get_syscall_name(uval)
5443  If Not syscall_name Then syscall_name = "unknown_syscall"
5446  seq_printf(m, "%s: %-30s[%3llu]", field_name, syscall_name, uval)
5448  Else if flags & HIST_FIELD_FL_STACKTRACE Then
5449  seq_puts(m, "stacktrace:\n")
5450  hist_trigger_stacktrace_print(m, key + offset, HIST_STACKTRACE_DEPTH)
5453  multiline = true
5454  Else if flags & HIST_FIELD_FL_LOG2 Then
5455  seq_printf(m, "%s: ~ 2^%-2llu", field_name, * (u64 * )(key + offset))
5457  Else if flags & HIST_FIELD_FL_STRING Then
5458  seq_printf(m, "%s: %-50s", field_name, (char * )(key + offset))
5460  Else
5461  uval = *(key + offset)
5462  seq_printf(m, "%s: %10llu", field_name, uval)
5466  If Not multiline Then seq_puts(m, " ")
5469  seq_puts(m, "}")
Caller
NameDescribe
hist_trigger_entry_print