All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Powertop] [PATCH 1/2] Make it possible to include parse-events.h before libc headers.
@ 2012-07-28 17:27 Magnus Fromreide
  0 siblings, 0 replies; 6+ messages in thread
From: Magnus Fromreide @ 2012-07-28 17:27 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On Thu, 2012-07-26 at 15:09 -0700, Chris Ferron wrote:
> Maybe, but wait a day, you inspired me to completely update and rebase 
> the pevent code.

Could you please remove the traceevent/.deps directory  and all the .Plo
files in it as they are regenerated each time the library is built?

/MF


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

* Re: [Powertop] [PATCH 1/2] Make it possible to include parse-events.h before libc headers.
@ 2012-07-30 16:08 Chris Ferron
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Ferron @ 2012-07-30 16:08 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

On 07/28/2012 10:27 AM, Magnus Fromreide wrote:
> On Thu, 2012-07-26 at 15:09 -0700, Chris Ferron wrote:
>> Maybe, but wait a day, you inspired me to completely update and rebase
>> the pevent code.
> Could you please remove the traceevent/.deps directory  and all the .Plo
> files in it as they are regenerated each time the library is built?
>
> /MF
>
Done

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

* Re: [Powertop] [PATCH 1/2] Make it possible to include parse-events.h before libc headers.
@ 2012-07-26 22:09 Chris Ferron
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Ferron @ 2012-07-26 22:09 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

On 07/25/2012 12:26 PM, Magnus Fromreide wrote:
> On Wed, 2012-07-25 at 10:44 -0700, Chris Ferron wrote:
>> On 07/23/2012 11:03 PM, Magnus Fromreide wrote:
>>> The __unused macro interferes with the glibc and is in a reserved namespace
>>> so it should be renamed.
>>> Additionally the __ununsed macro is used from just one implementation file so
>>> the macro is moved there.
>>>
>>> Signed-off-by: Magnus Fromreide <magfr(a)lysator.liu.se>
>>>    
>>>    
>> I will forward this on to Steve Rostedt. pevent code is not actually
>> strictly part of the powertop src, it is just temporarily being built as
>> part of the project so powertop can take advantage of it early.
> Thanks. I found no contact information for pevent but it feels like an
> imported library.
>
>> That said, it may not be a good fit for the grand scheme.
>> Which reminds me I need to push a readme explaining this.
> I am looking forward to it.
>
> Patch 2/2 depends on this, should I prepare an alternate version that
> doesn't trigger the bug in the pevent headers?
Maybe, but wait a day, you inspired me to completely update and rebase 
the pevent code.
>
> /MF
>


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

* Re: [Powertop] [PATCH 1/2] Make it possible to include parse-events.h before libc headers.
@ 2012-07-25 19:26 Magnus Fromreide
  0 siblings, 0 replies; 6+ messages in thread
From: Magnus Fromreide @ 2012-07-25 19:26 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

On Wed, 2012-07-25 at 10:44 -0700, Chris Ferron wrote:
> On 07/23/2012 11:03 PM, Magnus Fromreide wrote:
> > The __unused macro interferes with the glibc and is in a reserved namespace
> > so it should be renamed.
> > Additionally the __ununsed macro is used from just one implementation file so
> > the macro is moved there.
> >
> > Signed-off-by: Magnus Fromreide <magfr(a)lysator.liu.se>
> >   
> >   
> I will forward this on to Steve Rostedt. pevent code is not actually 
> strictly part of the powertop src, it is just temporarily being built as 
> part of the project so powertop can take advantage of it early.

Thanks. I found no contact information for pevent but it feels like an
imported library.

> That said, it may not be a good fit for the grand scheme.
> Which reminds me I need to push a readme explaining this.

I am looking forward to it.

Patch 2/2 depends on this, should I prepare an alternate version that
doesn't trigger the bug in the pevent headers?

/MF


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

* Re: [Powertop] [PATCH 1/2] Make it possible to include parse-events.h before libc headers.
@ 2012-07-25 17:44 Chris Ferron
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Ferron @ 2012-07-25 17:44 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2766 bytes --]

