Gabriele Monaco <[email protected]> writes:
> The DA event handling functions are mostly duplicated because the
> per-task monitors need to propagate the task to use the pid in the trace
> events. This is a maintenance burden for a little advantage.
> The task can be obtained with some pointer arithmetic from the da_mon,
> hence only the function tracing events really need to differ.
>
> Unify all code handling the events, create da_trace_event() and
> da_trace_error() that only call the tracepoint function.
> Propagate the monitor id through the calls, the do_trace_ functions use
> the id (pid) in case of per-task monitors but ignore it for implicit
> monitors.

I think this overexplains. I would just explain the "WHY", then the
general idea how the patch solves the problem. Let the diff speaks for
the rest.

Perhaps something like:

    The DA event handling functions are mostly duplicated for
    differerent monitor types, because per-task monitors' functions
    require a task_struct parameter while the others do not.

    Unify the functions, handle the difference by always passing a
    da_id_type which is the task's pid for per-task monitor but is
    ignored for the other types.

Regardless:

Reviewed-by: Nam Cao <[email protected]>

Nam

Reply via email to