lkml.org 
[lkml]   [2012]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 02/15] tools/events: Add files to create libtraceevent.a
    From
    2012/4/11 Steven Rostedt <rostedt@goodmis.org>:
    > On Wed, 2012-04-11 at 12:20 -0300, Arnaldo Carvalho de Melo wrote:
    >> > +int pevent_register_function(struct pevent *pevent, char *func,
    >> > +                        unsigned long long addr, char *mod)
    >> > +{
    >> > +   struct func_list *item;
    >> > +
    >> > +   item = malloc_or_die(sizeof(*item));
    >> > +
    >> > +   item->next = pevent->funclist;
    >> > +   item->func = strdup(func);
    >> > +   if (mod)
    >> > +           item->mod = strdup(mod);
    >> > +   else
    >> > +           item->mod = NULL;
    >>
    >> strdup can fail, and no, we shouldn't die if that happens :-)
    >
    > Again, this all needs to be audited. But this isn't much different than
    > what perf already does with the tools/perf/util/trace-event-parse.c
    >
    > Thus, getting the code out can be the first step. Cleaning it up into a
    > nice library the second.

    I agree. This is essentially moving the existing code in perf (but an
    improved version of it) to a standalone
    library. This is a big problem on its own already. The big one in fact.

    Improving it is certainly a necessary following up step. And in fact
    this is one of
    the purposes of this library: make the improvements there easier. But
    I believe this
    should be done incrementally, once we get the migration done.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-04-11 19:51    [W:0.022 / U:60.924 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site