linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf: remove unneeded include of network header files
@ 2012-09-05 21:53 David Ahern
  2012-09-05 22:40 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 7+ messages in thread
From: David Ahern @ 2012-09-05 21:53 UTC (permalink / raw)
  To: acme, linux-kernel
  Cc: David Ahern, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra

perf does not have networking related functionality, and the inclusion of
these headers is one of the causes of compile failures for Android:
  https://lkml.org/lkml/2012/8/23/316
  https://lkml.org/lkml/2012/8/28/293

So, remove them.

v2:
- netdb.h is required by trace-event-perl.c, so leave it in

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
 tools/perf/util/util.h |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 00a93a9..b89a88c 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -69,10 +69,6 @@
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <sys/select.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
 #include <netdb.h>
 #include <inttypes.h>
 #include "../../../include/linux/magic.h"
-- 
1.7.10.1


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

* Re: [PATCH] perf: remove unneeded include of network header files
  2012-09-05 21:53 [PATCH] perf: remove unneeded include of network header files David Ahern
@ 2012-09-05 22:40 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-05 22:40 UTC (permalink / raw)
  To: David Ahern
  Cc: linux-kernel, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra

Em Wed, Sep 05, 2012 at 03:53:06PM -0600, David Ahern escreveu:
> perf does not have networking related functionality, and the inclusion of
> these headers is one of the causes of compile failures for Android:
>   https://lkml.org/lkml/2012/8/23/316
>   https://lkml.org/lkml/2012/8/28/293
> 
> So, remove them.
> 
> v2:
> - netdb.h is required by trace-event-perl.c, so leave it in

Nope, I've applied this instead:

commit 12046099160e65cddb639f8b3dda2bd0701c09d6
Author: David Ahern <dsahern@gmail.com>
Date:   Wed Aug 29 09:55:32 2012 -0600

    perf tools: remove unneeded include of network header files
    
    perf does not have networking related functionality, and the inclusion
    of these headers is one of the causes of compile failures for Android:
    
      https://lkml.org/lkml/2012/8/23/316
      https://lkml.org/lkml/2012/8/28/293
    
    So, remove them.
    
    Signed-off-by: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/1346255732-93246-1-git-send-email-dsahern@gmail.com
    [ committer note: fix trace-event-perl.c compile failure by reordering includes ]
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index d280010..94e6736 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -25,16 +25,16 @@
 #include <ctype.h>
 #include <errno.h>
 
-#include "../../perf.h"
 #include "../util.h"
+#include <EXTERN.h>
+#include <perl.h>
+
+#include "../../perf.h"
 #include "../thread.h"
 #include "../event.h"
 #include "../trace-event.h"
 #include "../evsel.h"
 
-#include <EXTERN.h>
-#include <perl.h>
-
 void boot_Perf__Trace__Context(pTHX_ CV *cv);
 void boot_DynaLoader(pTHX_ CV *cv);
 typedef PerlInterpreter * INTERP;
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 00a93a9..67a3713 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -69,11 +69,6 @@
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <sys/select.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <netdb.h>
 #include <inttypes.h>
 #include "../../../include/linux/magic.h"
 #include "types.h"

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

* Re: [PATCH] perf: remove unneeded include of network header files
  2012-09-05 22:37     ` Arnaldo Carvalho de Melo
@ 2012-09-05 23:06       ` David Ahern
  0 siblings, 0 replies; 7+ messages in thread
From: David Ahern @ 2012-09-05 23:06 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra

On 9/5/12 4:37 PM, Arnaldo Carvalho de Melo wrote:
>
> I fixed it already, nevermind, it was just a matter of reordering
> includes, think how fragil that is, but it works now.

tried that route too. I could not figure out the magic ordering, so 
punted on v2 of the patch leaving netdb.h in. Glad to see you figured 
out an ordering that works.

David


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

* Re: [PATCH] perf: remove unneeded include of network header files
  2012-09-05 21:18   ` David Ahern
@ 2012-09-05 22:37     ` Arnaldo Carvalho de Melo
  2012-09-05 23:06       ` David Ahern
  0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-05 22:37 UTC (permalink / raw)
  To: David Ahern
  Cc: linux-kernel, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra

Em Wed, Sep 05, 2012 at 03:18:03PM -0600, David Ahern escreveu:
> On 9/5/12 2:39 PM, Arnaldo Carvalho de Melo wrote:
> >Em Wed, Aug 29, 2012 at 09:55:32AM -0600, David Ahern escreveu:
> >>perf does not have networking related functionality, and the inclusion of
> >>these headers is one of the causes of compile failures for Android:
> >>   https://lkml.org/lkml/2012/8/23/316
> >>   https://lkml.org/lkml/2012/8/28/293
> >>
> >>So, remove them.
> >>
> >>Signed-off-by: David Ahern <dsahern@gmail.com>
> >>Cc: Ingo Molnar <mingo@kernel.org>
> >>Cc: Frederic Weisbecker <fweisbec@gmail.com>
> >>Cc: Peter Zijlstra <peterz@infradead.org>
> >
> >     CC /home/acme/git/build/perf/util/scripting-engines/trace-event-python.o
> >In file included from /usr/lib64/perl5/CORE/perl.h:1239,
> >                  from util/scripting-engines/trace-event-perl.c:36:
> >/usr/include/netdb.h:591: error: expected identifier or ‘(’ before ‘[’ token
> >make: *** [/home/acme/git/build/perf/util/scripting-engines/trace-event-perl.o] Error 1
> >make: *** Waiting for unfinished jobs....
> >make: Leaving directory `/home/git/linux/tools/perf'
> 
> grr... removed the perl package testing the kconfig integration.
> forgot to reinstall. Will update.
> 

