2009-04-09 00:48:44

by Zhao Lei

[permalink] [raw]
Subject: Re: [PATCH 2/2] ftrace: Output REC->var instead of __entry->varfor trace format

* From: "Ingo Molnar" <[email protected]>
>
> * Zhaolei <[email protected]> wrote:
>
>> print fmt: "irq=%d return=%s", __entry->irq, __entry->ret ? \"handled\" : \"unhandled\"
>>
>> "__entry" should be convert to "REC" by __stringify() macro.
>>
>> Signed-off-by: Zhao Lei <[email protected]>
>> ---
>> kernel/trace/trace_events_stage_2.h | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> good fix, but it is causing build trouble when applied to latest
> tip/master:
>
> include/trace/sched_event_types.h:257:1: error: macro "__stringify"
> passed 3 arguments, but takes just 1
Hello, Ingo

I tested this patch before send, but haven't see this error.
env is: gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)

This patch need on top of my previous one:
[PATCH 1/2] Make __stringify support variable argument macro
Maybe this is the reason.

Thanks
Zhaolei

>
> see: http://people.redhat.com/mingo/tip.git/README
>
> Ingo
>
>????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?


2009-04-10 13:47:01

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH 2/2] ftrace: Output REC->var instead of __entry->varfor trace format


* Zhaolei <[email protected]> wrote:

> * From: "Ingo Molnar" <[email protected]>
> >
> > * Zhaolei <[email protected]> wrote:
> >
> >> print fmt: "irq=%d return=%s", __entry->irq, __entry->ret ? \"handled\" : \"unhandled\"
> >>
> >> "__entry" should be convert to "REC" by __stringify() macro.
> >>
> >> Signed-off-by: Zhao Lei <[email protected]>
> >> ---
> >> kernel/trace/trace_events_stage_2.h | 4 ++--
> >> 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > good fix, but it is causing build trouble when applied to latest
> > tip/master:
> >
> > include/trace/sched_event_types.h:257:1: error: macro "__stringify"
> > passed 3 arguments, but takes just 1
> Hello, Ingo
>
> I tested this patch before send, but haven't see this error. env
> is: gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
>
> This patch need on top of my previous one: [PATCH 1/2] Make
> __stringify support variable argument macro Maybe this is the
> reason.

ah, indeed - i missed the 1/2 patch. I'll have another look.

Ingo