lkml.org 
[lkml]   [2008]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/1] x86: fix text_poke

    On Fri, 25 Apr 2008, Linus wrote:

    > On Fri, 25 Apr 2008, Mathieu Desnoyers wrote:
    > > The point is to provide a way to dynamically enable code at runtime
    > > without noticeable performance impact on the system.
    >
    > Quite frankly, maybe I'm a bit dense, but why don't you just recompile the
    > whole original function (at run-time), load that new version of a function
    > as a mini-module, and then insert a marker at the top of the old function
    > that just does a "jmp replacementfunction".
    >
    > That has _zero_ cost for the non-marker case, and allows you to do pretty
    > much any arbitrary code changes for the marker case.
    > [...]
    > Yeah, this requires you to basically recompile some function snippet when
    > you insert a probe, but if that scares people, you could basically do it
    > using the old code and inserting the markers and "relinking" it - avoiding
    > the C compiler, and just basically have an "assembly recompiler".

    Linus, was it your intention to signal that you would veto any uses of
    the current trace_mark mechanism, and wait for this hypothetical
    function-recompilation-splicing widget as a replacement? This is how
    some people are interpreting this old thread.

    A number of problems with the new idea were brought up, and no one
    appears to have taken interest in trying to build it to see if they
    can be overcome or if there are more.

    On the other hand, a number of concerns with the markers have been
    dealt with since, such as performance numbers showing near-zero
    impact, and a variety of experience with the few dozen lttng markers
    and the tools that consume the data. The current debate appears to be
    stuck on fuzzier aesthetic issues.


    How are we to move forward? Do you see any *harm* in letting in the
    lttng markers soon?

    Could it be that once this "recompile function with instrumentation on
    the fly" machinery comes into existence eventually, then these exact
    same marker points could be reinterpreted as one particular potential
    instrumentation spot? (This could be something as simple as building
    the kernel with CONFIG_MARKERS=n by default so the markers are
    compiled out, then having selected alternative functions built with
    CONFIG_MARKERS=y.)

    - FChE


    \
     
     \ /
      Last update: 2008-06-05 19:51    [W:4.105 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site