summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/cache.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2016-05-10 14:48:01 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-05-10 11:58:27 -0300
commit452e84012595d681f254a3a0d733fb0b18ffaf42 (patch)
treef601c801233d33d531f6f831fdfabb8b80344e01 /tools/perf/util/cache.h
parent682f4f035e0fcffce511fe77a02a0f19f0996d70 (diff)
downloadlinux-452e84012595d681f254a3a0d733fb0b18ffaf42.tar.gz
linux-452e84012595d681f254a3a0d733fb0b18ffaf42.tar.bz2
linux-452e84012595d681f254a3a0d733fb0b18ffaf42.zip
perf tools: Remove xrealloc and ALLOC_GROW
Remove unused xrealloc() and ALLOC_GROW() from libperf. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054801.6158.6204.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cache.h')
-rw-r--r--tools/perf/util/cache.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h
index 1f5a93c2c9a2..0d814bb74661 100644
--- a/tools/perf/util/cache.h
+++ b/tools/perf/util/cache.h
@@ -40,25 +40,6 @@ int split_cmdline(char *cmdline, const char ***argv);
#define alloc_nr(x) (((x)+16)*3/2)
-/*
- * Realloc the buffer pointed at by variable 'x' so that it can hold
- * at least 'nr' entries; the number of entries currently allocated
- * is 'alloc', using the standard growing factor alloc_nr() macro.
- *
- * DO NOT USE any expression with side-effect for 'x' or 'alloc'.
- */
-#define ALLOC_GROW(x, nr, alloc) \
- do { \
- if ((nr) > alloc) { \
- if (alloc_nr(alloc) < (nr)) \
- alloc = (nr); \
- else \
- alloc = alloc_nr(alloc); \
- x = xrealloc((x), alloc * sizeof(*(x))); \
- } \
- } while(0)
-
-
static inline int is_absolute_path(const char *path)
{
return path[0] == '/';