Re: [PATCH 1/5] perf/sdt: Show proper hint

From: Arnaldo Carvalho de Melo
Date: Thu Feb 02 2017 - 11:20:59 EST


Em Thu, Feb 02, 2017 at 02:40:48PM +0100, Ingo Molnar escreveu:
> * Ravi Bangoria <ravi.bangoria@xxxxxxxxxxxxxxxxxx> wrote:

> > After patch:
> > $ perf record -e sdt_glib:main__after_check
> > event syntax error: 'sdt_glib:idle__add'
> > \___ unknown tracepoint

> > Error: File /sys/kernel/debug/tracing/events/sdt_glib/idle__add ...
> > Hint: SDT event has to be probed before recording it.
>
> So what is the command line option to 'probe' an SDT event? Could you give an
> example that would make the above command work?

I also think 'has to be probed' looks confusing, it should be, I
suggest, "put in place using 'perf probe'", what will case it to really
be _probed_ is when it is activated via a tool like 'perf record'.

So yes, I think the message _and_ the example in this commit log must
show what needs to be done, in detail, to overcome the "problem"
mentioned in the message above.

And after that its up to someone to do the logical next step: if it
needs to be put in place, well, do it, automagically.

- Arnaldo