lkml.org 
[lkml]   [2009]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC,PATCH 14/14] utrace core
    (restore cc's)

    On 11/24, Andi Kleen wrote:
    >
    > On Tue, Nov 24, 2009 at 09:41:52PM +0100, Oleg Nesterov wrote:
    > > On 11/24, Andi Kleen wrote:
    > > >
    > > > Oleg Nesterov <oleg@redhat.com> writes:
    > > >
    > > > > From: Roland McGrath <roland@redhat.com>
    > > > >
    > > > > This adds the utrace facility, a new modular interface in the kernel
    > > > > for implementing user thread tracing and debugging. This fits on top
    > > > > of the tracehook_* layer, so the new code is well-isolated.
    > > >
    > > > Could we just drop the tracehook layer if this finally merged
    > > > and call the low level functions directly?
    > >
    > > Not sure I understand. Tracehooks are trivial inline wrappers on
    > > top utrace calls,
    >
    > Yes that's the problem -- they are unnecessary obfuscation
    > when you can just call directly.

    This is subjective, but personally I disagree. Contrary, imho it
    is good that tracehook hides the (simple) details. I do not understand
    why the reader of, say, do_fork() should see the contents of
    tracehook_report_clone_complete(). This will complicate the understanding.
    Those people who want to understand/change fork() do not care about
    utrace/ptrace usually.

    And please note that it is much, much easier to change this code
    when it lives in tracehooks.h instead of sched.c/signal.c/etc.

    > > What is the point?
    >
    > Less code obfuscation.
    >
    > When it's a utrace call, call it a utrace call, not something else.

    Why do you think this is obfuscation? Well, we can rename these
    helpers, s/tracehook_/utrace_/, but I don't see how this can make
    the code more readable.

    Oleg.



    \
     
     \ /
      Last update: 2009-11-24 22:53    [W:0.045 / U:32.232 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site