All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] perf/tool: Fix usage of trace events with '-' in trace system name.
       [not found] <87fvm411yi.wl%yarygin@imap.linux.ibm.com>
@ 2014-03-27  8:45 ` Christian Borntraeger
  0 siblings, 0 replies; only message in thread
From: Christian Borntraeger @ 2014-03-27  8:45 UTC (permalink / raw)
  To: Alexander Yarygin, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo
  Cc: Paolo Bonzini, KVM, linux-s390, Cornelia Huck, linux-kernel,
	Alexander Yarygin

On 27/03/14 09:27, Alexander Yarygin wrote:
> 
> Trace events potentially can have a '-' in their trace system name,
> e.g. kvm on s390 defines kvm-s390:* tracepoints.
> tools/perf could not parse them, because there was no rule for this:
> $ sudo ./perf top -e "kvm-s390:*"
> invalid or unsupported event: 'kvm-s390:*'
> 
> This patch allows to '-' to be a part of PE_NAME token, so tracepoints
> with '-' can be parsed by the event_legacy_tracepoint rule.
> Without the patch, perf will not accept such tracepoints in the -e
> option.
> 
> Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>

When doing a V2, you should remove my Signed-off-by. ;-)



But at least we can now add my
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>


Ingo, Peter, Paul,

If you agree with this solution, I would like to have this in the next merge window - maybe 
cc stable if we consider perf stable relevant.

Christian


> ---
>  tools/perf/util/parse-events.l |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> index 3432995..ca20da7 100644
> --- a/tools/perf/util/parse-events.l
> +++ b/tools/perf/util/parse-events.l
> @@ -199,7 +199,7 @@ r{num_raw_hex}		{ return raw(yyscanner); }
>  {num_hex}		{ return value(yyscanner, 16); }
> 
>  {modifier_event}	{ return str(yyscanner, PE_MODIFIER_EVENT); }
> -{name}			{ return str(yyscanner, PE_NAME); }
> +{name_minus}			{ return str(yyscanner, PE_NAME); }
>  "/"			{ BEGIN(config); return '/'; }
>  -			{ return '-'; }
>  ,			{ BEGIN(event); return ','; }
> 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-27  8:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87fvm411yi.wl%yarygin@imap.linux.ibm.com>
2014-03-27  8:45 ` [PATCH v2] perf/tool: Fix usage of trace events with '-' in trace system name Christian Borntraeger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.