Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422806AbbD2JPU (ORCPT ); Wed, 29 Apr 2015 05:15:20 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:41997 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031686AbbD2JPD (ORCPT ); Wed, 29 Apr 2015 05:15:03 -0400 Date: Wed, 29 Apr 2015 11:14:50 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: Len Brown , "linux-kernel@vger.kernel.org" , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo Subject: Re: [RFC] x86, perf: Add an aperfmperf driver Message-ID: <20150429091450.GQ5029@twins.programming.kicks-ass.net> References: <2c37309d20afadf88ad4a82cf0ce02b9152801e2.1430256154.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c37309d20afadf88ad4a82cf0ce02b9152801e2.1430256154.git.luto@kernel.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 961 Lines: 22 On Tue, Apr 28, 2015 at 02:25:37PM -0700, Andy Lutomirski wrote: > +static struct pmu pmu_aperfmperf = { > + .task_ctx_nr = perf_invalid_context, You could actually have made that perf_sw_context, because its impossible to fail to add() this event. That will make it possible to attach it to tasks and you can measure per task a/m-perf. > + .attr_groups = attr_groups, > + .event_init = aperfmperf_event_init, > + .add = aperfmperf_event_add, > + .del = aperfmperf_event_stop_or_del, > + .start = aperfmperf_event_start, > + .stop = aperfmperf_event_stop_or_del, > + .read = aperfmperf_event_update, > +}; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/