lkml.org 
[lkml]   [2015]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH 1/1] perf,tools: error out unsupported group leader immediately for perf stat
    Date

    >
    > 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]$
    >
    I don't have other patches for this issue.
    It looks they have different error code, ENOENT VS. EINVAL.
    I have no idea why.

    > 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.

    Thanks,
    Kan

    >
    > - Arnaldo


    \
     
     \ /
      Last update: 2015-06-11 16:41    [W:6.702 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site