On 2015/8/1 4:31, Arnaldo Carvalho de Melo wrote:
Em Fri, Jul 31, 2015 at 12:35:22PM -0300, Arnaldo Carvalho de Melo escreveu:
But point here is, when I see "enable passing
bpf object file to --event" I apply the patch and expect to be able to
go straight away and do:
     perf record -e foo.o sleep 1
And get some informative message as to hey, yes, I managed to do what
you asked or something is wrong, but I get:
   [root@felicio ~]# perf record --event foo.o sleep
   event syntax error: 'foo.o'
                        \___ parser error
   Run 'perf list' for a list of valid events
    usage: perf record [<options>] [<command>]
       or: perf record [<options>] -- <command> [<options>]
       -e, --event <event>   event selector. use 'perf list' to list available 
events
   [root@felicio ~]#
So, is it enabled or is it not? Doesn't look like. I.e. I think the best
thing is to only expose this when it can be used. Till that time, we can
I just tried gdb'ing this with a breakpoint on parse_events_load_bpf(),
but when I run:

   (gdb) b parse_events_load_bpf
   Breakpoint 1 at 0x48b11b: file util/parse-events.c, line 488.
   (gdb) run record -e foo.o sleep 1
   Starting program: /root/bin/perf record -e foo.o sleep 1
   [Thread debugging using libthread_db enabled]
   Using host libthread_db library "/lib64/libthread_db.so.1".
   event syntax error: 'foo.o'
                        \___ parser error
   Run 'perf list' for a list of valid events

Somehow it is not calling what the changeset says it would call when passing
"-e foo.o", investigating...


Have you tried

/root/bin/perf record -e ./foo.o sleep 1

The key is './'.

I have reproduced the problem. Haven't noticed that because I always use './' 
name.

Will look into it.

Thank you, and glad to see you start looking at this cset.


- Arnaldo


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

Reply via email to