pub fn metric_tags(metric: &CtprofMetricDef) -> StringExpand description
Render a metric’s bracketed gating tags as a single
space-separated string. Returns the empty string when
sched_class is None, is_dead is false, AND
config_gates is empty.
Tag emission order: [<sched_class>] first when
sched_class is Some, then [dead] when is_dead, then
each config_gate in registry-declared order. Examples:
nr_wakeups_affine→[cfs-only] [SCHEDSTATS]core_forceidle_sum→[SCHED_CORE] [SCHEDSTATS]fair_slice_ns→[fair-policy]
Compact rendering: each config_gate is stripped of its
CONFIG_ prefix before emission so the rendered cell stays
scannable in narrow tables. The data field
CtprofMetricDef::config_gates keeps the full CONFIG_X
spelling so an operator can grep their kconfig directly.
sched_class tags are rendered as-is (already short, e.g.
[cfs-only], [fair-policy], [non-ext]).
Pure formatting layer — does not interpret tag values; the
metric’s own CtprofMetricDef::sched_class /
CtprofMetricDef::config_gates / CtprofMetricDef::is_dead
docs are the source of truth for what each spelling means.