Skip to content
Commit 6fe61cb4 authored by Madadi Vineeth Reddy's avatar Madadi Vineeth Reddy Committed by Arnaldo Carvalho de Melo
Browse files

perf sched: Rename 'switches' column header to 'count' and add usage...

perf sched: Rename 'switches' column header to 'count' and add usage description, options for latency

Rename 'Switches' to 'Count' and document metrics shown for perf
sched latency output. Also add options possible with perf sched
latency.

Initially, after seeing the output of 'perf sched latency', the term
'Switches' seemed like it's the number of context switches-in for a
particular task, but upon going through the code, it was observed that
it's actually keeping track of number of times a delay was calculated so
that it is used in calculation of the average delay.

Actually, the switches here is a subset of number of context switches-in
because there are some cases where the count is not incremented in
switch-in handler 'add_sched_in_event'. For example when a task is
switched-in while it's state is not ready to run(!= THREAD_WAIT_CPU).

commit d9340c1d

 ("perf sched: Display time in milliseconds,
reorganize output") changed it from the original count to switches.

So, renamed switches to count to make things a bit more clearer and
added the metrics description of latency in the document.

Reviewed-by: default avatarAditya Gupta <adityag@linux.ibm.com>
Signed-off-by: default avatarMadadi Vineeth Reddy <vineethr@linux.ibm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240328090005.8321-1-vineethr@linux.ibm.com
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e2eeef29
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment