public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 31/45] tools/perf: remove duplicate includes
@ 2017-12-06 17:43 Pravin Shedge
  2017-12-07 15:24 ` Arnaldo Carvalho de Melo
  2017-12-28 15:27 ` [tip:perf/core] perf perf: Remove " tip-bot for Pravin Shedge
  0 siblings, 2 replies; 3+ messages in thread
From: Pravin Shedge @ 2017-12-06 17:43 UTC (permalink / raw)
  To: tglx, mingo, peterz, acme, jolsa, gregkh, davem
  Cc: linux-kernel, pravin.shedge4linux

These duplicate includes have been found with scripts/checkincludes.pl but
they have been removed manually to avoid removing false positives.

Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>
---
 tools/perf/bench/futex-hash.c                          | 1 -
 tools/perf/builtin-c2c.c                               | 3 ---
 tools/perf/builtin-record.c                            | 1 -
 tools/perf/builtin-stat.c                              | 1 -
 tools/perf/tests/parse-events.c                        | 1 -
 tools/perf/util/auxtrace.c                             | 3 ---
 tools/perf/util/header.c                               | 2 --
 tools/perf/util/metricgroup.c                          | 2 --
 tools/perf/util/scripting-engines/trace-event-python.c | 1 -
 9 files changed, 15 deletions(-)

diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c
index 58ae6ed..4a3c1df 100644
--- a/tools/perf/bench/futex-hash.c
+++ b/tools/perf/bench/futex-hash.c
@@ -26,7 +26,6 @@
 #include "futex.h"
 
 #include <err.h>
-#include <sys/time.h>
 
 static unsigned int nthreads = 0;
 static unsigned int nsecs    = 10;
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 17855c4..54d2cec 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -27,13 +27,10 @@
 #include "sort.h"
 #include "tool.h"
 #include "data.h"
-#include "sort.h"
 #include "event.h"
 #include "evlist.h"
 #include "evsel.h"
-#include <asm/bug.h>
 #include "ui/browsers/hists.h"
