Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1395115 > unrolled thread

Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT

Started byVineet Gupta <Vineet.Gupta1@synopsys.com>
First post2016-05-05 15:30 +0200
Last post2016-05-05 15:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets  PERF_PMU_CAP_NO_INTERRUPT Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-05-05 15:30 +0200

#1395115 — Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT

FromVineet Gupta <Vineet.Gupta1@synopsys.com>
Date2016-05-05 15:30 +0200
SubjectRe: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT
Message-ID<rvrvR-MH-35@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web