Skip to content

Commit

Permalink
perf tests: Fix typo in sample-parsing.c
Browse files Browse the repository at this point in the history
It was testing the same buffer for differences:

   memcmp(s1->user_stack.data, s1->user_stack.data, s1->user_stack.size)

I'm pretty sure this wasn't supposed to be dead code.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1421946083-29863-1-git-send-email-linux@rasmusvillemoes.dk
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Rasmus Villemoes authored and Arnaldo Carvalho de Melo committed Jan 22, 2015
1 parent f816b3c commit 605a306
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/tests/sample-parsing.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static bool samples_same(const struct perf_sample *s1,

if (type & PERF_SAMPLE_STACK_USER) {
COMP(user_stack.size);
if (memcmp(s1->user_stack.data, s1->user_stack.data,
if (memcmp(s1->user_stack.data, s2->user_stack.data,
s1->user_stack.size)) {
pr_debug("Samples differ at 'user_stack'\n");
return false;
Expand Down

0 comments on commit 605a306

Please sign in to comment.