Messages in this thread | | | Date | Fri, 15 Feb 2013 16:13:31 -0800 | From | "H. Peter Anvin" <> | Subject | Re: [PATCH v9 3/3] trace,x86: code-sharing between non-trace and trace irq handlers |
| |
On 02/04/2013 02:50 PM, Seiji Aguchi wrote: > [Issue] > > Currently, irq vector handlers for tracing are just > copied non-trace handlers by simply inserting tracepoints. > > It is difficult to manage the codes. > > [Solution] > > This patch shares common codes between non-trace and trace handlers > as follows to make them manageable and readable. > > Non-trace irq handler: > smp_irq_handler() > { > entering_irq(); /* pre-processing of this handler */ > __smp_irq_handler(); /* > * common logic between non-trace and trace handlers > * in a vector. > */ > exiting_irq(); /* post-processing of this handler */ > > } > > Trace irq_handler: > smp_trace_irq_handler() > { > entering_irq(); /* pre-processing of this handler */ > trace_irq_entry(); /* tracepoint for irq entry */ > __smp_irq_handler(); /* > * common logic between non-trace and trace handlers > * in a vector. > */ > trace_irq_exit(); /* tracepoint for irq exit */ > exiting_irq(); /* post-processing of this handler */ > > } >
How important is it that the tracepoint is *inside* the enter/exit handling? If not, it would be simpler to just do:
smp_trace_irq_handler() { trace_irq_entry(); smp_irq_handler(); trace_irq_exit(); }
... which seems a bit cleaner. If this isn't possible, then this patch is fine, but please add to the patch description why the simple wrapper isn't doable.
-hpa
| |