mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] perf tools: Add progress diagnostics and a false-sharing workload
@ 2026-09-28 17:12 Arnaldo Carvalho de Melo
  2026-09-28 17:12 ` [PATCH v2 1/4] perf config: Move perf_config__set_variable() to util/config.c Arnaldo Carvalho de Melo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-09-28 17:12 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ingo Molnar, Thomas Gleixner, James Clark, Jiri Olsa, Ian Rogers,
	Adrian Hunter, Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo

Hi,

This series adds progress and stuck-process diagnostics to perf, and a
workload that makes false sharing visible to data type profiling.

The changes are:

  - move perf_config__set_variable() to util/config.c and serialize config
    parser and read-modify-write state, so non-builtin perf code can persist
    configuration changes safely;

  - add 'perf report --progress' for stdio users, showing the current phase,
    percentage, and counts while a session is processed;

  - add the prototype tools/perf/scripts/perf-stuck.sh helper, which samples
    a running perf process and can invoke the accompanying GDB commands when
    progress stops;

  - add 'perf test -w false_sharing', a synthetic TCP-shaped workload with
    identity and packet counters sharing a cacheline, and include it in the
    data type profiling shell test.

The progress backend handles nested phases and completes them on error paths
as well as successful paths. The false-sharing workload uses a shared
volatile instance so the data type profiler can resolve direct accesses to
the individual members.

The perf-stuck helper is intentionally a prototype and requires the usual
/proc access; its optional GDB mode additionally requires gdb and suitable
debug information. When only one CPU is available, the false-sharing
workload warns that it cannot produce cross-CPU traffic but still runs.

Best regards,

- Arnaldo

What changed from v1:

  - avoid calling CPU_SET() with -1 when false_sharing runs with only one
    CPU available in its affinity mask. Reported by Sashiko on v1.

  tools/perf/Documentation/perf-report.txt      |  13 ++
  tools/perf/builtin-config.c                   |  70 +-------
  tools/perf/builtin-report.c                   |  10 ++
  tools/perf/scripts/perf-stuck.gdb             | 106 ++++++++++++
  tools/perf/scripts/perf-stuck.sh              | 181 ++++++++++++++++++++
  tools/perf/tests/builtin-test.c               |   1 +
  tools/perf/tests/shell/data_type_profiling.sh |   9 +-
  tools/perf/tests/tests.h                      |   1 +
  tools/perf/tests/workloads/Build              |   2 +
  tools/perf/tests/workloads/false_sharing.c    | 240 ++++++++++++++++++++++++++
  tools/perf/ui/Build                           |   1 +
  tools/perf/ui/progress.h                      |   2 +
  tools/perf/ui/stdio/progress.c                | 162 ++++++++++++++++++
  tools/perf/util/config.c                      | 124 +++++++++++++-
  tools/perf/util/config.h                      |   2 +
  tools/perf/util/ordered-events.c              |  16 +-
  tools/perf/util/session.c                     |  12 +-
 17 files changed, 869 insertions(+), 83 deletions(-)

base-commit: 0ae6fc78c5ce0dfd
v1-head: 45d7917f7e05e8a29828ed5f0bbdc94fc938f79f
--
Assisted-by: OpenCode: GPT-5.6 Luna

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-28 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 17:12 [PATCH v2 0/4] perf tools: Add progress diagnostics and a false-sharing workload Arnaldo Carvalho de Melo
2026-09-28 17:12 ` [PATCH v2 1/4] perf config: Move perf_config__set_variable() to util/config.c Arnaldo Carvalho de Melo
2026-09-28 17:12 ` [PATCH v2 2/4] perf report: Add --progress option Arnaldo Carvalho de Melo
2026-09-28 17:12 ` [PATCH v2 3/4] perf scripts: Add perf-stuck, to tell where a running perf is stuck Arnaldo Carvalho de Melo
2026-09-28 17:12 ` [PATCH v2 4/4] perf test: Add false_sharing workload exhibiting cross-CPU false sharing Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®