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


Groups > linux.kernel > #1601418

Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf record'

From Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf record'
Date 2017-03-15 15:00 +0100
Message-ID <tlhD3-8pQ-3@gated-at.bofh.it> (permalink)
References <tkWfg-1T2-33@gated-at.bofh.it> <tkWfh-1T2-47@gated-at.bofh.it> <tlfUC-7pB-15@gated-at.bofh.it> <tlh0l-89N-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On Wednesday 15 March 2017 06:46 PM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Mar 15, 2017 at 01:03:31PM +0100, Jiri Olsa escreveu:
>> On Tue, Mar 14, 2017 at 08:36:54PM +0530, Ravi Bangoria wrote:
>>> +++ b/tools/perf/builtin-record.c
>>> +static int record__parse_events_option(const struct option *opt,
>>> +				       const char *str,
>>> +				       int unset)
>>> +{
>>> +	if (is_sdt_event((char *) str))
>>> +		return parse_sdt_events_option(opt, str, unset);
>>> +	else
>>> +		return parse_events_option(opt, str, unset);
>> so what happens if there're more than one event in 'str' like:
>>   -e cycles,std_...
>>
>> would it be better to plug this directly into parse-events.y
>> parser.. and handle it like any other event type?
> Yeah, I went to bed thinking about this :-) 
>
> Ravi,
>
> 	Please test something like:
>
>    perf record -e cycles,sdt_glib:mem__alloc,sched:*switch -a sleep 5s

Thanks Jiri, Arnaldo,

Yeah, this is failing :)

  $ sudo ./perf record -a -e sdt_libpthread:mutex_release,sced:*switch
    Error: sdt_libpthread:mutex_release,sched:*switch not found in the cache
    invalid or unsupported event: 'sdt_libpthread:mutex_release,sched:*switch'

Actually I tested with 'perf record -e ev1 -e ev2', but in this case
record__parse_events_option will get called separately for each
individual event.

Anyway, I'll fix this in next version.

Thanks for the review,
Ravi

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


Thread

[PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf record' Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-03-14 16:10 +0100
  Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf  record' Jiri Olsa <jolsa@redhat.com> - 2017-03-15 13:10 +0100
    Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf  record' Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-15 14:20 +0100
      Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf  record' Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-03-15 15:00 +0100
  Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf  record' Masami Hiramatsu <mhiramat@kernel.org> - 2017-03-17 10:20 +0100
    Re: [PATCH v5 3/7] perf/sdt: Directly record SDT events with 'perf  record' Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> - 2017-03-20 05:00 +0100

csiph-web