linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC v4 0/2] perf: Sharing PMU counters across compatible events
@ 2018-10-03 21:28 Song Liu
  2018-10-03 21:28 ` [PATCH/RFC v4 1/2] " Song Liu
  2018-10-03 21:28 ` [PATCH/RFC v4 2/2] perf tools: monitoring per task counter with per cgroup event Song Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Song Liu @ 2018-10-03 21:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel-team, ravi.bangoria, naveen.n.rao, maddy, Song Liu,
	Tejun Heo, Peter Zijlstra, Jiri Olsa

Changes v3 -> v4:
  1. In __perf_install_in_context() always reprogram ctx for cpu and cgroup
     events to make sure event duplications set up properly.
  2. Add a prototype (2/2) to show potential solution of sharing PMU among
     CPU events and task events.

Changes v2 -> v3:
  1. Simplified event_pmu_add() as Jiri Olsa suggested

Changes v1 -> v2:
  1. Fixed a bug reported by 0day kernel testing robot

This is to follow up earlier discussion on sharing hardware PMU counters
across compatible events:

  https://marc.info/?t=151213803600016
  https://marc.info/?t=152547569200001

This version limits PMU sharing to events within same ctx. As a result,
compatible events are not evaluated during task schedule. This vesion also
limits PMU sharing to hardware counting events. From our discussion with
internal users, this is sufficient for most cases.

This version introduces virtual master event. The virtual master event
does require careful handling. But it is makes the logic of event add/del
cleaner.

Cc: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@kernel.org>

Song Liu (2):
  perf: Sharing PMU counters across compatible events
  perf tools: monitoring per task counter with per cgroup event

 include/linux/perf_event.h |  61 ++++++++
 kernel/events/core.c       | 294 ++++++++++++++++++++++++++++++++++---
 tools/perf/builtin-stat.c  |  26 ++++
 tools/perf/util/cgroup.c   |  76 ++++++++++
 tools/perf/util/cgroup.h   |   5 +
 tools/perf/util/target.h   |   1 +
 6 files changed, 440 insertions(+), 23 deletions(-)

--
2.17.1

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

end of thread, other threads:[~2018-10-03 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-03 21:28 [PATCH/RFC v4 0/2] perf: Sharing PMU counters across compatible events Song Liu
2018-10-03 21:28 ` [PATCH/RFC v4 1/2] " Song Liu
2018-10-03 21:28 ` [PATCH/RFC v4 2/2] perf tools: monitoring per task counter with per cgroup event Song Liu

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).