From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbbKZUof (ORCPT ); Thu, 26 Nov 2015 15:44:35 -0500 Received: from mail.kernel.org ([198.145.29.136]:53209 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752777AbbKZUoc (ORCPT ); Thu, 26 Nov 2015 15:44:32 -0500 Date: Thu, 26 Nov 2015 17:44:28 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Jiri Olsa , Steven Rostedt , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra Subject: Re: [PATCH 2/3] perf: Move exclude_kernel tracepoint check to init event Message-ID: <20151126204428.GL28162@kernel.org> References: <1448566489-25922-1-git-send-email-jolsa@kernel.org> <1448566489-25922-3-git-send-email-jolsa@kernel.org> <20151126194106.GH28162@kernel.org> <20151126194910.GA26579@krava.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151126194910.GA26579@krava.brq.redhat.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Nov 26, 2015 at 08:49:10PM +0100, Jiri Olsa escreveu: > On Thu, Nov 26, 2015 at 04:41:06PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Thu, Nov 26, 2015 at 08:34:48PM +0100, Jiri Olsa escreveu: > > > We suppress events with attr::exclude_kernel set when > > > the event is generated, so following capture will > > > give no warning and produce no data: > > > > > > $ sudo perf record -e sched:sched_switch:u ls > > > $ sudo /perf script | wc -l > > > 0 > > > > > > Checking the attr::exclude_kernel at the event init > > > time and failing right away: > > > > We can as well provide a better warning in the tooling side and don't > > even ask this nonsensical combo to the kernel, right? > > yep.. I'll update my todo ;-) Thanks! > > Arguably the kernel was doing what was asked for, its just that no > > sched:sched_switch took place while in user space... ;-) > > I think it's better to fail like that.. rather than spending > time on figuring why my test did not give me any data ;-) Up to peterz ;-) - Arnaldo