Re: [PATCH 1/5] tools lib traceevent: Add WARN and WARN_ONCE macros

From: Namhyung Kim
Date: Wed Jan 08 2014 - 02:38:18 EST


Hi Arnaldo,

On Tue, 7 Jan 2014 11:07:47 -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jan 07, 2014 at 12:00:08PM +0900, Namhyung Kim escreveu:
>> They're copied from the perf code and will be used to print error
>> message during trace_seq_printf() and friends.
>>
>> Suggested-by: Jiri Olsa <jolsa@xxxxxxxxxx>
>> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
>
> We could take this opportunity and come up with
> tools/lib/{bug,compiler}.h, matching the files in include/linux/ where
> those helpers come from, no?

Hmm.. maybe under tools/include/ ?

>
> Then make both tools/perf/ and tools/lib/traceevent/ use it, instead of
> creating the third copy (kernel proper, perf, libtraceevent).

Okay.

>
> Then, does anybody know why likely/unlikely is guarded inside __KERNEL__
> in include/linux/compiler.h?

IIUC it's because of BRANCH_PROFILING..


> I think the best thing would be for us to just use:
>
> #include <linux/compiler.h>
>
> just like kernel code and be done with it :-\

Yeah, but it seems to require some modifications.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/