mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
perf tools: Align buildid list output for short build ids
With shorter md5 build ids we need to align their paths properly with other build ids: $ perf buildid-list 17f4e448cc746582ea1881528deb549f7fdb3fd5 [kernel.kallsyms] a50e350e97c43b4708d09bcd85ebfff7 .../tools/perf/buildid-ex-md5 1805c738c8f3ec0f47b7ea09080c28f34d18a82b /usr/lib64/ld-2.31.so $ Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20201013192441.1299447-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
b0a323c7f0
commit
e9ad94381c
3 changed files with 5 additions and 4 deletions
|
@ -1369,7 +1369,7 @@ int dso__kernel_module_get_build_id(struct dso *dso,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t dso__fprintf_buildid(struct dso *dso, FILE *fp)
|
static size_t dso__fprintf_buildid(struct dso *dso, FILE *fp)
|
||||||
{
|
{
|
||||||
char sbuild_id[SBUILD_ID_SIZE];
|
char sbuild_id[SBUILD_ID_SIZE];
|
||||||
|
|
||||||
|
|
|
@ -362,7 +362,6 @@ struct dso *machine__findnew_kernel(struct machine *machine, const char *name,
|
||||||
|
|
||||||
void dso__reset_find_symbol_cache(struct dso *dso);
|
void dso__reset_find_symbol_cache(struct dso *dso);
|
||||||
|
|
||||||
size_t dso__fprintf_buildid(struct dso *dso, FILE *fp);
|
|
||||||
size_t dso__fprintf_symbols_by_name(struct dso *dso, FILE *fp);
|
size_t dso__fprintf_symbols_by_name(struct dso *dso, FILE *fp);
|
||||||
size_t dso__fprintf(struct dso *dso, FILE *fp);
|
size_t dso__fprintf(struct dso *dso, FILE *fp);
|
||||||
|
|
||||||
|
|
|
@ -287,10 +287,12 @@ size_t __dsos__fprintf_buildid(struct list_head *head, FILE *fp,
|
||||||
size_t ret = 0;
|
size_t ret = 0;
|
||||||
|
|
||||||
list_for_each_entry(pos, head, node) {
|
list_for_each_entry(pos, head, node) {
|
||||||
|
char sbuild_id[SBUILD_ID_SIZE];
|
||||||
|
|
||||||
if (skip && skip(pos, parm))
|
if (skip && skip(pos, parm))
|
||||||
continue;
|
continue;
|
||||||
ret += dso__fprintf_buildid(pos, fp);
|
build_id__sprintf(&pos->bid, sbuild_id);
|
||||||
ret += fprintf(fp, " %s\n", pos->long_name);
|
ret += fprintf(fp, "%-40s %s\n", sbuild_id, pos->long_name);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue