Messages in this thread | | | From | Namhyung Kim <> | Subject | Re: [PATCH 1/5] tools lib traceevent: Add WARN and WARN_ONCE macros | Date | Wed, 08 Jan 2014 16:38:05 +0900 |
| |
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@redhat.com> >> Signed-off-by: Namhyung Kim <namhyung@kernel.org> > > 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
| |