public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: kan.liang@intel.com
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
Date: Thu, 11 Jun 2015 11:03:35 -0300	[thread overview]
Message-ID: <20150611140335.GB2696@kernel.org> (raw)
In-Reply-To: <1434004360-8570-1-git-send-email-kan.liang@intel.com>

Em Thu, Jun 11, 2015 at 02:32:40AM -0400, kan.liang@intel.com escreveu:
> perf stat ignores the unsupported event and continue to count supported
> event. But if the unsupported event is group leader, perf tool will
> crash. After applying this patch, the unsupported group leader will
> error out immediately.
 
> Without this patch:
> $ perf stat -x, -e '{node-prefetch-refs,cycles}' --  sleep 1
> perf: util/evsel.c:1009: get_group_fd: Assertion `!(fd == -1)' failed.
> Aborted (core dumped)
 
> 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?
  [acme@zoo linux]$ 

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?

- Arnaldo

  reply	other threads:[~2015-06-11 14:03 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 [this message]
2015-06-11 14:26   ` Liang, Kan
2015-06-11 14:29     ` Arnaldo Carvalho de Melo
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=20150611140335.GB2696@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