From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754703AbbFKOaB (ORCPT ); Thu, 11 Jun 2015 10:30:01 -0400 Received: from mail.kernel.org ([198.145.29.136]:37929 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751703AbbFKO36 (ORCPT ); Thu, 11 Jun 2015 10:29:58 -0400 Date: Thu, 11 Jun 2015 11:29:52 -0300 From: Arnaldo Carvalho de Melo To: "Liang, Kan" Cc: "linux-kernel@vger.kernel.org" , "andi@firstfloor.org" Subject: Re: [PATCH 1/1] perf,tools: error out unsupported group leader immediately for perf stat Message-ID: <20150611142952.GE2696@kernel.org> References: <1434004360-8570-1-git-send-email-kan.liang@intel.com> <20150611140335.GB2696@kernel.org> <37D7C6CF3E00A74B8858931C1DB2F07701875CF4@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F07701875CF4@SHSMSX103.ccr.corp.intel.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, Jun 11, 2015 at 02:26:47PM +0000, Liang, Kan escreveu: > > Em Thu, Jun 11, 2015 at 02:32:40AM -0400, kan.liang@intel.com escreveu: > > > With this patch: > > > $ perf stat -x, -e '{node-prefetch-refs,cycles}' -- sleep 1 > > > Error: > > > The node-prefetch-refs event is not supported. > > I get something different, maybe I am missing a patch? > > With this patch: > > [acme@zoo linux]$ perf stat -x, -e '{node-prefetch-refs,cycles}' -- sleep 1 > > Error: > > The sys_perf_event_open() syscall returned with 22 (Invalid argument) > > for event (node-prefetch-refs). > > /bin/dmesg may provide additional information. > > No CONFIG_PERF_EVENTS=y kernel support configured? > I don't have other patches for this issue. > It looks they have different error code, ENOENT VS. EINVAL. > I have no idea why. Well, here I have: [acme@zoo ~]$ uname -a Linux zoo.ghostprotocols.net 3.19.7-200.fc21.x86_64 #1 SMP Thu May 7 22:00:21 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux I am rebooting now, due to an unrelated reason, to 4.1.0-rc5+, lets see if this explains this discrepancy... > > Applying it anyway, as it avoids a core dump and the message, albeit not > > optimal, points to a problem with that event. > > Have you tried this with other tools, like perf record? > Yes. Perf record and perf top will error out immediately if any unsupported event found. > So they don't have such issue. Ok, need to revisit the event setup code again and remove the code duplication once and for all :-\ - Arnaldo