kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	linux-kernel@vger.kernel.org, KVM <kvm@vger.kernel.org>,
	Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Subject: Re: [PULL 1/2] perf/tool: Fix usage of trace events with '-' in trace system name.
Date: Wed, 16 Apr 2014 15:28:22 +0200	[thread overview]
Message-ID: <534E8576.3060907@de.ibm.com> (raw)
In-Reply-To: <20140416130008.GA6087@krava.brq.redhat.com>

On 16/04/14 15:00, Jiri Olsa wrote:
> On Wed, Apr 09, 2014 at 04:21:58PM +0200, Christian Borntraeger wrote:
>> From: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
>>
>> 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 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>
>> ---
>>  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 ','; }
> 
> this breaks parsing of cache events like:
> 
>   $ perf record -e 'L1-dcache-loads' ls
> 
> also test 10 (same issue):
>   $ ./perf test 10
>   10: roundtrip evsel->name check                            : FAILED!
> 
> 
> it might be little tricky to fix, let me know if you
> have any troubles with that, I could look on it

Hmm, so do you prefer tackling this problem directly at  event_legacy_tracepoint, e.g.
like in
https://lkml.org/lkml/2014/3/24/364

Christian

  reply	other threads:[~2014-04-16 13:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 14:21 [PULL 0/2] small perf fixes Christian Borntraeger
2014-04-09 14:21 ` [PULL 1/2] perf/tool: Fix usage of trace events with '-' in trace system name Christian Borntraeger
2014-04-16 13:00   ` Jiri Olsa
2014-04-16 13:28     ` Christian Borntraeger [this message]
2014-04-16 13:31       ` Christian Borntraeger
2014-04-16 13:39         ` Jiri Olsa
2014-04-09 14:21 ` [PULL 2/2] perf-kvm: fix of 'Min time' counting in report command Christian Borntraeger
2014-04-09 15:10   ` David Ahern
2014-04-15 13:05 ` [PULL 0/2] small perf fixes Christian Borntraeger
2014-04-15 13:17   ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=534E8576.3060907@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=acme@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=yarygin@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).