I fixed it already, nevermind, it was just a matter of reordering
includes, think how fragil that is, but it works now.

- Arnaldo

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

* Re: [PATCH] perf: remove unneeded include of network header files
  2012-09-05 20:39 ` Arnaldo Carvalho de Melo
@ 2012-09-05 21:18   ` David Ahern
  2012-09-05 22:37     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 7+ messages in thread
From: David Ahern @ 2012-09-05 21:18 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra

On 9/5/12 2:39 PM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Aug 29, 2012 at 09:55:32AM -0600, David Ahern escreveu:
>> perf does not have networking related functionality, and the inclusion of
>> these headers is one of the causes of compile failures for Android:
>>    https://lkml.org/lkml/2012/8/23/316
>>    https://lkml.org/lkml/2012/8/28/293
>>
>> So, remove them.
>>
>> Signed-off-by: David Ahern <dsahern@gmail.com>
>> Cc: Ingo Molnar <mingo@kernel.org>
>> Cc: Frederic Weisbecker <fweisbec@gmail.com>
>> Cc: Peter Zijlstra <peterz@infradead.org>
>
>      CC /home/acme/git/build/perf/util/scripting-engines/trace-event-python.o
> In file included from /usr/lib64/perl5/CORE/perl.h:1239,
>                   from util/scripting-engines/trace-event-perl.c:36:
> /usr/include/netdb.h:591: error: expected identifier or ‘(’ before ‘[’ token
> make: *** [/home/acme/git/build/perf/util/scripting-engines/trace-event-perl.o] Error 1
> make: *** Waiting for unfinished jobs....
> make: Leaving directory `/home/git/linux/tools/perf'

grr... removed the perl package testing the kconfig integration. forgot 
to reinstall. Will update.



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

* Re: [PATCH] perf: remove unneeded include of network header files
  2012-08-29 15:55 David Ahern
@ 2012-09-05 20:39 ` Arnaldo Carvalho de Melo
  2012-09-05 21:18   ` David Ahern
  0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-05 20:39 UTC (permalink / raw)
  To: David Ahern
  Cc: linux-kernel, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra

Em Wed, Aug 29, 2012 at 09:55:32AM -0600, David Ahern escreveu:
> perf does not have networking related functionality, and the inclusion of
> these headers is one of the causes of compile failures for Android:
>   https://lkml.org/lkml/2012/8/23/316
>   https://lkml.org/lkml/2012/8/28/293
> 
> So, remove them.
> 
> Signed-off-by: David Ahern <dsahern@gmail.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Peter Zijlstra <peterz@infradead.org>

    CC /home/acme/git/build/perf/util/scripting-engines/trace-event-python.o
In file included from /usr/lib64/perl5/CORE/perl.h:1239,
                 from util/scripting-engines/trace-event-perl.c:36:
/usr/include/netdb.h:591: error: expected identifier or ‘(’ before ‘[’ token
make: *** [/home/acme/git/build/perf/util/scripting-engines/trace-event-perl.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/git/linux/tools/perf'
[acme@sandy linux]$

- Arnaldo

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

* [PATCH] perf: remove unneeded include of network header files
@ 2012-08-29 15:55 David Ahern
  2012-09-05 20:39 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 7+ messages in thread
From: David Ahern @ 2012-08-29 15:55 UTC (permalink / raw)
  To: acme, linux-kernel
  Cc: David Ahern, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra

perf does not have networking related functionality, and the inclusion of
these headers is one of the causes of compile failures for Android:
  https://lkml.org/lkml/2012/8/23/316
  https://lkml.org/lkml/2012/8/28/293

So, remove them.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
 tools/perf/util/util.h |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 00a93a9..67a3713 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -69,11 +69,6 @@
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <sys/select.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <netdb.h>
 #include <inttypes.h>
 #include "../../../include/linux/magic.h"
 #include "types.h"
-- 
1.7.10.1


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

end of thread, other threads:[~2012-09-05 23:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 21:53 [PATCH] perf: remove unneeded include of network header files David Ahern
2012-09-05 22:40 ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2012-08-29 15:55 David Ahern
2012-09-05 20:39 ` Arnaldo Carvalho de Melo
2012-09-05 21:18   ` David Ahern
2012-09-05 22:37     ` Arnaldo Carvalho de Melo
2012-09-05 23:06       ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).