Re: [PATCH 01/15] perf: Separate out trace-cmd parse-events from perf files

From: Frederic Weisbecker
Date: Fri Apr 06 2012 - 11:23:24 EST


2012/4/6 Borislav Petkov <bp@xxxxxxxxx>:
> On Fri, Apr 06, 2012 at 12:47:52AM +0200, Frederic Weisbecker wrote:
>> From: Steven Rostedt <srostedt@xxxxxxxxxx>
>>
>> Move the trace-event-parse.c code that originally came from trace-cmd into
>> their own files. The new file will be called trace-parse-events.c, as
>> the name of trace-cmd's file was parse-events.c too, but it conflicted
>> with the parse-events.c file in perf that parses the command line.
>>
>> This tries to update the code with mimimal changes.
>>
>> Perf specific code stays in the trace-event-parse.[ch] files and
>> the common parsing code is now in trace-parse-events.c and
>> trace-parse-events.h.
>>
>> Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
>> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
>> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>> Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxx>
>> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
>> Cc: Borislav Petkov <bp@xxxxxxxxx>
>> Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
>> Cc: Arun Sharma <asharma@xxxxxx>
>> Cc: Namhyung Kim <namhyung.kim@xxxxxxx>
>> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
>> ---
>>  tools/perf/Makefile                  |    2 +
>>  tools/perf/util/trace-event-parse.c  | 3135 ----------------------------------
>>  tools/perf/util/trace-event.h        |  275 +---
>>  tools/perf/util/trace-parse-events.c | 3125 +++++++++++++++++++++++++++++++++
>>  tools/perf/util/trace-parse-events.h |  273 +++
>>  5 files changed, 3405 insertions(+), 3405 deletions(-)
>>  create mode 100644 tools/perf/util/trace-parse-events.c
>>  create mode 100644 tools/perf/util/trace-parse-events.h
>
> Err, maybe I'm missing something but why this additional step? I mean,
> you could do:
>
> patch 1: Add libtraceevent.a from trace-cmd
> patch 2: Fixup perf so that it is ready to be switched to the new lib (specific
>                wrappers, etc)
> patch 3: switch it to libtraceevent.a
>
> Only three patches, right?

Because this step splits what is purely perf code and what isn't. Then
later on we remove the non-perf part only.
I think it makes it smoother that way: we first identify what we want
to delete and layout the things in advance
by separating it. It makes the removal easier to review.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/