From a067558e2fa72445e8f6e6b2dd372a82afae6e49 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 17 Apr 2017 16:51:59 -0300 Subject: 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 Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-eh3vz5sqxsrdd8lodoro4jrw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/util/parse-events.c') diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 6b498aea9fde..535c7cbb2bfb 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -7,7 +7,7 @@ #include #include "parse-events.h" #include -#include "string.h" +#include "string2.h" #include "symbol.h" #include "cache.h" #include "header.h" -- cgit v1.2.3 From a43783aeec5fac8ef372ff8c0a5bbb3056fc0604 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 18 Apr 2017 10:46:11 -0300 Subject: perf tools: Include errno.h where needed Removing it from util.h, part of an effort to disentangle the includes hell, that makes changes to util.h or something included by it to cause a complete rebuild of the tools. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-ztrjy52q1rqcchuy3rubfgt2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/parse-events.c') diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 535c7cbb2bfb..d4877c8438e5 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1,5 +1,6 @@ #include #include +#include #include "util.h" #include "../perf.h" #include "evlist.h" -- cgit v1.2.3 From 8ec20b176c4be72d067fa18e33a4f156d1da9bc8 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 18 Apr 2017 10:57:25 -0300 Subject: perf str{filter,list}: Disentangle headers There are places where we just need a forward declaration, and others were we need to include strlist.h and/or strfilter.h, reducing the impact of changes in headers on the build time, do it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-zab42gbiki88y9k0csorxekb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/parse-events.c') diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index d4877c8438e5..580f0e17ad38 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -9,6 +9,7 @@ #include "parse-events.h" #include #include "string2.h" +#include "strlist.h" #include "symbol.h" #include "cache.h" #include "header.h" -- cgit v1.2.3 From b0742e90f5ab904aa835350c28bcec48e9109379 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 18 Apr 2017 11:08:10 -0300 Subject: perf tools: Don't include terminal handling headers in util.h Continuing the disentanglement, mostly the TUI needs CTRL(c), that is in sys/ttydefaults.h and term.c needs the termios headers. And term.h needs to be added to a few places too. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-il19zna7qj9ytavdbwlipc7t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/perf/util/parse-events.c') diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 580f0e17ad38..f3dd1aa59a25 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1,7 +1,7 @@ #include #include #include -#include "util.h" +#include "term.h" #include "../perf.h" #include "evlist.h" #include "evsel.h" -- cgit v1.2.3 From 76b31a29ddaf2fa5f0a70458c214bed02a4a70e9 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 18 Apr 2017 12:26:44 -0300 Subject: perf tools: Remove include dirent.h from util.h The files using the dirent.h routines should instead include it, reducing the includes hell that lead to longer build times. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-42g2f4z6nfg7mdb2ae97n7tj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/parse-events.c') diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index f3dd1aa59a25..7d84338b19ee 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1,5 +1,6 @@ #include #include +#include #include #include "term.h" #include "../perf.h" -- cgit v1.2.3 From 391e42060098a743a87380ed02bf4c8126742b04 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 19 Apr 2017 18:51:14 -0300 Subject: perf tools: Include sys/param.h where needed As it is going away from util.h, where it is not needed. This is mostly for things like MAXPATHLEN, MAX() and MIN(), these later two probably should go away in favor of its kernel sources replacements. Link: http://lkml.kernel.org/n/tip-z1666f3fl3fqobxvjr5o2r39@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/parse-events.c') diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 7d84338b19ee..4f7e42e18f8a 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "term.h" #include "../perf.h" #include "evlist.h" -- cgit v1.2.3 From 86a5e0c2028899465a129d87f60fe4018c5ae839 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Wed, 19 Apr 2017 19:03:14 -0300 Subject: perf tools: Remove sys/ioctl.h from util.h Not needed in this header, added to the places that need 'struct winsize' and the ioctl defines. Link: http://lkml.kernel.org/n/tip-2pznlli3146y4242otlcm70m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/parse-events.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/parse-events.c') diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 4f7e42e18f8a..01e779b91c8e 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include "term.h" #include "../perf.h" -- cgit v1.2.3