Skip to content

Commit a067558

Browse files
committed
perf tools: Move extra string util functions to util/string2.h
Moving them from util.h, where they don't belong. Since libc already have string.h, name it slightly differently, as string2.h. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-eh3vz5sqxsrdd8lodoro4jrw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 632a5ca commit a067558

23 files changed

Lines changed: 72 additions & 41 deletions

‎tools/perf/bench/mem-functions.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <subcmd/parse-options.h>
1313
#include "../util/header.h"
1414
#include "../util/cloexec.h"
15+
#include "../util/string2.h"
1516
#include "bench.h"
1617
#include "mem-memcpy-arch.h"
1718
#include "mem-memset-arch.h"

‎tools/perf/builtin-script.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "util/cpumap.h"
2222
#include "util/thread_map.h"
2323
#include "util/stat.h"
24+
#include "util/string2.h"
2425
#include "util/thread-stack.h"
2526
#include "util/time-utils.h"
2627
#include "print_binary.h"

‎tools/perf/builtin-stat.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
#include "util/session.h"
6565
#include "util/tool.h"
6666
#include "util/group.h"
67+
#include "util/string2.h"
6768
#include "asm/bug.h"
6869

6970
#include <linux/time64.h>

‎tools/perf/builtin-trace.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "util/bpf-loader.h"
3838
#include "callchain.h"
3939
#include "print_binary.h"
40+
#include "string2.h"
4041
#include "syscalltbl.h"
4142
#include "rb_resort.h"
4243

‎tools/perf/ui/browser.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "../util.h"
2+
#include "../string2.h"
23
#include "../config.h"
34
#include "../../perf.h"
45
#include "libslang.h"

‎tools/perf/ui/browsers/hists.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "map.h"
2121
#include "annotate.h"
2222
#include "srcline.h"
23+
#include "string2.h"
2324

2425
#include "sane_ctype.h"
2526

‎tools/perf/ui/gtk/hists.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "../sort.h"
55
#include "../hist.h"
66
#include "../helpline.h"
7+
#include "../string2.h"
78
#include "gtk.h"
89

910
#define MAX_COLUMNS 32

‎tools/perf/ui/stdio/hist.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "../../util/sort.h"
66
#include "../../util/evsel.h"
77
#include "../../util/srcline.h"
8+
#include "../../util/string2.h"
89
#include "../../util/sane_ctype.h"
910

1011
static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin)

‎tools/perf/util/annotate.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "annotate.h"
2020
#include "evsel.h"
2121
#include "block-range.h"
22+
#include "string2.h"
2223
#include "arch/common.h"
2324
#include <regex.h>
2425
#include <pthread.h>

‎tools/perf/util/dso.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "auxtrace.h"
99
#include "util.h"
1010
#include "debug.h"
11+
#include "string2.h"
1112
#include "vdso.h"
1213

1314
static const char * const debuglink_paths[] = {

0 commit comments

Comments
 (0)