#[non_exhaustive]pub enum Section {
Primary,
Derived,
CgroupStats,
Limits,
MemoryStat,
MemoryEvents,
Pressure,
HostPressure,
Smaps,
SchedExt,
TaskstatsDelay,
}Expand description
One sub-table emitted by write_diff / write_show.
--sections filters which sub-tables render — every section
not in the filter is suppressed before its emission gate
(zero-suppression, group-by-cgroup gating, etc.) runs, so a
section that would otherwise emit when its data is present
stays silent when omitted from the filter.
Variant order tracks the rendering order in write_diff
and write_show so iteration over Section::ALL walks
the table in the order the operator sees it. The
Self::cli_name tokens are the spelling accepted by
parse_sections — round-trip through that parser pins the
vocabulary against drift.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Primary
Per-thread metric table — the primary rows produced by
build_row / aggregate, EXCLUDING the taskstats
genetlink-sourced rows which carry their own
Section::TaskstatsDelay tag for separate filtering.
Always rendered first.
Derived
## Derived metrics section emitted from
CTPROF_DERIVED_METRICS.
CgroupStats
Cgroup-enrichment table (cpu_usage_usec,
nr_throttled, throttled_usec, memory_current).
Compare- and show-side both gate on GroupBy::Cgroup
plus a non-empty cgroup_stats map; the --sections
filter runs ahead of that gate.
Limits
## Cgroup limits / knobs table — operator-set
configuration (cpu.max, cpu.weight, memory.max,
memory.high, pids.current, pids.max).
MemoryStat
## memory.stat long-table — kernel-emitted memory
counters per cgroup.
MemoryEvents
## memory.events long-table — pressure-event counters
per cgroup.
Pressure
## Pressure / <resource> per-cgroup PSI sub-tables
(cpu / memory / io / irq).
HostPressure
## Host pressure / <resource> host-level PSI
sub-tables.
Smaps
## smaps_rollup memory-mapping summary. Compare-side
rows are keyed per pcomm pattern under default
normalization (matching the GroupBy::Pcomm join key)
or per literal pcomm[tgid] PID under
CompareOptions::no_thread_normalize; show-side rows
are emitted per-PID directly off each captured leader
thread.
SchedExt
## sched_ext global sysfs section (state,
switch_all, nr_rejected, hotplug_seq,
enable_seq).
TaskstatsDelay
Taskstats genetlink-sourced rows in the primary table —
the 34 fields covering the eight delay-accounting
categories (cpu_delay_*, blkio_delay_*,
swapin_delay_*, freepages_delay_*,
thrashing_delay_*, compact_delay_*, wpcopy_delay_*,
irq_delay_*) plus the two memory watermarks
(hiwater_rss_bytes, hiwater_vm_bytes). Renders inside
the primary table alongside Section::Primary rows;
each CtprofMetricDef carries a Self tag in its
CtprofMetricDef::section field, and the primary
table emitter checks
DisplayOptions::is_section_enabled per row so
--sections taskstats-delay shows only the taskstats
rows, --sections primary excludes them, and either
alone keeps the primary table open. Captured via the
kernel’s TASKSTATS family in crate::taskstats.
Implementations§
Source§impl Section
impl Section
Sourcepub const ALL: &'static [Section]
pub const ALL: &'static [Section]
Every variant in rendering order. Single source of
truth — parse_sections walks this slice to validate
names and the DisplayOptions::is_section_enabled
default-empty case treats it as “all on.”
Sourcepub fn cli_name(self) -> &'static str
pub fn cli_name(self) -> &'static str
Canonical CLI name. Round-trips through
parse_sections.
Sourcepub fn requires_cgroup_grouping(self) -> bool
pub fn requires_cgroup_grouping(self) -> bool
Returns true when this section’s data only exists
under GroupBy::Cgroup grouping. Five sections live
behind the cgroup outer-gate in write_diff /
write_show: CgroupStats,
Limits,
MemoryStat,
MemoryEvents, and
Pressure. Naming any of them
under --sections while using a non-cgroup
--group-by would silently produce zero rows for that
section — the framework warns the operator instead via
warn_cgroup_only_sections_under_non_cgroup.
Trait Implementations§
impl Copy for Section
impl Eq for Section
impl StructuralPartialEq for Section
Auto Trait Implementations§
impl Freeze for Section
impl RefUnwindSafe for Section
impl Send for Section
impl Sync for Section
impl Unpin for Section
impl UnwindSafe for Section
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more