lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 6 Apr 2012 13:40:31 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <srostedt@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Jiri Olsa <jolsa@...hat.com>, Arun Sharma <asharma@...com>,
	Namhyung Kim <namhyung.kim@....com>
Subject: Re: [PATCH 02/15] tools/events: Add files to create libtraceevent.a

On Fri, Apr 06, 2012 at 12:47:53AM +0200, Frederic Weisbecker wrote:
> From: Steven Rostedt <srostedt@...hat.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@...dmis.org>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Arnaldo Carvalho de Melo <acme@...radead.org>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: Arun Sharma <asharma@...com>
> Cc: Namhyung Kim <namhyung.kim@....com>
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