tracing/mm: Move include of trace/events/kmem.h out of header into slab.c

Including trace/events/*.h TRACE_EVENT() macro headers in other headers
can cause strange side effects if another trace/event/*.h header
includes that header.  Having trace/events/kmem.h inside slab_def.h
caused a compile error in sparc64 when changes were done to some header
files.  Moving the kmem.h trace header out of slab.h and into slab.c
fixes the problem.

Note, both slub.c and slob.c already include the trace/events/kmem.h
file. Only slab.c had it missing.


Reported-by: Stephen Rothwell <>
Signed-off-by: Steven Rostedt <>
Signed-off-by: Linus Torvalds <>
2 files changed