Section

Enum Section 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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

Source

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.”

Source

pub fn cli_name(self) -> &'static str

Canonical CLI name. Round-trips through parse_sections.

Source

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§

Source§

impl Clone for Section

Source§

fn clone(&self) -> Section

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Section

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Section

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Section

Source§

fn eq(&self, other: &Section) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Section

Source§

impl Eq for Section

Source§

impl StructuralPartialEq for Section

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,