lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140416130008.GA6087@krava.brq.redhat.com>
Date:	Wed, 16 Apr 2014 15:00:08 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Christian Borntraeger <borntraeger@...ibm.com>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	linux-kernel@...r.kernel.org, KVM <kvm@...r.kernel.org>,
	Alexander Yarygin <yarygin@...ux.vnet.ibm.com>
Subject: Re: [PULL 1/2] perf/tool: Fix usage of trace events with '-' in
 trace system name.

On Wed, Apr 09, 2014 at 04:21:58PM +0200, Christian Borntraeger wrote:
> From: Alexander Yarygin <yarygin@...ux.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@...ux.vnet.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@...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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