linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	Lada Trimasova <Lada.Trimasova@synopsys.com>,
	"linux-perf-users@vger.kernel.org"
	<linux-perf-users@vger.kernel.org>
Cc: "peterz@infradead.org" <peterz@infradead.org>,
	"linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Vince Weaver <vincent.weaver@maine.edu>,
	Will Deacon <Will.Deacon@arm.com>, Ingo Molnar <mingo@kernel.org>
Subject: Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT
Date: Thu, 5 May 2016 18:51:09 +0530	[thread overview]
Message-ID: <572B48C5.6090401@synopsys.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075F4E9F42D@us01wembx1.internal.synopsys.com>

On Tuesday 26 April 2016 06:12 PM, Vineet Gupta wrote:
> On Friday 22 April 2016 06:56 PM, Lada Trimasova wrote:
>> I have a question about user-space perf handling error numbers.
>> The problem is that PMU interrupts are not supported in arc700
>> architecture and it is impossible to evaluate `perf record` command.
>> In our perf implementation we set PERF_PMU_CAP_NO_INTERRUPT flag so
>> core perf infrastructure knows we don't have interrupts.
>>
>> Kernel `sys_perf_event_open` handler checks if PMU interrupts are
>> supported and returns ENOTSUPP (524) error code.
>> I'd expect that perf implementation checks the return value of syscalls
>> and gives the user understandable error message.
>> But now I see:
>> --------------------------------->8-----------------------------------
>> # perf record ls
>> The sys_perf_event_open() syscall returned with 524 (Unknown error 524)
>> for event (cycles:ppp).
>> /bin/dmesg may provide additional information.
>> No CONFIG_PERF_EVENTS=y kernel support configured?
>> --------------------------------->8-----------------------------------

Guys, is the ABI change for returning -EOPNOTSUPP vs. -ENOTSUPP for
is_sampling_event() && (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT)
acceptable ? We could use this in userspace to print pretty rather than half
cooked error msg above !

-Vineet

      parent reply	other threads:[~2016-05-05 13:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 13:25 Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT Lada Trimasova
2016-04-26 10:57 ` Lada Trimasova
2016-04-26 12:42 ` Vineet Gupta
2016-04-27 15:13   ` Lada Trimasova
     [not found]   ` <1461770030.5970.8.camel__5728.3871378333$1461770054$gmane$org@synopsys.com>
2016-04-28  4:35     ` Vineet Gupta
2016-05-05 13:21   ` Vineet Gupta [this message]

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=572B48C5.6090401@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Lada.Trimasova@synopsys.com \
    --cc=Will.Deacon@arm.com \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=vincent.weaver@maine.edu \
    /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;
as well as URLs for NNTP newsgroup(s).