linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] Share events between metrics
@ 2020-05-07  8:14 Ian Rogers
  2020-05-07  8:14 ` [RFC PATCH 1/7] perf expr: migrate expr ids table to libbpf's hashmap Ian Rogers
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Ian Rogers @ 2020-05-07  8:14 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Alexei Starovoitov, Daniel Borkmann, Martin KaFai Lau, Song Liu,
	Yonghong Song, Andrii Nakryiko, John Fastabend, KP Singh,
	Kajol Jain, Andi Kleen, John Garry, Jin Yao, Kan Liang,
	Cong Wang, Kim Phillips, linux-kernel
  Cc: netdev, bpf, linux-perf-users, Stephane Eranian, Ian Rogers

Metric groups contain metrics. Metrics create groups of events to
ideally be scheduled together. Often metrics refer to the same events,
for example, a cache hit and cache miss rate. Using separate event
groups means these metrics are multiplexed at different times and the
counts don't sum to 100%. More multiplexing also decreases the
accuracy of the measurement.

This change orders metrics from groups or the command line, so that
the ones with the most events are set up first. Later metrics see if
groups already provide their events, and reuse them if
possible. Unnecessary events and groups are eliminated.

RFC because:
 - without this change events within a metric may get scheduled
   together, after they may appear as part of a larger group and be
   multiplexed at different times, lowering accuracy - however, less
   multiplexing may compensate for this.
 - libbpf's hashmap is used, however, libbpf is an optional
   requirement for building perf.
 - other things I'm not thinking of.

Thanks!

Ian Rogers (7):
  perf expr: migrate expr ids table to libbpf's hashmap
  perf metricgroup: change evlist_used to a bitmap
  perf metricgroup: free metric_events on error
  perf metricgroup: always place duration_time last
  perf metricgroup: delay events string creation
  perf metricgroup: order event groups by size
  perf metricgroup: remove duped metric group events

 tools/perf/tests/expr.c       |  32 ++---
 tools/perf/tests/pmu-events.c |  22 ++--
 tools/perf/util/expr.c        | 125 ++++++++++--------
 tools/perf/util/expr.h        |  22 ++--
 tools/perf/util/expr.y        |  22 +---
 tools/perf/util/metricgroup.c | 242 +++++++++++++++++++++-------------
 tools/perf/util/stat-shadow.c |  46 ++++---
 7 files changed, 280 insertions(+), 231 deletions(-)

-- 
2.26.2.526.g744177e7f7-goog


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

end of thread, other threads:[~2020-12-15 18:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  8:14 [RFC PATCH 0/7] Share events between metrics Ian Rogers
2020-05-07  8:14 ` [RFC PATCH 1/7] perf expr: migrate expr ids table to libbpf's hashmap Ian Rogers
2020-05-07  8:14 ` [RFC PATCH 2/7] perf metricgroup: change evlist_used to a bitmap Ian Rogers
2020-05-07  8:14 ` [RFC PATCH 3/7] perf metricgroup: free metric_events on error Ian Rogers
2020-05-07  8:14 ` [RFC PATCH 4/7] perf metricgroup: always place duration_time last Ian Rogers
2020-05-07  8:14 ` [RFC PATCH 5/7] perf metricgroup: delay events string creation Ian Rogers
2020-05-07  8:14 ` [RFC PATCH 6/7] perf metricgroup: order event groups by size Ian Rogers
2020-05-07  8:14 ` [RFC PATCH 7/7] perf metricgroup: remove duped metric group events Ian Rogers
2020-05-07 13:49 ` [RFC PATCH 0/7] Share events between metrics Jiri Olsa
2020-05-07 14:11   ` Ian Rogers
2020-05-07 17:48 ` Andi Kleen
2020-05-07 18:15   ` Ian Rogers
2020-05-07 21:46     ` Andi Kleen
2020-05-08  5:43       ` Ian Rogers
2020-12-15 15:08         ` Paul A. Clarke
2020-12-15 18:39           ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).