On 07/23/2012 11:03 PM, Magnus Fromreide wrote:
> The __unused macro interferes with the glibc and is in a reserved namespace
> so it should be renamed.
> Additionally the __ununsed macro is used from just one implementation file so
> the macro is moved there.
>
> Signed-off-by: Magnus Fromreide <magfr(a)lysator.liu.se>
> ---
>   pevent/parse-events.c |   12 +++++++++---
>   pevent/parse-events.h |    4 ----
>   2 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/pevent/parse-events.c b/pevent/parse-events.c
> index 58716e9..c039698 100644
> --- a/pevent/parse-events.c
> +++ b/pevent/parse-events.c
> @@ -37,6 +37,10 @@
>   
>   #include "parse-events.h"
>   
> +#ifndef pevent_unused
> +#define pevent_unused __attribute__ ((unused))
> +#endif
> +
>   static const char *input_buf;
>   static unsigned long long input_buf_ptr;
>   static unsigned long long input_buf_siz;
> @@ -1777,7 +1781,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
>   }
>   
>   static enum event_type
> -process_entry(struct event_format *event __unused, struct print_arg *arg,
> +process_entry(struct event_format *event pevent_unused, struct print_arg *arg,
>   	      char **tok)
>   {
>   	enum event_type type;
> @@ -2350,7 +2354,8 @@ process_paren(struct event_format *event, struct print_arg *arg, char **tok)
>   
>   
>   static enum event_type
> -process_str(struct event_format *event __unused, struct print_arg *arg, char **tok)
> +process_str(struct event_format *event pevent_unused, struct print_arg *arg,
> +	    char **tok)
>   {
>   	enum event_type type;
>   	char *token;
> @@ -3500,7 +3505,8 @@ static void free_args(struct print_arg *args)
>   }
>   
>   static char *
> -get_bprint_format(void *data, int size __unused, struct event_format *event)
> +get_bprint_format(void *data, int size pevent_unused,
> +		  struct event_format *event)
>   {
>   	struct pevent *pevent = event->pevent;
>   	unsigned long long addr;
> diff --git a/pevent/parse-events.h b/pevent/parse-events.h
> index 5d5d195..124aa1b 100644
> --- a/pevent/parse-events.h
> +++ b/pevent/parse-events.h
> @@ -27,10 +27,6 @@
>   #include <stdarg.h>
>   #include <regex.h>
>   
> -#ifndef __unused
> -#define __unused __attribute__ ((unused))
> -#endif
> -
>   /* ----------------------- trace_seq ----------------------- */
>   
>   
I will forward this on to Steve Rostedt. pevent code is not actually 
strictly part of the powertop src, it is just temporarily being built as 
part of the project so powertop can take advantage of it early. That 
said, it may not be a good fit for the grand scheme.
Which reminds me I need to push a readme explaining this.

-Chris

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

* [Powertop] [PATCH 1/2] Make it possible to include parse-events.h before libc headers.
@ 2012-07-24  6:03 Magnus Fromreide
  0 siblings, 0 replies; 6+ messages in thread
From: Magnus Fromreide @ 2012-07-24  6:03 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2223 bytes --]

The __unused macro interferes with the glibc and is in a reserved namespace
so it should be renamed.
Additionally the __ununsed macro is used from just one implementation file so
the macro is moved there.

Signed-off-by: Magnus Fromreide <magfr(a)lysator.liu.se>
---
 pevent/parse-events.c |   12 +++++++++---
 pevent/parse-events.h |    4 ----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/pevent/parse-events.c b/pevent/parse-events.c
index 58716e9..c039698 100644
--- a/pevent/parse-events.c
+++ b/pevent/parse-events.c
@@ -37,6 +37,10 @@
 
 #include "parse-events.h"
 
+#ifndef pevent_unused
+#define pevent_unused __attribute__ ((unused))
+#endif
+
 static const char *input_buf;
 static unsigned long long input_buf_ptr;
 static unsigned long long input_buf_siz;
@@ -1777,7 +1781,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
 }
 
 static enum event_type
-process_entry(struct event_format *event __unused, struct print_arg *arg,
+process_entry(struct event_format *event pevent_unused, struct print_arg *arg,
 	      char **tok)
 {
 	enum event_type type;
@@ -2350,7 +2354,8 @@ process_paren(struct event_format *event, struct print_arg *arg, char **tok)
 
 
 static enum event_type
-process_str(struct event_format *event __unused, struct print_arg *arg, char **tok)
+process_str(struct event_format *event pevent_unused, struct print_arg *arg,
+	    char **tok)
 {
 	enum event_type type;
 	char *token;
@@ -3500,7 +3505,8 @@ static void free_args(struct print_arg *args)
 }
 
 static char *
-get_bprint_format(void *data, int size __unused, struct event_format *event)
+get_bprint_format(void *data, int size pevent_unused,
+		  struct event_format *event)
 {
 	struct pevent *pevent = event->pevent;
 	unsigned long long addr;
diff --git a/pevent/parse-events.h b/pevent/parse-events.h
index 5d5d195..124aa1b 100644
--- a/pevent/parse-events.h
+++ b/pevent/parse-events.h
@@ -27,10 +27,6 @@
 #include <stdarg.h>
 #include <regex.h>
 
-#ifndef __unused
-#define __unused __attribute__ ((unused))
-#endif
-
 /* ----------------------- trace_seq ----------------------- */
 
 
-- 
1.7.10.4


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

end of thread, other threads:[~2012-07-30 16:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-28 17:27 [Powertop] [PATCH 1/2] Make it possible to include parse-events.h before libc headers Magnus Fromreide
  -- strict thread matches above, loose matches on Subject: below --
2012-07-30 16:08 Chris Ferron
2012-07-26 22:09 Chris Ferron
2012-07-25 19:26 Magnus Fromreide
2012-07-25 17:44 Chris Ferron
2012-07-24  6:03 Magnus Fromreide

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.