diff options
author | Ian Rogers <[email protected]> | 2021-10-15 10:21:22 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-10-20 10:39:55 -0300 |
commit | 485fcaed98ef1601fbab1cbec6dbbe4a4349d188 (patch) | |
tree | 7a076ff881768a9efcb237552a90a37ff4516f23 | |
parent | 4d61aef93d96353c00a3cee715dcd4ccdbdd80c4 (diff) |
perf metric: Document the internal 'struct metric'
Add documentation as part of code tidying.
Signed-off-by: Ian Rogers <[email protected]>
Acked-by: Andi Kleen <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Antonov <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andrew Kilroy <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Changbin Du <[email protected]>
Cc: Denys Zagorui <[email protected]>
Cc: Fabian Hemmer <[email protected]>
Cc: Felix Fietkau <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jacob Keller <[email protected]>
Cc: Jiapeng Chong <[email protected]>
Cc: Jin Yao <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Joakim Zhang <[email protected]>
Cc: John Garry <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Kees Kook <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Nicholas Fraser <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Paul Clarke <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Riccardo Mancini <[email protected]>
Cc: Sami Tolvanen <[email protected]>
Cc: ShihCheng Tu <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Sumanth Korikkar <[email protected]>
Cc: Thomas Richter <[email protected]>
Cc: Wan Jiabing <[email protected]>
Cc: Zhen Lei <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/metricgroup.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c index c96f9fe163f9..632867cedbae 100644 --- a/tools/perf/util/metricgroup.c +++ b/tools/perf/util/metricgroup.c @@ -117,14 +117,34 @@ struct metric_ref_node { struct list_head list; }; +/** + * The metric under construction. The data held here will be placed in a + * metric_expr. + */ struct metric { struct list_head nd; + /** + * The expression parse context importantly holding the IDs contained + * within the expression. + */ struct expr_parse_ctx *pctx; + /** The name of the metric such as "IPC". */ const char *metric_name; + /** The expression to parse, for example, "instructions/cycles". */ const char *metric_expr; + /** + * The "ScaleUnit" that scales and adds a unit to the metric during + * output. + */ const char *metric_unit; + /** The list of metrics referenced by this one. */ struct list_head metric_refs; + /** The size of the metric_refs list. */ int metric_refs_cnt; + /** + * Is there a constraint on the group of events? In which case the + * events won't be grouped. + */ bool has_constraint; }; |