aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-buildid-cache.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/builtin-buildid-cache.c
parentperf probe: Move ftrace probe-event operations to probe-file.c (diff)
downloadlinux-dev-d77fac7f9e687d137b17296d86d9143c2cccab6a.tar.xz
linux-dev-d77fac7f9e687d137b17296d86d9143c2cccab6a.zip
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/builtin-buildid-cache.c')
-rw-r--r--tools/perf/builtin-buildid-cache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index ddca990bcc00..65b4835309c7 100644
--- a/tools/perf/builtin-buildid-cache.c
+++ b/tools/perf/builtin-buildid-cache.c
@@ -127,7 +127,7 @@ static int build_id_cache__kcore_existing(const char *from_dir, char *to_dir,
static int build_id_cache__add_kcore(const char *filename, bool force)
{
- char dir[32], sbuildid[BUILD_ID_SIZE * 2 + 1];
+ char dir[32], sbuildid[SBUILD_ID_SIZE];
char from_dir[PATH_MAX], to_dir[PATH_MAX];
char *p;
@@ -184,7 +184,7 @@ static int build_id_cache__add_kcore(const char *filename, bool force)
static int build_id_cache__add_file(const char *filename)
{
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
u8 build_id[BUILD_ID_SIZE];
int err;
@@ -204,7 +204,7 @@ static int build_id_cache__add_file(const char *filename)
static int build_id_cache__remove_file(const char *filename)
{
u8 build_id[BUILD_ID_SIZE];
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
int err;
@@ -276,7 +276,7 @@ static int build_id_cache__fprintf_missing(struct perf_session *session, FILE *f
static int build_id_cache__update_file(const char *filename)
{
u8 build_id[BUILD_ID_SIZE];
- char sbuild_id[BUILD_ID_SIZE * 2 + 1];
+ char sbuild_id[SBUILD_ID_SIZE];
int err = 0;