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


Groups > linux.kernel > #1211178

Re: [PATCH v3] tools lib traceevent: add checks for returned EVENT_ERROR type

From Arnaldo Carvalho dn Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3] tools lib traceevent: add checks for returned EVENT_ERROR type
Date 2015-08-21 15:40 +0200
Message-ID <pZUI3-548-39@gated-at.bofh.it> (permalink)
References <pZzNf-fs-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Em Thu, Aug 20, 2015 at 11:16:32AM -0400, Dean Nelson escreveu:
> Running the following perf-stat command on an arm64 system produces the
> following result...
 
>   [root@aarch64 ~]# perf stat -e kmem:mm_page_alloc -a sleep 1
>     Warning: [kmem:mm_page_alloc] function sizeof not defined
>     Warning: Error: expected type 4 but read 0
>   Segmentation fault
>   [root@aarch64 ~]#

Jiri, while testing this I noticed that when running as !root I get:

  $ perf stat -e kmem:mm_page_alloc -a sleep 1
  event syntax error: 'kmem:mm_page_alloc'
                       \___ unknown tracepoint
  Run 'perf list' for a list of valid events

 usage: perf stat [<options>] [<command>]

      -e, --event <event>   event selector. use 'perf list' to list available events
  [acme@zoo linux]$ 

Which could be a bit more friendly if it noticed that it may be a
tracepoint event and that if that is the case, the user needs to have
tracefs remounted with suitable permissions to be able to use
tracepoints, something like 'perf trace' does:

  [acme@zoo linux]$ trace ls
  Error:	No permissions to read
  /sys/kernel/debug/tracing/events/raw_syscalls/sys_(enter|exit)
  Hint:	Try 'sudo mount -o remount,mode=755 /sys/kernel/debug'

  [acme@zoo linux]$

Take that as a suggestion as you're more familiar with the event parsing
code :-)

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3] tools lib traceevent: add checks for returned EVENT_ERROR type Dean Nelson <dnelson@redhat.com> - 2015-08-20 17:20 +0200
  Re: [PATCH v3] tools lib traceevent: add checks for returned  EVENT_ERROR type Namhyung Kim <namhyung@kernel.org> - 2015-08-20 18:10 +0200
  Re: [PATCH v3] tools lib traceevent: add checks for returned  EVENT_ERROR type Steven Rostedt <rostedt@goodmis.org> - 2015-08-20 19:10 +0200
    Re: [PATCH v3] tools lib traceevent: add checks for returned  EVENT_ERROR type Dean Nelson <dnelson@redhat.com> - 2015-08-20 20:00 +0200
      Re: [PATCH v3] tools lib traceevent: add checks for returned  EVENT_ERROR type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-08-20 21:10 +0200
        Re: [PATCH v3] tools lib traceevent: add checks for returned  EVENT_ERROR type Steven Rostedt <rostedt@goodmis.org> - 2015-08-20 22:50 +0200
  Re: [PATCH v3] tools lib traceevent: add checks for returned  EVENT_ERROR type Arnaldo Carvalho dn Melo <acme@kernel.org> - 2015-08-21 15:40 +0200
    Re: [PATCH v3] tools lib traceevent: add checks for returned  EVENT_ERROR type Jiri Olsa <jolsa@redhat.com> - 2015-08-21 16:10 +0200
  [tip:perf/core] tools lib traceevent:   Add checks for returned EVENT_ERROR type tip-bot for Dean Nelson <tipbot@zytor.com> - 2015-08-22 09:00 +0200

csiph-web