函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:event_hist_trigger_print

函数原型:static int event_hist_trigger_print(struct seq_file *m, struct event_trigger_ops *ops, struct event_trigger_data *data)

返回类型:int

参数:

类型参数名称
struct seq_file *m
struct event_trigger_ops *ops
struct event_trigger_data *data
5629  hist_data等于private_data
5631  bool have_var = false
5634  seq_puts(m, "hist:")
5636  如果nameseq_printf(m, "%s:", name)
5639  seq_puts(m, "keys=")
5642  field等于fields[i]
5644  如果i大于n_valsseq_puts(m, ",")
5647  如果flags按位与HIST_FIELD_FL_STACKTRACEseq_puts(m, "stacktrace")
5649  否则hist_field_print(m, field)
5653  seq_puts(m, ":vals=")
5656  field等于fields[i]
5657  如果flags按位与HIST_FIELD_FL_VAR
5658  have_var = true
5659  继续下一循环
5662  如果i恒等于HITCOUNT_IDXseq_puts(m, "hitcount")
5664  否则
5665  seq_puts(m, ",")
5666  hist_field_print(m, field)
5670  如果have_var
5671  n等于0
5673  seq_puts(m, ":")
5676  field等于fields[i]
5678  如果flags按位与HIST_FIELD_FL_VAR
5679  如果n自加则seq_puts(m, ",")
5686  seq_puts(m, ":sort=")
5688 i小于n_sort_keys循环
5693  first_key_idx等于n_valsn_vars
5695  sort_key等于sort_keys[i]
5696  idx等于field_idx
5698  如果WARN_ON(idx >= HIST_FIELDS_MAX)则返回:负EINVAL
5701  如果i大于0则seq_puts(m, ",")
5704  如果idx恒等于HITCOUNT_IDXseq_puts(m, "hitcount")
5706  否则
5707  如果idx大于等于first_key_idxidx加等于n_vars
5712  如果descendingseq_puts(m, ".descending")
5715  seq_printf(m, ":size=%u", (1 << map_bits))
5716  如果enable_timestampsseq_printf(m, ":clock=%s", clock)
5719  print_actions_spec(m, hist_data)
5721  如果filter_strseq_printf(m, " if %s", filter_str)
5724  如果pausedseq_puts(m, " [paused]")
5726  否则seq_puts(m, " [active]")
5729  seq_putc(m, '\n')
5731  返回:0