lkml.org 
[lkml]   [2013]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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




\
 
 \ /
  Last update: 2013-02-16 02:01    [W:0.204 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site