From: Borislav Petkov <bp@alien8.de>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <srostedt@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@infradead.org>,
Jiri Olsa <jolsa@redhat.com>, Arun Sharma <asharma@fb.com>,
Namhyung Kim <namhyung.kim@lge.com>
Subject: Re: [PATCH 02/15] tools/events: Add files to create libtraceevent.a
Date: Fri, 6 Apr 2012 13:40:31 +0200 [thread overview]
Message-ID: <20120406114031.GC30425@liondog.tnic> (raw)
In-Reply-To: <1333666086-6517-3-git-send-email-fweisbec@gmail.com>
On Fri, Apr 06, 2012 at 12:47:53AM +0200, Frederic Weisbecker wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> Copy over the files from trace-cmd to the Linux tools directory
> such that applications like perf and latencytrace can use the
> more advanced parsing code.
>
> Because some of the file names of perf conflict with trace-cmd file
> names, the trace-cmd files have been renamed as follows:
>
> parse-events.c ==> event-parse.c
> parse-events.h ==> event-parse.h
> utils.h ==> event-utils.h
>
> The files have been updated to handle the changes to the header files
> but other than that, they are identical to what was in the trace-cmd
> repository. The history of these files, including authorship is
> available at the git repo:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
>
> The Makefile was also copied over, but most of it was removed to
> focus on the parse-events code first. The parts of the Makefile for
> the plugins have also been removed, but will be added back when the
> plugin code is copied over as well. But that may be in its own
> separate directory.
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Arun Sharma <asharma@fb.com>
> Cc: Namhyung Kim <namhyung.kim@lge.com>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
> tools/lib/traceevent/Makefile | 303 +++
> tools/lib/traceevent/event-parse.c | 4971 +++++++++++++++++++++++++++++++++++
> tools/lib/traceevent/event-parse.h | 806 ++++++
> tools/lib/traceevent/event-utils.h | 64 +
> tools/lib/traceevent/parse-filter.c | 2262 ++++++++++++++++
> tools/lib/traceevent/parse-utils.c | 110 +
> tools/lib/traceevent/trace-seq.c | 199 ++
> 7 files changed, 8715 insertions(+), 0 deletions(-)
> create mode 100644 tools/lib/traceevent/Makefile
> create mode 100644 tools/lib/traceevent/event-parse.c
> create mode 100644 tools/lib/traceevent/event-parse.h
> create mode 100644 tools/lib/traceevent/event-utils.h
> create mode 100644 tools/lib/traceevent/parse-filter.c
> create mode 100644 tools/lib/traceevent/parse-utils.c
> create mode 100644 tools/lib/traceevent/trace-seq.c
>
> diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
> new file mode 100644
> index 0000000..3d69aa9
> --- /dev/null
> +++ b/tools/lib/traceevent/Makefile
> @@ -0,0 +1,303 @@
> +# trace-cmd version
> +EP_VERSION = 1
> +EP_PATCHLEVEL = 1
> +EP_EXTRAVERSION = 0
> +
> +# file format version
> +FILE_VERSION = 6
> +
> +MAKEFLAGS += --no-print-directory
> +
> +
> +# Makefiles suck: This macro sets a default value of $(2) for the
> +# variable named by $(1), unless the variable has been set by
> +# environment or command line. This is necessary for CC and AR
> +# because make sets default values, so the simpler ?= approach
> +# won't work as expected.
> +define allow-override
> + $(if $(or $(findstring environment,$(origin $(1))),\
> + $(findstring command line,$(origin $(1)))),,\
> + $(eval $(1) = $(2)))
> +endef
> +
> +# Allow setting CC and AR, or setting CROSS_COMPILE as a prefix.
> +$(call allow-override,CC,$(CROSS_COMPILE)gcc)
> +$(call allow-override,AR,$(CROSS_COMPILE)ar)
> +
> +EXT = -std=gnu99
> +INSTALL = install
> +
> +# Use DESTDIR for installing into a different root directory.
> +# This is useful for building a package. The program will be
> +# installed in this directory as if it was the root directory.
> +# Then the build tool can move it later.
> +DESTDIR ?=
> +DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))'
> +
> +prefix ?= /usr/local
> +bindir_relative = bin
> +bindir = $(prefix)/$(bindir_relative)
> +man_dir = $(prefix)/share/man
> +man_dir_SQ = '$(subst ','\'',$(man_dir))'
> +html_install = $(prefix)/share/kernelshark/html
> +html_install_SQ = '$(subst ','\'',$(html_install))'
> +img_install = $(prefix)/share/kernelshark/html/images
> +img_install_SQ = '$(subst ','\'',$(img_install))'
> +
> +export man_dir man_dir_SQ html_install html_install_SQ INSTALL
> +export img_install img_install_SQ
> +export DESTDIR DESTDIR_SQ
> +
> +# copy a bit from Linux kbuild
FWIW, I'm moving all the Kbuild-related stuff into
tools/scripts/Makefile.include: http://lkml.org/lkml/2012/3/23/167
so it could shave off a couple of lines from this one here.
--
Regards/Gruss,
Boris.
next prev parent reply other threads:[~2012-04-06 11:40 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 22:47 [RFC][PATCH 00/15] tools: Unify perf and trace-cmd trace event format parsing v2 Frederic Weisbecker
2012-04-05 22:47 ` [PATCH 01/15] perf: Separate out trace-cmd parse-events from perf files Frederic Weisbecker
2012-04-06 11:36 ` Borislav Petkov
2012-04-06 15:23 ` Frederic Weisbecker
2012-04-05 22:47 ` [PATCH 02/15] tools/events: Add files to create libtraceevent.a Frederic Weisbecker
2012-04-06 0:08 ` David Ahern
2012-04-06 0:18 ` Steven Rostedt
2012-04-06 0:24 ` David Ahern
2012-04-06 11:40 ` Borislav Petkov [this message]
2012-04-06 13:21 ` Borislav Petkov
2012-04-06 22:15 ` Steven Rostedt
2012-04-07 9:08 ` Borislav Petkov
2012-04-11 15:20 ` Arnaldo Carvalho de Melo
2012-04-11 15:38 ` Steven Rostedt
2012-04-11 17:47 ` Frederic Weisbecker
2012-04-11 17:54 ` Arnaldo Carvalho de Melo
2012-04-05 22:47 ` [PATCH 03/15] perf: Build libtraceevent.a Frederic Weisbecker
2012-04-06 11:45 ` Borislav Petkov
2012-04-06 15:26 ` Frederic Weisbecker
2012-04-06 15:51 ` Borislav Petkov
2012-04-09 17:10 ` Frederic Weisbecker
2012-04-05 22:47 ` [PATCH 04/15] events: Update tools/lib/traceevent to work with perf Frederic Weisbecker
2012-04-06 11:48 ` Borislav Petkov
2012-04-09 17:11 ` Frederic Weisbecker
2012-04-05 22:47 ` [PATCH 05/15] perf: Have perf use the new libtraceevent.a library Frederic Weisbecker
2012-04-05 22:47 ` [PATCH 06/15] perf/events: Add flag to produce nsec output Frederic Weisbecker
2012-04-05 22:47 ` [PATCH 07/15] perf/events: Add flag/symbol format_flags Frederic Weisbecker
2012-04-05 22:47 ` [PATCH 08/15] perf/events: Correct size given to memset Frederic Weisbecker
2012-04-06 11:24 ` Borislav Petkov
2012-04-06 12:00 ` Borislav Petkov
2012-04-06 12:27 ` Steven Rostedt
2012-04-05 22:48 ` [PATCH 09/15] parse-events: Handle invalid opcode parsing gracefully Frederic Weisbecker
2012-04-05 22:48 ` [PATCH 10/15] parse-events: Handle opcode parsing error Frederic Weisbecker
2012-04-05 22:48 ` [PATCH 11/15] parse-events: Let pevent_free() take a NULL pointer Frederic Weisbecker
2012-04-05 22:48 ` [PATCH 12/15] parse-events: Support '+' opcode in print format Frederic Weisbecker
2012-04-05 22:48 ` [PATCH 13/15] parse-events: Allow '*' and '/' operations in TP_printk Frederic Weisbecker
2012-04-05 22:48 ` [PATCH 14/15] parse-event: Fix memset pointer size bug in handle Frederic Weisbecker
2012-04-05 22:48 ` [PATCH 15/15] parse-events: Rename struct record to struct pevent_record Frederic Weisbecker
2012-04-06 3:07 ` [RFC][PATCH 00/15] tools: Unify perf and trace-cmd trace event format parsing v2 David Sharp
2012-04-06 15:11 ` Frederic Weisbecker
2012-04-09 10:13 ` Namhyung Kim
2012-04-23 14:47 ` Our failure on tracing tools unification (Was: Re: [RFC][PATCH 00/15] tools: Unify perf and trace-cmd trace event format parsing v2) Frederic Weisbecker
2012-04-23 15:08 ` Peter Zijlstra
2012-04-23 15:31 ` Steven Rostedt
2012-04-23 16:07 ` Borislav Petkov
2012-04-24 9:10 ` Thomas Gleixner
2012-04-25 8:05 ` Ingo Molnar
2012-04-25 12:39 ` Frederic Weisbecker
2012-04-25 14:19 ` Our failure on tracing tools unification Frank Ch. Eigler
2012-04-25 16:37 ` Arnaldo Carvalho de Melo
2012-04-25 12:26 [PATCH 00/15] tools: Unify perf and trace-cmd trace event format parsing v3 Frederic Weisbecker
2012-04-25 12:26 ` [PATCH 02/15] tools/events: Add files to create libtraceevent.a Frederic Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120406114031.GC30425@liondog.tnic \
--to=bp@alien8.de \
--cc=acme@infradead.org \
--cc=asharma@fb.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=srostedt@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®