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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120329064347.GB1754@m.brq.redhat.com>
Date:	Thu, 29 Mar 2012 08:43:47 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] perf tools: Including pre-generated flex files

On Tue, Mar 27, 2012 at 08:33:37PM +0200, Ingo Molnar wrote:
> 
> * Arnaldo Carvalho de Melo <acme@...radead.org> wrote:
> 
> > [...]
> >
> > 	But Ingo argues that flex and bison are just a 
> > yum/whatever install away, so we shouldn't clutter the kernel 
> > git history with things we can generate at build time.
> > 
> > 	What is your take on this?
> 
> I.e. we could just autogenerate automatically via something like 

SNIP

> From 3cfa99c3a09224cc270ed1e1260cc4fe1b79cebc Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@...nel.org>
> Date: Tue, 27 Mar 2012 14:07:50 +0200
> Subject: [PATCH] perf tools: Remove auto-generated bison/flex files
> 
> These should not be in the Git history - they are auto-generated.
> 
> Extend the Makefile rules of the parser files to include the generation
> run.
> 
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Link: http://lkml.kernel.org/n/tip-h6jnlwdy7by4v7yljrvzbii0@git.kernel.org
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
> ---

Tested-by: Jiri Olsa <jolsa@...hat.com>

thanks,
jirka

>  tools/perf/Makefile                  |   25 +-
>  tools/perf/util/parse-events-bison.c | 1917 ----------------------------
>  tools/perf/util/parse-events-bison.h |   81 --
>  tools/perf/util/parse-events-flex.c  | 2272 ----------------------------------
>  tools/perf/util/parse-events-flex.h  |  316 -----
>  tools/perf/util/pmu-bison.c          | 1663 -------------------------
>  tools/perf/util/pmu-bison.h          |   73 --
>  tools/perf/util/pmu-flex.c           | 1821 ---------------------------
>  tools/perf/util/pmu-flex.h           |  316 -----
>  9 files changed, 15 insertions(+), 8469 deletions(-)
> 
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 2f42886..a9dfd1f 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -61,8 +61,6 @@ ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
>  
>  CC = $(CROSS_COMPILE)gcc
>  AR = $(CROSS_COMPILE)ar
> -FLEX = $(CROSS_COMPILE)flex
> -BISON= $(CROSS_COMPILE)bison
>  
>  # Additional ARCH settings for x86
>  ifeq ($(ARCH),i386)
> @@ -236,6 +234,21 @@ endif
>  
>  export PERL_PATH
>  
> +FLEX = $(CROSS_COMPILE)flex
> +BISON= $(CROSS_COMPILE)bison
> +
> +event-parser:
> +	$(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o util/parse-events-bison.c
> +	$(QUIET_FLEX)$(FLEX) --header-file=util/parse-events-flex.h -t util/parse-events.l > util/parse-events-flex.c
> +
> +util/parse-events-flex.c: event-parser
> +
> +pmu-parser:
> +	$(QUIET_BISON)$(BISON) -v util/pmu.y -d -o util/pmu-bison.c
> +	$(QUIET_FLEX)$(FLEX) --header-file=util/pmu-flex.h -t util/pmu.l > util/pmu-flex.c
> +
> +util/pmu-flex.c: pmu-parser
> +
>  LIB_FILE=$(OUTPUT)libperf.a
>  
>  LIB_H += ../../include/linux/perf_event.h
> @@ -883,14 +896,6 @@ cscope:
>  	$(RM) cscope*
>  	$(FIND) . -name '*.[hcS]' -print | xargs cscope -b
>  
> -event-parser:
> -	$(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o util/parse-events-bison.c
> -	$(QUIET_FLEX)$(FLEX) --header-file=util/parse-events-flex.h -t util/parse-events.l > util/parse-events-flex.c
> -
> -pmu-parser:
> -	$(QUIET_BISON)$(BISON) -v util/pmu.y -d -o util/pmu-bison.c
> -	$(QUIET_FLEX)$(FLEX) --header-file=util/pmu-flex.h -t util/pmu.l > util/pmu-flex.c
> -
>  ### Detect prefix changes
>  TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
>               $(bindir_SQ):$(perfexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
> [...]
--
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