unsigned long irq_flags;
        struct ftrace_event_call *call = &tp->call;
 
-       tp->nhit++;
-
        local_save_flags(irq_flags);
        pc = preempt_count();
 
        unsigned long irq_flags;
        struct ftrace_event_call *call = &tp->call;
 
-       tp->nhit++;
-
        local_save_flags(irq_flags);
        pc = preempt_count();
 
 {
        struct trace_probe *tp = container_of(kp, struct trace_probe, rp.kp);
 
+       tp->nhit++;
+
        if (tp->flags & TP_FLAG_TRACE)
                kprobe_trace_func(kp, regs);
 #ifdef CONFIG_PERF_EVENTS
 {
        struct trace_probe *tp = container_of(ri->rp, struct trace_probe, rp);
 
+       tp->nhit++;
+
        if (tp->flags & TP_FLAG_TRACE)
                kretprobe_trace_func(ri, regs);
 #ifdef CONFIG_PERF_EVENTS