• V
    perf/abi: Change the errno for sampling event not supported in hardware · a1396555
    Vineet Gupta 提交于
    Change the return code for sampling event not supported from -ENOTSUPP
    to -EOPNOTSUPP.
    
    This allows userspace to identify this case specifically, instead of
    printing the catch-all error message it did previously.
    
    Technically this is an ABI change, but we think we can get away
    with it.
    
    Old behavior:
     -------
     | # perf record ls
     | Error:
     | 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?
    
    New behavior:
     -------
     | # perf record ls
     | Error:
     | PMU Hardware doesn't support sampling/overflow-interrupts.
    Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
    Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: <acme@redhat.com>
    Cc: <linux-snps-arc@lists.infradead.org>
    Cc: <vincent.weaver@maine.edu>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vince Weaver <vincent.weaver@maine.edu>
    Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
    Link: http://lkml.kernel.org/r/1462786660-2900-3-git-send-email-vgupta@synopsys.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
    a1396555
core.c 245.6 KB