All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] perf intel-pt: Bring instruction decoder files into line with the kernel
@ 2017-11-21  8:35 Adrian Hunter
  2017-11-21  8:35 ` [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from " Adrian Hunter
  2017-11-21  8:35 ` [PATCH 2/2] perf intel-pt: Bring instruction decoder files into line with " Adrian Hunter
  0 siblings, 2 replies; 9+ messages in thread
From: Adrian Hunter @ 2017-11-21  8:35 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Ingo Molnar

Hi

Here are 2 patches for Intel PT to improve build messages and bring
instruction decoder files into line with the kernel.


Adrian Hunter (2):
      perf intel-pt: Improve build messages for files that differ from the kernel
      perf intel-pt: Bring instruction decoder files into line with the kernel

 tools/perf/util/intel-pt-decoder/Build  | 24 +++++++++++++++---------
 tools/perf/util/intel-pt-decoder/inat.h | 10 ++++++++++
 2 files changed, 25 insertions(+), 9 deletions(-)


Regards
Adrian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from the kernel
  2017-11-21  8:35 [PATCH 0/2] perf intel-pt: Bring instruction decoder files into line with the kernel Adrian Hunter
@ 2017-11-21  8:35 ` Adrian Hunter
  2017-11-21  8:41   ` Ingo Molnar
  2017-12-06 16:33   ` [tip:perf/core] perf intel-pt: Improve build messages for files that " tip-bot for Adrian Hunter
  2017-11-21  8:35 ` [PATCH 2/2] perf intel-pt: Bring instruction decoder files into line with " Adrian Hunter
  1 sibling, 2 replies; 9+ messages in thread
From: Adrian Hunter @ 2017-11-21  8:35 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Ingo Molnar

Print file names of files that differ. For example, instead of:

  Warning: Intel PT: x86 instruction decoder differs from kernel

