summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/build-id.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>2015-07-15 18:14:28 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-07-20 17:49:50 -0300
commitd77fac7f9e687d137b17296d86d9143c2cccab6a (patch)
tree7e122f9fbf81c8f5cdb5491d5aafff1fa18fc699 /tools/perf/util/build-id.c
parent92f6c72e7ac40cbf8d12682d1aeeb82c905f2a64 (diff)
downloadop-kernel-dev-d77fac7f9e687d137b17296d86d9143c2cccab6a.zip
op-kernel-dev-d77fac7f9e687d137b17296d86d9143c2cccab6a.tar.gz
perf buildid: Use SBUILD_ID_SIZE macro
Introduce SBUILD_ID_SIZE macro and use it instead of using BUILD_ID_SIZE * 2 + 1. Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/20150715091428.8915.75265.stgit@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/build-id.c')
-rw-r--r--tools/perf/util/build-id.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index f98c2ff..4a2c2f0 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -124,7 +124,7 @@ static char *build_id__filename(const char *sbuild_id, char *bf, size_t size)
char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size)
{
- char build_id_hex[BUILD_ID_SIZE * 2 + 1];
+ char build_id_hex[SBUILD_ID_SIZE];
if (!dso->has_build_id)
return NULL;
@@ -384,7 +384,7 @@ static int build_id_cache__add_b(const u8 *build_id, size_t build_id_size,
const char *name, bool is_kallsyms,
bool is_vdso)
{
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
build_id__sprintf(build_id, build_id_size, sbuild_id);
OpenPOWER on IntegriCloud