mirror of
https://github.com/torvalds/linux.git
synced 2026-11-30 18:42:21 +00:00
Display metric expression itself when --details is specified.
Current list with no details:
# perf list metrics
...
TopDownL1:
IPC
[Instructions Per Cycle (per logical thread)]
SLOTS
[Total issue-pipeline slots]
...
Detailed output with metric formula:
# perf list --details metrics
...
TopDownL1:
IPC
[Instructions Per Cycle (per logical thread)]
[inst_retired.any / cpu_clk_unhalted.thread]
SLOTS
[Total issue-pipeline slots]
[4*(( cpu_clk_unhalted.thread_any / 2 ) if #smt_on else cycles)]
...
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
34 lines
808 B
C
34 lines
808 B
C
#ifndef METRICGROUP_H
|
|
#define METRICGROUP_H 1
|
|
|
|
#include "linux/list.h"
|
|
#include "rblist.h"
|
|
#include <subcmd/parse-options.h>
|
|
#include "evlist.h"
|
|
#include "strbuf.h"
|
|
|
|
struct metric_event {
|
|
struct rb_node nd;
|
|
struct perf_evsel *evsel;
|
|
struct list_head head; /* list of metric_expr */
|
|
};
|
|
|
|
struct metric_expr {
|
|
struct list_head nd;
|
|
const char *metric_expr;
|
|
const char *metric_name;
|
|
struct perf_evsel **metric_events;
|
|
};
|
|
|
|
struct metric_event *metricgroup__lookup(struct rblist *metric_events,
|
|
struct perf_evsel *evsel,
|
|
bool create);
|
|
int metricgroup__parse_groups(const struct option *opt,
|
|
const char *str,
|
|
struct rblist *metric_events);
|
|
|
|
void metricgroup__print(bool metrics, bool groups, char *filter,
|
|
bool raw, bool details);
|
|
bool metricgroup__has_metric(const char *metric);
|
|
#endif
|