perf string: Move 'dots' and 'graph_dotted_line' out of sane_ctype.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 25 Jun 2019 20:31:26 +0000 (17:31 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 25 Jun 2019 20:31:26 +0000 (17:31 -0300)
Those are not in that file in the git repo, lets move it from there so
that we get that sane ctype code fully isolated to allow getting it in
sync either with the git sources or better with the kernel sources
(include/linux/ctype.h + lib/ctype.h), that way we can use
check_headers.h to get notified when changes are made in the original
code so that we can cherry-pick.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-ioh5sghn3943j0rxg6lb2dgs@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kmem.c
tools/perf/builtin-sched.c
tools/perf/builtin-top.c
tools/perf/util/ctype.c
tools/perf/util/evsel.c
tools/perf/util/sane_ctype.h
tools/perf/util/string.c
tools/perf/util/string2.h

index b80eee45511113cd094bbe3f75bd2bdab001e0bc..b833b03d71957f3f6bd39236329b3b130220888a 100644 (file)
@@ -21,6 +21,7 @@
 #include "util/cpumap.h"
 
 #include "util/debug.h"
+#include "util/string2.h"
 
 #include <linux/kernel.h>
 #include <linux/rbtree.h>
index 275f2d92a7bf97de9888838930d745f8f89dba6c..79577b67c8981e28379528e8bf52a7b0f4798df0 100644 (file)
@@ -15,6 +15,7 @@
 #include "util/thread_map.h"
 #include "util/color.h"
 #include "util/stat.h"
+#include "util/string2.h"
 #include "util/callchain.h"
 #include "util/time-utils.h"
 
index 12b6b15a9675c8b62ebb4a5025d2cbc3ae42b48b..4ef02e6888ff1e51f2d3813503865ebd9f84c82c 100644 (file)
@@ -40,6 +40,7 @@
 #include "util/cpumap.h"
 #include "util/xyarray.h"
 #include "util/sort.h"
+#include "util/string2.h"
 #include "util/term.h"
 #include "util/intlist.h"
 #include "util/parse-branch-options.h"
index 75c0da59c230c1bb68798eedaf853a905dfb5866..f84ecd9e5329a1cebfd0160f49d9648f542b641a 100644 (file)
@@ -30,12 +30,3 @@ unsigned char sane_ctype[256] = {
        A, A, A, A, A, A, A, A, A, A, A, R, R, P, P, 0,         /* 112..127 */
        /* Nothing in the 128.. range */
 };
-
-const char *graph_dotted_line =
-       "---------------------------------------------------------------------"
-       "---------------------------------------------------------------------"
-       "---------------------------------------------------------------------";
-const char *dots =
-       "....................................................................."
-       "....................................................................."
-       ".....................................................................";
index 04c4ed1573cb9e6fa28d047783d37f3847a8ba58..4b175166d2645aebc7effe60200520a0a4f13db5 100644 (file)
@@ -35,6 +35,7 @@
 #include "debug.h"
 #include "trace-event.h"
 #include "stat.h"
+#include "string2.h"
 #include "memswap.h"
 #include "util/parse-branch-options.h"
 
index a2bb3890864f04590a91c7a7742cb60de7c5d330..c4dce9e3001bfee9b7d38abcdb19bf55d2dd9e64 100644 (file)
@@ -2,9 +2,6 @@
 #ifndef _PERF_SANE_CTYPE_H
 #define _PERF_SANE_CTYPE_H
 
-extern const char *graph_dotted_line;
-extern const char *dots;
-
 /* Sane ctype - no locale, and works with signed chars */
 #undef isascii
 #undef isspace
index d8bfd0c4d2cbdf964c0a7e266b139fb24bff83f1..b18884bd673b8e1b191004d0928931a5757b9f04 100644 (file)
@@ -6,6 +6,15 @@
 
 #include "sane_ctype.h"
 
+const char *graph_dotted_line =
+       "---------------------------------------------------------------------"
+       "---------------------------------------------------------------------"
+       "---------------------------------------------------------------------";
+const char *dots =
+       "....................................................................."
+       "....................................................................."
+       ".....................................................................";
+
 #define K 1024LL
 /*
  * perf_atoll()
index 4c68a09b97e8f2ea41e4fcbc7e22b8fe0c79631a..07fd3756854331e7e0cfdcd4cf9c0c93d5b2f880 100644 (file)
@@ -6,6 +6,9 @@
 #include <stddef.h>
 #include <string.h>
 
+extern const char *graph_dotted_line;
+extern const char *dots;
+
 s64 perf_atoll(const char *str);
 char **argv_split(const char *str, int *argcp);
 void argv_free(char **argv);