Files
linux/tools/perf/util/intel-tpebs.h
T
Ian Rogers f19306f065 perf stat: Add mean, min, max and last --tpebs-mode options
Add command line configuration option for how retirement latency
events are combined.

The default "mean" gives the average of retirement latency.

"min" or "max" give the smallest or largest retirment latency times
respectively.

"last" uses the last retirment latency sample's time.

Committer notes:

Enclose parse_tpebs_mode() under HAVE_ARCH_X86_64_SUPPORT to match the
ifdef block where it is used, fixing the build in systems like:

  20     5.60 debian:experimental-x-mips    : FAIL gcc version 14.2.0 (Debian 14.2.0-1)
    builtin-stat.c:2330:12: error: 'parse_tpebs_mode' defined but not used [-Werror=unused-function]
     2330 | static int parse_tpebs_mode(const struct option *opt, const char *str,
          |            ^~~~~~~~~~~~~~~~

Reviewed-by: Kan Liang <[email protected]>
Signed-off-by: Ian Rogers <[email protected]>
Tested-by: Weilin Wang <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: Andreas Färber <[email protected]>
Cc: Caleb Biggers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Manivannan Sadhasivam <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Perry Taylor <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Falcon <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2025-04-25 12:31:36 -03:00

26 lines
522 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* intel_tpebs.h: Intel TEPBS support
*/
#ifndef __INTEL_TPEBS_H
#define __INTEL_TPEBS_H
struct evlist;
struct evsel;
enum tpebs_mode {
TPEBS_MODE__MEAN,
TPEBS_MODE__MIN,
TPEBS_MODE__MAX,
TPEBS_MODE__LAST,
};
extern bool tpebs_recording;
extern enum tpebs_mode tpebs_mode;
int evsel__tpebs_open(struct evsel *evsel);
void evsel__tpebs_close(struct evsel *evsel);
int evsel__tpebs_read(struct evsel *evsel, int cpu_map_idx, int thread);
#endif /* __INTEL_TPEBS_H */