linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/8] Having perf use libparsevent.a
@ 2011-08-05 20:59 Steven Rostedt
  2011-08-05 20:59 ` [RFC][PATCH 1/8] perf: Separate out trace-cmd parse-events from perf files Steven Rostedt
                   ` (10 more replies)
  0 siblings, 11 replies; 33+ messages in thread
From: Steven Rostedt @ 2011-08-05 20:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Thomas Gleixner, Peter Zijlstra,
	Frederic Weisbecker, Arnaldo Carvalho de Melo, Borislav Petkov,
	Arjan van de Ven

Hi All,

I've spent the week working on getting libparsevent.a working with
perf. After several rewrites, hacking in both perf and the trace-cmd
code, and breaking both beyond repair, I finally got to a point that
it just works.

The library was originally going to be called libperf.so, but after
talking with Arnaldo, he wants the functionality of the libraries
separated more, not combined all in one binary. As this code deals
only with the parsing the event formats and creating a way to read
the binary data from it, we both agreed that it is best to keep its
original name that was in trace-cmd and call it libparsevent.so.

Note, because perf installs in the user's ~/bin and I did not want to
make it a requirement to add ~/bin to LD_LIBRARY_PATH, I kept the
library as a .a that is linked directly into perf.

In the beginning, I tried to work with the library code within the
tools/perf directory, and because of the CFLAGS of perf, it made
compiling the library code very nasty (namely the -Wswitch-enum).
I also talked with Arnaldo and Frederic about the placement of this
code, and we all agreed that tools/lib/events is a good place to
put it.

By keeping the code separate from perf, made the transition from
trace-cmd to tools much easier. I've wasted too many days trying to
get other ways working, and I don't want to rewrite perf to do so.

Thus, this is what I ended up with.

This patch set just gets the libparsevent.a/so working with perf.
New code would be required to get it packaged for distributions to
ship as a library itself. Once it gets there, I'll work on getting
this code to work with code like latencytrace.

Anyway, this is still in the RFC phase. Lets hear what people have to
say.

(some of the patches are quite large as they either insert full
files or remove them, and probably will not make LKML due to the
size constraint.)

This patches can be viewed from:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/perf/parse-events

Head SHA1: 781d261ff8241243173cf996ceb068cb19bd5874


Julia Lawall (1):
      perf/events: Correct size given to memset

Steven Rostedt (6):
      perf: Separate out trace-cmd parse-events from perf files
      tools/events: Add files to create libparsevent.a
      perf: Build libparsevent.a
      events: Update tools/lib/events to work with perf
      perf: Have perf use the new libparsevent.a library
      perf/events: Add flag to produce nsec output

Tom Zanussi (1):
      perf/events: Add flag/symbol format_flags

----
 tools/lib/events/Makefile                          |  303 ++
 tools/lib/events/event-parse.c                     | 4991 ++++++++++++++++++++
 tools/lib/events/event-parse.h                     |  804 ++++
 tools/lib/events/event-utils.h                     |   80 +
 tools/lib/events/parse-filter.c                    | 2262 +++++++++
 tools/lib/events/parse-utils.c                     |  110 +
 tools/lib/events/trace-seq.c                       |  200 +
 tools/perf/Makefile                                |   17 +-
 tools/perf/builtin-kmem.c                          |    6 +-
 tools/perf/builtin-lock.c                          |   26 +-
 tools/perf/builtin-sched.c                         |   42 +-
 tools/perf/builtin-script.c                        |    2 +-
 .../util/scripting-engines/trace-event-python.c    |   16 +-
 tools/perf/util/trace-event-info.c                 |    4 +-
 tools/perf/util/trace-event-parse.c                | 3188 +------------
 tools/perf/util/trace-event-read.c                 |   34 +-
 tools/perf/util/trace-event.h                      |  268 +-
 17 files changed, 9070 insertions(+), 3283 deletions(-)

^ permalink raw reply	[flat|nested] 33+ messages in thread
[parent not found: <CAGZ=bq+mJ-9pf0Y22b9LLey0Em2Y7SAA5FnQ5cPsde6GB_aqgw@mail.gmail.com>]

end of thread, other threads:[~2011-08-18 16:59 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-05 20:59 [RFC][PATCH 0/8] Having perf use libparsevent.a Steven Rostedt
2011-08-05 20:59 ` [RFC][PATCH 1/8] perf: Separate out trace-cmd parse-events from perf files Steven Rostedt
2011-08-15 16:14   ` David Ahern
2011-08-15 16:22     ` Steven Rostedt
2011-08-17  0:08       ` David Ahern
2011-08-17  0:31         ` Steven Rostedt
2011-08-18 13:51         ` Frederic Weisbecker
2011-08-18 16:37           ` David Ahern
2011-08-18 16:59             ` Steven Rostedt
2011-08-05 20:59 ` [RFC][PATCH 2/8] tools/events: Add files to create libparsevent.a Steven Rostedt
2011-08-05 20:59 ` [RFC][PATCH 3/8] perf: Build libparsevent.a Steven Rostedt
2011-08-05 20:59 ` [RFC][PATCH 4/8] events: Update tools/lib/events to work with perf Steven Rostedt
2011-08-05 20:59 ` [RFC][PATCH 5/8] perf: Have perf use the new libparsevent.a library Steven Rostedt
2011-08-05 20:59 ` [RFC][PATCH 6/8] perf/events: Add flag to produce nsec output Steven Rostedt
2011-08-05 20:59 ` [RFC][PATCH 7/8] perf/events: Add flag/symbol format_flags Steven Rostedt
2011-08-05 20:59 ` [RFC][PATCH 8/8] perf/events: Correct size given to memset Steven Rostedt
2011-08-05 21:24 ` [RFC][PATCH 0/8] Having perf use libparsevent.a Ingo Molnar
2011-08-06  0:43   ` Frederic Weisbecker
2011-08-06  6:48     ` Ingo Molnar
2011-08-06 14:56       ` Frederic Weisbecker
     [not found]         ` <CAKYOsXw+Q+h2D++LxAoCUJ3tFVEhczBgDWNjwXzuJ0mNDav_Rw@mail.gmail.com>
2011-08-06 15:18           ` Frederic Weisbecker
2011-08-06 15:35           ` Steven Rostedt
2011-08-06  1:01   ` Steven Rostedt
2011-08-06  6:51     ` Ingo Molnar
2011-08-08 21:30       ` Steven Rostedt
2011-08-06  9:14     ` Borislav Petkov
2011-08-06  0:07 ` David Ahern
2011-08-06  1:05   ` Steven Rostedt
2011-08-06 15:23 ` Colin Walters
     [not found] <CAGZ=bq+mJ-9pf0Y22b9LLey0Em2Y7SAA5FnQ5cPsde6GB_aqgw@mail.gmail.com>
2011-08-06 21:40 ` Steven Rostedt
2011-08-06 23:14   ` Kyle Moffett
2011-08-08  9:34   ` Américo Wang
2011-08-08 13:42     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).