From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933748AbcHDO3i (ORCPT ); Thu, 4 Aug 2016 10:29:38 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:51805 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758121AbcHDO3g (ORCPT ); Thu, 4 Aug 2016 10:29:36 -0400 Date: Thu, 4 Aug 2016 16:28:53 +0200 From: Peter Zijlstra To: Brendan Gregg Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , linux-kernel@vger.kernel.org, Alexei Starovoitov , Wang Nan Subject: Re: [PATCH v2 1/3] perf/core: Add a tracepoint for perf sampling Message-ID: <20160804142853.GO6862@twins.programming.kicks-ass.net> References: <1470192469-11910-1-git-send-email-bgregg@netflix.com> <1470192469-11910-2-git-send-email-bgregg@netflix.com> <20160803094805.GD6879@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 03, 2016 at 11:57:05AM -0700, Brendan Gregg wrote: > As for pmu tracepoints: if I were to instrument it (although I wasn't > planning to), I'd put a tracepoint in perf_event_overflow() called > "perf:perf_overflow", with the same arguments. That could then be used > for all PMU overflow events, without needing to add specific > tracepoints. Could we not teach BPF to replace event->overflow_handler and inject itself there? We don't currently have nice interfaces for doing that, but it should be possible to do I think. We already have the indirect function call, so injecting ourself there has 0 overhead.