public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"andi@firstfloor.org" <andi@firstfloor.org>
Subject: Re: [PATCH 1/1] perf,tools: error out unsupported group leader immediately for perf stat
Date: Thu, 11 Jun 2015 11:29:52 -0300	[thread overview]
Message-ID: <20150611142952.GE2696@kernel.org> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F07701875CF4@SHSMSX103.ccr.corp.intel.com>

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

  reply	other threads:[~2015-06-11 14:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11  6:32 [PATCH 1/1] perf,tools: error out unsupported group leader immediately for perf stat kan.liang
2015-06-11 14:03 ` Arnaldo Carvalho de Melo
2015-06-11 14:26   ` Liang, Kan
2015-06-11 14:29     ` Arnaldo Carvalho de Melo [this message]
2015-06-12  8:51 ` [tip:perf/core] perf stat: Error out unsupported group leader immediately tip-bot for Kan Liang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150611142952.GE2696@kernel.org \
    --to=acme@kernel.org \
    --cc=andi@firstfloor.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox