diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-08-18 15:17:52 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-08-18 15:17:52 +0200 |
commit | e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5 (patch) | |
tree | 37c20ec03e70dc7b5df1d02f16b6ac38d8ed1364 /tools/perf/util/hist.c | |
parent | 7ac03db84baa204d7d280401ed65842541ed1078 (diff) | |
parent | 56385a12d9bb9e173751f74b6c430742018cafc0 (diff) | |
download | linux-stable-e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5.tar.gz linux-stable-e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5.tar.bz2 linux-stable-e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5.zip |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index e7263d49bcf0..be22ae6ef055 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -876,6 +876,9 @@ unsigned int hists__sort_list_width(struct hists *self) if (!se->elide) ret += 2 + hists__col_len(self, se->se_width_idx); + if (verbose) /* Addr + origin */ + ret += 3 + BITS_PER_LONG / 4; + return ret; } @@ -980,9 +983,9 @@ int hist_entry__inc_addr_samples(struct hist_entry *self, u64 ip) return 0; } -static struct objdump_line *objdump_line__new(s64 offset, char *line) +static struct objdump_line *objdump_line__new(s64 offset, char *line, size_t privsize) { - struct objdump_line *self = malloc(sizeof(*self)); + struct objdump_line *self = malloc(sizeof(*self) + privsize); if (self != NULL) { self->offset = offset; @@ -1014,7 +1017,7 @@ struct objdump_line *objdump__get_next_ip_line(struct list_head *head, } static int hist_entry__parse_objdump_line(struct hist_entry *self, FILE *file, - struct list_head *head) + struct list_head *head, size_t privsize) { struct symbol *sym = self->ms.sym; struct objdump_line *objdump_line; @@ -1065,7 +1068,7 @@ static int hist_entry__parse_objdump_line(struct hist_entry *self, FILE *file, offset = -1; } - objdump_line = objdump_line__new(offset, line); + objdump_line = objdump_line__new(offset, line, privsize); if (objdump_line == NULL) { free(line); return -1; @@ -1075,7 +1078,8 @@ static int hist_entry__parse_objdump_line(struct hist_entry *self, FILE *file, return 0; } -int hist_entry__annotate(struct hist_entry *self, struct list_head *head) +int hist_entry__annotate(struct hist_entry *self, struct list_head *head, + size_t privsize) { struct symbol *sym = self->ms.sym; struct map *map = self->ms.map; @@ -1140,7 +1144,7 @@ fallback: goto out_free_filename; while (!feof(file)) - if (hist_entry__parse_objdump_line(self, file, head) < 0) + if (hist_entry__parse_objdump_line(self, file, head, privsize) < 0) break; pclose(file); |