Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298349
b: refs/heads/master
c: 64c17be
h: refs/heads/master
i:
  298347: 1cd1a33
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Mar 29, 2012
1 parent 79f4adb commit 7b0a122
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc96aa7a7f2e9a1a3cf8be3720f185f2d13fe34b
refs/heads/master: 64c17be4ffb8d6971051aec77ca1de4cfadb166d
6 changes: 3 additions & 3 deletions trunk/tools/perf/util/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ int symbol__annotate_init(struct map *map __used, struct symbol *sym)
int symbol__alloc_hist(struct symbol *sym)
{
struct annotation *notes = symbol__annotation(sym);
size_t sizeof_sym_hist = (sizeof(struct sym_hist) +
(sym->end - sym->start) * sizeof(u64));
const size_t size = sym->end - sym->start + 1;
size_t sizeof_sym_hist = (sizeof(struct sym_hist) + size * sizeof(u64));

notes->src = zalloc(sizeof(*notes->src) + symbol_conf.nr_events * sizeof_sym_hist);
if (notes->src == NULL)
Expand Down Expand Up @@ -64,7 +64,7 @@ int symbol__inc_addr_samples(struct symbol *sym, struct map *map,

pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr));

if (addr >= sym->end)
if (addr > sym->end)
return 0;

offset = addr - sym->start;
Expand Down

0 comments on commit 7b0a122

Please sign in to comment.