函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events_hist.c Create Date:2022-07-27 13:42:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:hist_trigger_print_key

函数原型:static void hist_trigger_print_key(struct seq_file *m, struct hist_trigger_data *hist_data, void *key, struct tracing_map_elt *elt)

返回类型:void

参数:

类型参数名称
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  如果i大于n_valsseq_puts(m, ", ")
5411  field_name等于hist_field_name(key_field, 0)
5413  如果flags按位与HIST_FIELD_FL_HEX
5414  uval等于*keyoffset的和
5415  seq_printf(m, "%s: %llx", field_name, uval)
5416  否则如果flags按位与HIST_FIELD_FL_SYM
5417  uval等于*keyoffset的和
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  否则如果flags按位与HIST_FIELD_FL_SYM_OFFSET
5422  uval等于*keyoffset的和
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  否则如果flags按位与HIST_FIELD_FL_EXECNAME
5427  elt_data等于private_data
5430  如果WARN_ON_ONCE(!elt_data)则返回
5433  comm等于comm
5435  uval等于*keyoffset的和
5436  seq_printf(m, "%s: %-16s[%10llu]", field_name, comm, uval)
5438  否则如果flags按位与HIST_FIELD_FL_SYSCALL
5441  uval等于*keyoffset的和
5442  syscall_name等于get_syscall_name(uval)
5443  如果非syscall_namesyscall_name等于"unknown_syscall"
5446  seq_printf(m, "%s: %-30s[%3llu]", field_name, syscall_name, uval)
5448  否则如果flags按位与HIST_FIELD_FL_STACKTRACE
5449  seq_puts(m, "stacktrace:\n")
5450  hist_trigger_stacktrace_print(m, key + offset, HIST_STACKTRACE_DEPTH)
5453  multiline = true
5454  否则如果flags按位与HIST_FIELD_FL_LOG2
5455  seq_printf(m, "%s: ~ 2^%-2llu", field_name, * (u64 * )(key + offset))
5457  否则如果flags按位与HIST_FIELD_FL_STRING
5458  seq_printf(m, "%s: %-50s", field_name, (char * )(key + offset))
5460  否则
5461  uval等于*keyoffset的和
5462  seq_printf(m, "%s: %10llu", field_name, uval)
5466  如果非multilineseq_puts(m, " ")
5469  seq_puts(m, "}")
调用者
名称描述
hist_trigger_entry_print