diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/MANIFEST | 2 | ||||
-rw-r--r-- | tools/perf/util/Build | 6 | ||||
-rw-r--r-- | tools/perf/util/include/linux/string.h | 3 | ||||
-rw-r--r-- | tools/perf/util/string.c | 16 |
4 files changed, 8 insertions, 19 deletions
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST index 39c38cb45b00..2562eac6451d 100644 --- a/tools/perf/MANIFEST +++ b/tools/perf/MANIFEST | |||
@@ -22,6 +22,7 @@ tools/lib/api | |||
22 | tools/lib/bpf | 22 | tools/lib/bpf |
23 | tools/lib/hweight.c | 23 | tools/lib/hweight.c |
24 | tools/lib/rbtree.c | 24 | tools/lib/rbtree.c |
25 | tools/lib/string.c | ||
25 | tools/lib/symbol/kallsyms.c | 26 | tools/lib/symbol/kallsyms.c |
26 | tools/lib/symbol/kallsyms.h | 27 | tools/lib/symbol/kallsyms.h |
27 | tools/lib/util/find_next_bit.c | 28 | tools/lib/util/find_next_bit.c |
@@ -50,6 +51,7 @@ tools/include/linux/log2.h | |||
50 | tools/include/linux/poison.h | 51 | tools/include/linux/poison.h |
51 | tools/include/linux/rbtree.h | 52 | tools/include/linux/rbtree.h |
52 | tools/include/linux/rbtree_augmented.h | 53 | tools/include/linux/rbtree_augmented.h |
54 | tools/include/linux/string.h | ||
53 | tools/include/linux/types.h | 55 | tools/include/linux/types.h |
54 | tools/include/linux/err.h | 56 | tools/include/linux/err.h |
55 | include/asm-generic/bitops/arch_hweight.h | 57 | include/asm-generic/bitops/arch_hweight.h |
diff --git a/tools/perf/util/Build b/tools/perf/util/Build index 591b3fe3ed49..e2316900f96f 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build | |||
@@ -21,6 +21,7 @@ libperf-y += parse-events.o | |||
21 | libperf-y += perf_regs.o | 21 | libperf-y += perf_regs.o |
22 | libperf-y += path.o | 22 | libperf-y += path.o |
23 | libperf-y += rbtree.o | 23 | libperf-y += rbtree.o |
24 | libperf-y += libstring.o | ||
24 | libperf-y += bitmap.o | 25 | libperf-y += bitmap.o |
25 | libperf-y += hweight.o | 26 | libperf-y += hweight.o |
26 | libperf-y += run-command.o | 27 | libperf-y += run-command.o |
@@ -138,6 +139,7 @@ $(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c | |||
138 | 139 | ||
139 | CFLAGS_find_next_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" | 140 | CFLAGS_find_next_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
140 | CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" | 141 | CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
142 | CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" | ||
141 | CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" | 143 | CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))" |
142 | CFLAGS_parse-events.o += -Wno-redundant-decls | 144 | CFLAGS_parse-events.o += -Wno-redundant-decls |
143 | 145 | ||
@@ -153,6 +155,10 @@ $(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE | |||
153 | $(call rule_mkdir) | 155 | $(call rule_mkdir) |
154 | $(call if_changed_dep,cc_o_c) | 156 | $(call if_changed_dep,cc_o_c) |
155 | 157 | ||
158 | $(OUTPUT)util/libstring.o: ../lib/string.c FORCE | ||
159 | $(call rule_mkdir) | ||
160 | $(call if_changed_dep,cc_o_c) | ||
161 | |||
156 | $(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE | 162 | $(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE |
157 | $(call rule_mkdir) | 163 | $(call rule_mkdir) |
158 | $(call if_changed_dep,cc_o_c) | 164 | $(call if_changed_dep,cc_o_c) |
diff --git a/tools/perf/util/include/linux/string.h b/tools/perf/util/include/linux/string.h deleted file mode 100644 index 6f19c548ecc0..000000000000 --- a/tools/perf/util/include/linux/string.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | #include <string.h> | ||
2 | |||
3 | void *memdup(const void *src, size_t len); | ||
diff --git a/tools/perf/util/string.c b/tools/perf/util/string.c index fc8781de62db..7f7e072be746 100644 --- a/tools/perf/util/string.c +++ b/tools/perf/util/string.c | |||
@@ -342,22 +342,6 @@ char *rtrim(char *s) | |||
342 | return s; | 342 | return s; |
343 | } | 343 | } |
344 | 344 | ||
345 | /** | ||
346 | * memdup - duplicate region of memory | ||
347 | * @src: memory region to duplicate | ||
348 | * @len: memory region length | ||
349 | */ | ||
350 | void *memdup(const void *src, size_t len) | ||
351 | { | ||
352 | void *p; | ||
353 | |||
354 | p = malloc(len); | ||
355 | if (p) | ||
356 | memcpy(p, src, len); | ||
357 | |||
358 | return p; | ||
359 | } | ||
360 | |||
361 | char *asprintf_expr_inout_ints(const char *var, bool in, size_t nints, int *ints) | 345 | char *asprintf_expr_inout_ints(const char *var, bool in, size_t nints, int *ints) |
362 | { | 346 | { |
363 | /* | 347 | /* |