aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-06-03 14:49:21 -0300
committerIngo Molnar <mingo@elte.hu>2009-06-03 21:46:59 +0200
commit18374ab76e3ec1cf1b0ca5a8d08e35cfc5d01669 (patch)
tree21bebb2716a19c1f6aab9fffab6513b07334b97d
parent095b3a6a030f7d4f24825ae93fc384b3d4b4fafa (diff)
perf_counter tools: Fix off-by-one bug in symbol__new
The end is really (start + len - 1). Noticed when synthesizing the PLT symbols, that are small (16 bytes), and hot on the start RIP. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20090603174921.GG7805@ghostprotocols.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--Documentation/perf_counter/util/symbol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/perf_counter/util/symbol.c b/Documentation/perf_counter/util/symbol.c
index d52a1ae5342..35ee6de1e51 100644
--- a/Documentation/perf_counter/util/symbol.c
+++ b/Documentation/perf_counter/util/symbol.c
@@ -19,7 +19,7 @@ static struct symbol *symbol__new(uint64_t start, uint64_t len,
self = ((void *)self) + priv_size;
}
self->start = start;
- self->end = start + len;
+ self->end = start + len - 1;
memcpy(self->name, name, namelen);
}