tracing/events: move the ftrace event tracing code to core