-#include "evlist.h"
 #include "thread.h"
 
 struct c2c_hists {
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 3d7f33e..93ef455 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -51,7 +51,6 @@
 #include <signal.h>
 #include <sys/mman.h>
 #include <sys/wait.h>
-#include <asm/bug.h>
 #include <linux/time64.h>
 
 struct switch_output {
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 59af5a8..1d9af8a 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -63,7 +63,6 @@
 #include "util/group.h"
 #include "util/session.h"
 #include "util/tool.h"
-#include "util/group.h"
 #include "util/string2.h"
 #include "util/metricgroup.h"
 #include "asm/bug.h"
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index f067961..18b0644 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -13,7 +13,6 @@
 #include <unistd.h>
 #include <linux/kernel.h>
 #include <linux/hw_breakpoint.h>
-#include <api/fs/fs.h>
 #include <api/fs/tracing_path.h>
 
 #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index a3349141..c76687e 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -31,9 +31,6 @@
 #include <sys/param.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
-#include <limits.h>
-#include <errno.h>
 #include <linux/list.h>
 
 #include "../perf.h"
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 7c0e9d5..3e283b0 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -15,9 +15,7 @@
 #include <linux/bitops.h>
 #include <linux/stringify.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <sys/utsname.h>
-#include <unistd.h>
 
 #include "evlist.h"
 #include "evsel.h"
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index 0ddd9c1..699311d 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -20,12 +20,10 @@
 #include "pmu.h"
 #include "expr.h"
 #include "rblist.h"
-#include "pmu.h"
 #include <string.h>
 #include <stdbool.h>
 #include <errno.h>
 #include "pmu-events/pmu-events.h"
-#include "strbuf.h"
 #include "strlist.h"
 #include <assert.h>
 #include <ctype.h>
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index c7187f0..c1848b5 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -43,7 +43,6 @@
 #include "../db-export.h"
 #include "../thread-stack.h"
 #include "../trace-event.h"
-#include "../machine.h"
 #include "../call-path.h"
 #include "thread_map.h"
 #include "cpumap.h"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 31/45] tools/perf: remove duplicate includes
  2017-12-06 17:43 [PATCH 31/45] tools/perf: remove duplicate includes Pravin Shedge
@ 2017-12-07 15:24 ` Arnaldo Carvalho de Melo
  2017-12-28 15:27 ` [tip:perf/core] perf perf: Remove " tip-bot for Pravin Shedge
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-12-07 15:24 UTC (permalink / raw)
  To: Pravin Shedge; +Cc: tglx, mingo, peterz, jolsa, gregkh, davem, linux-kernel

Em Wed, Dec 06, 2017 at 11:13:24PM +0530, Pravin Shedge escreveu:
> These duplicate includes have been found with scripts/checkincludes.pl but
> they have been removed manually to avoid removing false positives.

Thanks, checked the dups manually too and applied,

- Arnaldo
 
> Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>
> ---
>  tools/perf/bench/futex-hash.c                          | 1 -
>  tools/perf/builtin-c2c.c                               | 3 ---
>  tools/perf/builtin-record.c                            | 1 -
>  tools/perf/builtin-stat.c                              | 1 -
>  tools/perf/tests/parse-events.c                        | 1 -
>  tools/perf/util/auxtrace.c                             | 3 ---
>  tools/perf/util/header.c                               | 2 --
>  tools/perf/util/metricgroup.c                          | 2 --
>  tools/perf/util/scripting-engines/trace-event-python.c | 1 -
>  9 files changed, 15 deletions(-)
> 
> diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c
> index 58ae6ed..4a3c1df 100644
> --- a/tools/perf/bench/futex-hash.c
> +++ b/tools/perf/bench/futex-hash.c
> @@ -26,7 +26,6 @@
>  #include "futex.h"
>  
>  #include <err.h>
> -#include <sys/time.h>
>  
>  static unsigned int nthreads = 0;
>  static unsigned int nsecs    = 10;
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index 17855c4..54d2cec 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -27,13 +27,10 @@
>  #include "sort.h"
>  #include "tool.h"
>  #include "data.h"
> -#include "sort.h"
>  #include "event.h"
>  #include "evlist.h"
>  #include "evsel.h"
> -#include <asm/bug.h>
>  #include "ui/browsers/hists.h"
> -#include "evlist.h"
>  #include "thread.h"
>  
>  struct c2c_hists {
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 3d7f33e..93ef455 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -51,7 +51,6 @@
>  #include <signal.h>
>  #include <sys/mman.h>
>  #include <sys/wait.h>
> -#include <asm/bug.h>
>  #include <linux/time64.h>
>  
>  struct switch_output {
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 59af5a8..1d9af8a 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -63,7 +63,6 @@
>  #include "util/group.h"
>  #include "util/session.h"
>  #include "util/tool.h"
> -#include "util/group.h"
>  #include "util/string2.h"
>  #include "util/metricgroup.h"
>  #include "asm/bug.h"
> diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
> index f067961..18b0644 100644
> --- a/tools/perf/tests/parse-events.c
> +++ b/tools/perf/tests/parse-events.c
> @@ -13,7 +13,6 @@
>  #include <unistd.h>
>  #include <linux/kernel.h>
>  #include <linux/hw_breakpoint.h>
> -#include <api/fs/fs.h>
>  #include <api/fs/tracing_path.h>
>  
>  #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
> diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
> index a3349141..c76687e 100644
> --- a/tools/perf/util/auxtrace.c
> +++ b/tools/perf/util/auxtrace.c
> @@ -31,9 +31,6 @@
>  #include <sys/param.h>
>  #include <stdlib.h>
>  #include <stdio.h>
> -#include <string.h>
> -#include <limits.h>
> -#include <errno.h>
>  #include <linux/list.h>
>  
>  #include "../perf.h"
> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index 7c0e9d5..3e283b0 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -15,9 +15,7 @@
>  #include <linux/bitops.h>
>  #include <linux/stringify.h>
>  #include <sys/stat.h>
> -#include <sys/types.h>
>  #include <sys/utsname.h>
> -#include <unistd.h>
>  
>  #include "evlist.h"
>  #include "evsel.h"
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index 0ddd9c1..699311d 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -20,12 +20,10 @@
>  #include "pmu.h"
>  #include "expr.h"
>  #include "rblist.h"
> -#include "pmu.h"
>  #include <string.h>
>  #include <stdbool.h>
>  #include <errno.h>
>  #include "pmu-events/pmu-events.h"
> -#include "strbuf.h"
>  #include "strlist.h"
>  #include <assert.h>
>  #include <ctype.h>
> diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
> index c7187f0..c1848b5 100644
> --- a/tools/perf/util/scripting-engines/trace-event-python.c
> +++ b/tools/perf/util/scripting-engines/trace-event-python.c
> @@ -43,7 +43,6 @@
>  #include "../db-export.h"
>  #include "../thread-stack.h"
>  #include "../trace-event.h"
> -#include "../machine.h"
>  #include "../call-path.h"
>  #include "thread_map.h"
>  #include "cpumap.h"
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf perf: Remove duplicate includes
  2017-12-06 17:43 [PATCH 31/45] tools/perf: remove duplicate includes Pravin Shedge
  2017-12-07 15:24 ` Arnaldo Carvalho de Melo
@ 2017-12-28 15:27 ` tip-bot for Pravin Shedge
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Pravin Shedge @ 2017-12-28 15:27 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, acme, hpa, jolsa, pravin.shedge4linux, tglx, gregkh,
	davem, peterz, mingo

Commit-ID:  3315d14f8eea27a845bd2e3a88341a35f4025866
Gitweb:     https://git.kernel.org/tip/3315d14f8eea27a845bd2e3a88341a35f4025866
Author:     Pravin Shedge <pravin.shedge4linux@gmail.com>
AuthorDate: Wed, 6 Dec 2017 23:13:24 +0530
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 27 Dec 2017 12:15:49 -0300

perf perf: Remove duplicate includes

These duplicate includes have been found with scripts/checkincludes.pl
but they have been removed manually to avoid removing false positives.

Signed-off-by: Pravin Shedge <pravin.shedge4linux@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1512582204-6493-1-git-send-email-pravin.shedge4linux@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/bench/futex-hash.c                          | 1 -
 tools/perf/builtin-c2c.c                               | 3 ---
 tools/perf/builtin-record.c                            | 1 -
 tools/perf/builtin-stat.c                              | 1 -
 tools/perf/tests/parse-events.c                        | 1 -
 tools/perf/util/auxtrace.c                             | 3 ---
 tools/perf/util/header.c                               | 2 --
 tools/perf/util/metricgroup.c                          | 2 --
 tools/perf/util/scripting-engines/trace-event-python.c | 1 -
 9 files changed, 15 deletions(-)

diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c
index 2defb6d..9aa3a67 100644
--- a/tools/perf/bench/futex-hash.c
+++ b/tools/perf/bench/futex-hash.c
@@ -27,7 +27,6 @@
 #include "cpumap.h"
 
 #include <err.h>
-#include <sys/time.h>
 
 static unsigned int nthreads = 0;
 static unsigned int nsecs    = 10;
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index f1da9b0..c0debc3 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -27,13 +27,10 @@
 #include "sort.h"
 #include "tool.h"
 #include "data.h"
-#include "sort.h"
 #include "event.h"
 #include "evlist.h"
 #include "evsel.h"
-#include <asm/bug.h>
 #include "ui/browsers/hists.h"
-#include "evlist.h"
 #include "thread.h"
 
 struct c2c_hists {
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0a5749e..98da8cb 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -51,7 +51,6 @@
 #include <signal.h>
 #include <sys/mman.h>
 #include <sys/wait.h>
-#include <asm/bug.h>
 #include <linux/time64.h>
 
 struct switch_output {
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 58d501d..98bf9d3 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -63,7 +63,6 @@
 #include "util/group.h"
 #include "util/session.h"
 #include "util/tool.h"
-#include "util/group.h"
 #include "util/string2.h"
 #include "util/metricgroup.h"
 #include "asm/bug.h"
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index f067961..18b0644 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -13,7 +13,6 @@
 #include <unistd.h>
 #include <linux/kernel.h>
 #include <linux/hw_breakpoint.h>
-#include <api/fs/fs.h>
 #include <api/fs/tracing_path.h>
 
 #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index a3349141..c76687e 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -31,9 +31,6 @@
 #include <sys/param.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
-#include <limits.h>
-#include <errno.h>
 #include <linux/list.h>
 
 #include "../perf.h"
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 5890e08..ca73aa7 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -15,9 +15,7 @@
 #include <linux/bitops.h>
 #include <linux/stringify.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <sys/utsname.h>
-#include <unistd.h>
 
 #include "evlist.h"
 #include "evsel.h"
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
index e48410c..1ddc3d1 100644
--- a/tools/perf/util/metricgroup.c
+++ b/tools/perf/util/metricgroup.c
@@ -20,12 +20,10 @@
 #include "pmu.h"
 #include "expr.h"
 #include "rblist.h"
-#include "pmu.h"
 #include <string.h>
 #include <stdbool.h>
 #include <errno.h>
 #include "pmu-events/pmu-events.h"
-#include "strbuf.h"
 #include "strlist.h"
 #include <assert.h>
 #include <ctype.h>
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index c7187f0..c1848b5 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -43,7 +43,6 @@
 #include "../db-export.h"
 #include "../thread-stack.h"
 #include "../trace-event.h"
-#include "../machine.h"
 #include "../call-path.h"
 #include "thread_map.h"
 #include "cpumap.h"

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-28 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 17:43 [PATCH 31/45] tools/perf: remove duplicate includes Pravin Shedge
2017-12-07 15:24 ` Arnaldo Carvalho de Melo
2017-12-28 15:27 ` [tip:perf/core] perf perf: Remove " tip-bot for Pravin Shedge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox