All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: bad lookup in perf_evlist__equal()?
@ 2011-12-12 19:48 roel
  2011-12-13 14:26 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: roel @ 2011-12-12 19:48 UTC (permalink / raw)
  To: acme, a.p.zijlstra, mingo, paulus, akpm; +Cc: LKML

Fix lookup in perf_evlist__equal()

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 tools/perf/builtin-record.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Unless this was a feature, but then a comment might be nice
This was introduced in a91e5431d54f5

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 6ab58cc..4ccb7d0 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -252,7 +252,7 @@ static bool perf_evlist__equal(struct perf_evlist *evlist,
 	pair = list_entry(other->entries.next, struct perf_evsel, node);
 
 	list_for_each_entry(pos, &evlist->entries, node) {
-		if (memcmp(&pos->attr, &pair->attr, sizeof(pos->attr) != 0))
+		if (memcmp(&pos->attr, &pair->attr, sizeof(pos->attr)) != 0)
 			return false;
 		pair = list_entry(pair->node.next, struct perf_evsel, node);
 	}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf tools: bad lookup in perf_evlist__equal()?
  2011-12-12 19:48 [PATCH] perf tools: bad lookup in perf_evlist__equal()? roel
@ 2011-12-13 14:26 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-12-13 14:26 UTC (permalink / raw)
  To: roel; +Cc: a.p.zijlstra, mingo, paulus, akpm, LKML

Em Mon, Dec 12, 2011 at 08:48:51PM +0100, roel escreveu:
> Fix lookup in perf_evlist__equal()
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

That wasn't intentional at all, it was just comparing the first byte,
duh.

Eagle eyes!

I'm pushing this thru perf/urgent.

Thanks,

- Arnaldo

> ---
>  tools/perf/builtin-record.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Unless this was a feature, but then a comment might be nice
> This was introduced in a91e5431d54f5
> 
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 6ab58cc..4ccb7d0 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -252,7 +252,7 @@ static bool perf_evlist__equal(struct perf_evlist *evlist,
>  	pair = list_entry(other->entries.next, struct perf_evsel, node);
>  
>  	list_for_each_entry(pos, &evlist->entries, node) {
> -		if (memcmp(&pos->attr, &pair->attr, sizeof(pos->attr) != 0))
> +		if (memcmp(&pos->attr, &pair->attr, sizeof(pos->attr)) != 0)
>  			return false;
>  		pair = list_entry(pair->node.next, struct perf_evsel, node);
>  	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-13 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12 19:48 [PATCH] perf tools: bad lookup in perf_evlist__equal()? roel
2011-12-13 14:26 ` Arnaldo Carvalho de Melo

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.