move same_thread_group checking from do_trace into pre_trace

check it eariler, then saving many assignment in ftrace_event_raw_##call