print:

  Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat.h' differs from latest version at 'arch/x86/include/asm/inat.h'

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/util/intel-pt-decoder/Build | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
index 10e0814bb8d2..1b704fbea9de 100644
--- a/tools/perf/util/intel-pt-decoder/Build
+++ b/tools/perf/util/intel-pt-decoder/Build
@@ -11,15 +11,21 @@ $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_table
 
 $(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/intel-pt-insn-decoder.c util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
 	@(diff -I 2>&1 | grep -q 'option requires an argument' && \
-	test -d ../../kernel -a -d ../../tools -a -d ../perf && (( \
-	diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
-	diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
-	diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
-	diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \
-	diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
-	diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
-	diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
-	|| echo "Warning: Intel PT: x86 instruction decoder differs from kernel" >&2 )) || true
+	test -d ../../kernel -a -d ../../tools -a -d ../perf && ( \
+	((diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder C file at 'tools/perf/util/intel-pt-decoder/insn.c' differs from latest version at 'arch/x86/lib/insn.c'" >&2)) && \
+	((diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder C file at 'tools/perf/util/intel-pt-decoder/inat.c' differs from latest version at 'arch/x86/lib/inat.c'" >&2)) && \
+	((diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder map file at 'tools/perf/util/intel-pt-decoder/x86-opcode-map.txt' differs from latest version at 'arch/x86/lib/x86-opcode-map.txt'" >&2)) && \
+	((diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder script at 'tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk' differs from latest version at 'arch/x86/tools/gen-insn-attr-x86.awk'" >&2)) && \
+	((diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/insn.h' differs from latest version at 'arch/x86/include/asm/insn.h'" >&2)) && \
+	((diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat.h' differs from latest version at 'arch/x86/include/asm/inat.h'" >&2)) && \
+	((diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat_types.h' differs from latest version at 'arch/x86/include/asm/inat_types.h'" >&2)))) || true
 	$(call rule_mkdir)
 	$(call if_changed_dep,cc_o_c)
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] perf intel-pt: Bring instruction decoder files into line with the kernel
  2017-11-21  8:35 [PATCH 0/2] perf intel-pt: Bring instruction decoder files into line with the kernel Adrian Hunter
  2017-11-21  8:35 ` [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from " Adrian Hunter
@ 2017-11-21  8:35 ` Adrian Hunter
  2017-11-29  6:36   ` [tip:perf/core] " tip-bot for Adrian Hunter
  1 sibling, 1 reply; 9+ messages in thread
From: Adrian Hunter @ 2017-11-21  8:35 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-kernel, Ingo Molnar

There are just a few new defines which do not affect perf tools.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/util/intel-pt-decoder/inat.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/perf/util/intel-pt-decoder/inat.h b/tools/perf/util/intel-pt-decoder/inat.h
index 125ecd2a300d..52dc8d911173 100644
--- a/tools/perf/util/intel-pt-decoder/inat.h
+++ b/tools/perf/util/intel-pt-decoder/inat.h
@@ -97,6 +97,16 @@
 #define INAT_MAKE_GROUP(grp)	((grp << INAT_GRP_OFFS) | INAT_MODRM)
 #define INAT_MAKE_IMM(imm)	(imm << INAT_IMM_OFFS)
 
+/* Identifiers for segment registers */
+#define INAT_SEG_REG_IGNORE	0
+#define INAT_SEG_REG_DEFAULT	1
+#define INAT_SEG_REG_CS		2
+#define INAT_SEG_REG_SS		3
+#define INAT_SEG_REG_DS		4
+#define INAT_SEG_REG_ES		5
+#define INAT_SEG_REG_FS		6
+#define INAT_SEG_REG_GS		7
+
 /* Attribute search APIs */
 extern insn_attr_t inat_get_opcode_attribute(insn_byte_t opcode);
 extern int inat_get_last_prefix_id(insn_byte_t last_pfx);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from the kernel
  2017-11-21  8:35 ` [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from " Adrian Hunter
@ 2017-11-21  8:41   ` Ingo Molnar
  2017-11-21 13:30     ` Arnaldo Carvalho de Melo
                       ` (2 more replies)
  2017-12-06 16:33   ` [tip:perf/core] perf intel-pt: Improve build messages for files that " tip-bot for Adrian Hunter
  1 sibling, 3 replies; 9+ messages in thread
From: Ingo Molnar @ 2017-11-21  8:41 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Arnaldo Carvalho de Melo, linux-kernel


* Adrian Hunter <adrian.hunter@intel.com> wrote:

> Print file names of files that differ. For example, instead of:
> 
>   Warning: Intel PT: x86 instruction decoder differs from kernel
> 
> print:
> 
>   Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat.h' differs from latest version at 'arch/x86/include/asm/inat.h'
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  tools/perf/util/intel-pt-decoder/Build | 24 +++++++++++++++---------
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
> index 10e0814bb8d2..1b704fbea9de 100644
> --- a/tools/perf/util/intel-pt-decoder/Build
> +++ b/tools/perf/util/intel-pt-decoder/Build
> @@ -11,15 +11,21 @@ $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_table
>  
>  $(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/intel-pt-insn-decoder.c util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
>  	@(diff -I 2>&1 | grep -q 'option requires an argument' && \
> -	test -d ../../kernel -a -d ../../tools -a -d ../perf && (( \
> -	diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
> -	diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
> -	diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
> -	diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \
> -	diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
> -	diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
> -	diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
> -	|| echo "Warning: Intel PT: x86 instruction decoder differs from kernel" >&2 )) || true
> +	test -d ../../kernel -a -d ../../tools -a -d ../perf && ( \
> +	((diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null) || \
> +	(echo "Warning: Intel PT: x86 instruction decoder C file at 'tools/perf/util/intel-pt-decoder/insn.c' differs from latest version at 'arch/x86/lib/insn.c'" >&2)) && \
> +	((diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null) || \
> +	(echo "Warning: Intel PT: x86 instruction decoder C file at 'tools/perf/util/intel-pt-decoder/inat.c' differs from latest version at 'arch/x86/lib/inat.c'" >&2)) && \
> +	((diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null) || \
> +	(echo "Warning: Intel PT: x86 instruction decoder map file at 'tools/perf/util/intel-pt-decoder/x86-opcode-map.txt' differs from latest version at 'arch/x86/lib/x86-opcode-map.txt'" >&2)) && \
> +	((diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null) || \
> +	(echo "Warning: Intel PT: x86 instruction decoder script at 'tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk' differs from latest version at 'arch/x86/tools/gen-insn-attr-x86.awk'" >&2)) && \
> +	((diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null) || \
> +	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/insn.h' differs from latest version at 'arch/x86/include/asm/insn.h'" >&2)) && \
> +	((diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null) || \
> +	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat.h' differs from latest version at 'arch/x86/include/asm/inat.h'" >&2)) && \
> +	((diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) || \
> +	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat_types.h' differs from latest version at 'arch/x86/include/asm/inat_types.h'" >&2)))) || true
>  	$(call rule_mkdir)
>  	$(call if_changed_dep,cc_o_c)

Could we please factor this out into a helper, sharing more code with 
tools/perf/check-headers.sh?

Also, I'd suggest removing this from check-headers.sh:

  opts="--ignore-blank-lines --ignore-space-change"

as the easiest policy is to just follow the upstream UAPI header version 100%. 
Pure space-only changes are comparatively rare.

I.e. something like the patch below?

Thanks,

	Ingo

---
Signed-off-by: Ingo Molnar <mingo@kernel.org>

 tools/perf/check-headers.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 77406d25e521..e66a8a7bcced 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -45,7 +45,6 @@ include/uapi/asm-generic/mman-common.h
 
 check () {
   file=$1
-  opts="--ignore-blank-lines --ignore-space-change"
 
   shift
   while [ -n "$*" ]; do

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from the kernel
  2017-11-21  8:41   ` Ingo Molnar
@ 2017-11-21 13:30     ` Arnaldo Carvalho de Melo
  2017-11-23 18:41     ` Arnaldo Carvalho de Melo
  2017-12-06 16:31     ` [tip:perf/core] tools headers: Follow the upstream UAPI header version 100% " tip-bot for Ingo Molnar
  2 siblings, 0 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-21 13:30 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Adrian Hunter, linux-kernel

Em Tue, Nov 21, 2017 at 09:41:11AM +0100, Ingo Molnar escreveu:
> Also, I'd suggest removing this from check-headers.sh:
> 
>   opts="--ignore-blank-lines --ignore-space-change"
> 
> as the easiest policy is to just follow the upstream UAPI header version 100%. 
> Pure space-only changes are comparatively rare.

> Signed-off-by: Ingo Molnar <mingo@kernel.org>

Thanks, applied.

- Arnaldo

> 
>  tools/perf/check-headers.sh | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
> index 77406d25e521..e66a8a7bcced 100755
> --- a/tools/perf/check-headers.sh
> +++ b/tools/perf/check-headers.sh
> @@ -45,7 +45,6 @@ include/uapi/asm-generic/mman-common.h
>  
>  check () {
>    file=$1
> -  opts="--ignore-blank-lines --ignore-space-change"
>  
>    shift
>    while [ -n "$*" ]; do

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from the kernel
  2017-11-21  8:41   ` Ingo Molnar
  2017-11-21 13:30     ` Arnaldo Carvalho de Melo
@ 2017-11-23 18:41     ` Arnaldo Carvalho de Melo
  2017-12-06 16:31     ` [tip:perf/core] tools headers: Follow the upstream UAPI header version 100% " tip-bot for Ingo Molnar
  2 siblings, 0 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-11-23 18:41 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Adrian Hunter, linux-kernel

Em Tue, Nov 21, 2017 at 09:41:11AM +0100, Ingo Molnar escreveu:
> * Adrian Hunter <adrian.hunter@intel.com> wrote:
> > +	((diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) || \
> > +	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat_types.h' differs from latest version at 'arch/x86/include/asm/inat_types.h'" >&2)))) || true
> >  	$(call rule_mkdir)
> >  	$(call if_changed_dep,cc_o_c)
> 
> Could we please factor this out into a helper, sharing more code with 
> tools/perf/check-headers.sh?

I'll do that at some point, applying the patch as the message got
improved.
 
> Also, I'd suggest removing this from check-headers.sh:
> 
>   opts="--ignore-blank-lines --ignore-space-change"

Done already.

- Arnaldo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf intel-pt: Bring instruction decoder files into line with the kernel
  2017-11-21  8:35 ` [PATCH 2/2] perf intel-pt: Bring instruction decoder files into line with " Adrian Hunter
@ 2017-11-29  6:36   ` tip-bot for Adrian Hunter
  0 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Adrian Hunter @ 2017-11-29  6:36 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, acme, hpa, tglx, mingo, adrian.hunter

Commit-ID:  51cacdc89852e91448518c616758c4421c83e057
Gitweb:     https://git.kernel.org/tip/51cacdc89852e91448518c616758c4421c83e057
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Tue, 21 Nov 2017 10:35:26 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 28 Nov 2017 14:28:49 -0300

perf intel-pt: Bring instruction decoder files into line with the kernel

There are just a few new defines which do not affect perf tools.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Link: http://lkml.kernel.org/r/1511253326-22308-3-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/intel-pt-decoder/inat.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/perf/util/intel-pt-decoder/inat.h b/tools/perf/util/intel-pt-decoder/inat.h
index 125ecd2..52dc8d9 100644
--- a/tools/perf/util/intel-pt-decoder/inat.h
+++ b/tools/perf/util/intel-pt-decoder/inat.h
@@ -97,6 +97,16 @@
 #define INAT_MAKE_GROUP(grp)	((grp << INAT_GRP_OFFS) | INAT_MODRM)
 #define INAT_MAKE_IMM(imm)	(imm << INAT_IMM_OFFS)
 
+/* Identifiers for segment registers */
+#define INAT_SEG_REG_IGNORE	0
+#define INAT_SEG_REG_DEFAULT	1
+#define INAT_SEG_REG_CS		2
+#define INAT_SEG_REG_SS		3
+#define INAT_SEG_REG_DS		4
+#define INAT_SEG_REG_ES		5
+#define INAT_SEG_REG_FS		6
+#define INAT_SEG_REG_GS		7
+
 /* Attribute search APIs */
 extern insn_attr_t inat_get_opcode_attribute(insn_byte_t opcode);
 extern int inat_get_last_prefix_id(insn_byte_t last_pfx);

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:perf/core] tools headers: Follow the upstream UAPI header version 100% differ from the kernel
  2017-11-21  8:41   ` Ingo Molnar
  2017-11-21 13:30     ` Arnaldo Carvalho de Melo
  2017-11-23 18:41     ` Arnaldo Carvalho de Melo
@ 2017-12-06 16:31     ` tip-bot for Ingo Molnar
  2 siblings, 0 replies; 9+ messages in thread
From: tip-bot for Ingo Molnar @ 2017-12-06 16:31 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: adrian.hunter, linux-kernel, acme, mingo, tglx, hpa

Commit-ID:  3f27bb5f00dc10609c2704cd39a130c8155a8510
Gitweb:     https://git.kernel.org/tip/3f27bb5f00dc10609c2704cd39a130c8155a8510
Author:     Ingo Molnar <mingo@kernel.org>
AuthorDate: Tue, 21 Nov 2017 09:41:11 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 29 Nov 2017 18:17:59 -0300

tools headers: Follow the upstream UAPI header version 100% differ from the kernel

Remove this from check-headers.sh:

  opts="--ignore-blank-lines --ignore-space-change"

as the easiest policy is to just follow the upstream UAPI header version 100%.
Pure space-only changes are comparatively rare.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Link: http://lkml.kernel.org/r/20171121084111.y6p5zwqso2cbms5s@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/check-headers.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index 77406d2..e66a8a7 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -45,7 +45,6 @@ include/uapi/asm-generic/mman-common.h
 
 check () {
   file=$1
-  opts="--ignore-blank-lines --ignore-space-change"
 
   shift
   while [ -n "$*" ]; do

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [tip:perf/core] perf intel-pt: Improve build messages for files that differ from the kernel
  2017-11-21  8:35 ` [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from " Adrian Hunter
  2017-11-21  8:41   ` Ingo Molnar
@ 2017-12-06 16:33   ` tip-bot for Adrian Hunter
  1 sibling, 0 replies; 9+ messages in thread
From: tip-bot for Adrian Hunter @ 2017-12-06 16:33 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: tglx, hpa, adrian.hunter, mingo, linux-kernel, acme

Commit-ID:  c2653297311612b0ead3b72b3629bfd963af2273
Gitweb:     https://git.kernel.org/tip/c2653297311612b0ead3b72b3629bfd963af2273
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Tue, 21 Nov 2017 10:35:25 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 29 Nov 2017 18:18:02 -0300

perf intel-pt: Improve build messages for files that differ from the kernel

Print file names of files that differ. For example, instead of:

  Warning: Intel PT: x86 instruction decoder differs from kernel

print:

  Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat.h' differs from latest version at 'arch/x86/include/asm/inat.h'

Reported-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Link: http://lkml.kernel.org/r/1511253326-22308-2-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/intel-pt-decoder/Build | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
index 10e0814..1b704fb 100644
--- a/tools/perf/util/intel-pt-decoder/Build
+++ b/tools/perf/util/intel-pt-decoder/Build
@@ -11,15 +11,21 @@ $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_table
 
 $(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/intel-pt-insn-decoder.c util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
 	@(diff -I 2>&1 | grep -q 'option requires an argument' && \
-	test -d ../../kernel -a -d ../../tools -a -d ../perf && (( \
-	diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null && \
-	diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null && \
-	diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null && \
-	diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null && \
-	diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
-	diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
-	diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
-	|| echo "Warning: Intel PT: x86 instruction decoder differs from kernel" >&2 )) || true
+	test -d ../../kernel -a -d ../../tools -a -d ../perf && ( \
+	((diff -B -I'^#include' util/intel-pt-decoder/insn.c ../../arch/x86/lib/insn.c >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder C file at 'tools/perf/util/intel-pt-decoder/insn.c' differs from latest version at 'arch/x86/lib/insn.c'" >&2)) && \
+	((diff -B -I'^#include' util/intel-pt-decoder/inat.c ../../arch/x86/lib/inat.c >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder C file at 'tools/perf/util/intel-pt-decoder/inat.c' differs from latest version at 'arch/x86/lib/inat.c'" >&2)) && \
+	((diff -B util/intel-pt-decoder/x86-opcode-map.txt ../../arch/x86/lib/x86-opcode-map.txt >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder map file at 'tools/perf/util/intel-pt-decoder/x86-opcode-map.txt' differs from latest version at 'arch/x86/lib/x86-opcode-map.txt'" >&2)) && \
+	((diff -B util/intel-pt-decoder/gen-insn-attr-x86.awk ../../arch/x86/tools/gen-insn-attr-x86.awk >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder script at 'tools/perf/util/intel-pt-decoder/gen-insn-attr-x86.awk' differs from latest version at 'arch/x86/tools/gen-insn-attr-x86.awk'" >&2)) && \
+	((diff -B -I'^#include' util/intel-pt-decoder/insn.h ../../arch/x86/include/asm/insn.h >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/insn.h' differs from latest version at 'arch/x86/include/asm/insn.h'" >&2)) && \
+	((diff -B -I'^#include' util/intel-pt-decoder/inat.h ../../arch/x86/include/asm/inat.h >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat.h' differs from latest version at 'arch/x86/include/asm/inat.h'" >&2)) && \
+	((diff -B -I'^#include' util/intel-pt-decoder/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) || \
+	(echo "Warning: Intel PT: x86 instruction decoder header at 'tools/perf/util/intel-pt-decoder/inat_types.h' differs from latest version at 'arch/x86/include/asm/inat_types.h'" >&2)))) || true
 	$(call rule_mkdir)
 	$(call if_changed_dep,cc_o_c)
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-12-06 16:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21  8:35 [PATCH 0/2] perf intel-pt: Bring instruction decoder files into line with the kernel Adrian Hunter
2017-11-21  8:35 ` [PATCH 1/2] perf intel-pt: Improve build messages for files that differ from " Adrian Hunter
2017-11-21  8:41   ` Ingo Molnar
2017-11-21 13:30     ` Arnaldo Carvalho de Melo
2017-11-23 18:41     ` Arnaldo Carvalho de Melo
2017-12-06 16:31     ` [tip:perf/core] tools headers: Follow the upstream UAPI header version 100% " tip-bot for Ingo Molnar
2017-12-06 16:33   ` [tip:perf/core] perf intel-pt: Improve build messages for files that " tip-bot for Adrian Hunter
2017-11-21  8:35 ` [PATCH 2/2] perf intel-pt: Bring instruction decoder files into line with " Adrian Hunter
2017-11-29  6:36   ` [tip:perf/core] " tip-bot for Adrian Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.