All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 06/18] tools perf: Do not check spaces/blank lines when checking header file copy drift
Date: Tue,  1 Aug 2017 16:56:33 -0300	[thread overview]
Message-ID: <20170801195645.16986-7-acme@kernel.org> (raw)
In-Reply-To: <20170801195645.16986-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

We copy headers from include/, arch/ to allow tools/ use defines,
structs from newer kernels and still be able to build on older systems.

We then, as part of a build, check if those copies got out of sync, when
we emit a warning, so that we can check if something needs to be
reflected on the tools, e.g. a 'perf trace' syscall argument beautifier
needs tweaking.

But we don't have to be super strict with that, for instance, extra
spaces, tabs or blank lines aren't problematic, so change
check-headers.sh to have "--ignore-blank-lines --ignore-space-change" as
default "diff" arguments.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-d8emqpdc3m2qtzt1ei8ra2tf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/check-headers.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index ff0a5fabf055..3f0c6577f8cc 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -37,7 +37,7 @@ include/uapi/asm-generic/mman-common.h
 
 check () {
   file=$1
-  opts=
+  opts="--ignore-blank-lines --ignore-space-change"
 
   shift
   while [ -n "$*" ]; do
@@ -58,7 +58,7 @@ for i in $HEADERS; do
 done
 
 # diff with extra ignore lines
-check arch/x86/lib/memcpy_64.S        -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
-check arch/x86/lib/memset_64.S        -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
-check include/uapi/asm-generic/mman.h -B -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
-check include/uapi/linux/mman.h       -B -I "^#include <\(uapi/\)*asm/mman.h>"
+check arch/x86/lib/memcpy_64.S        -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
+check arch/x86/lib/memset_64.S        -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
+check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
+check include/uapi/linux/mman.h       -I "^#include <\(uapi/\)*asm/mman.h>"
-- 
2.9.4

  parent reply	other threads:[~2017-08-01 19:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 19:56 [GIT PULL 00/18] perf/core improvements Arnaldo Carvalho de Melo
2017-08-01 19:56 ` Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 01/18] perf build: Clarify header version warning message Arnaldo Carvalho de Melo
2017-08-01 19:56   ` Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 02/18] perf build: Clarify open-coded " Arnaldo Carvalho de Melo
2017-08-01 19:56   ` Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 03/18] tools headers: Sync kernel ABI headers with tooling headers Arnaldo Carvalho de Melo
2017-08-01 19:56   ` Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 04/18] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header Arnaldo Carvalho de Melo
2017-08-01 20:15   ` Daniel Borkmann
2017-08-01 19:56 ` [PATCH 05/18] tools include uapi: Grab a copy of asm-generic/ioctls.h Arnaldo Carvalho de Melo
2017-08-01 19:56 ` Arnaldo Carvalho de Melo [this message]
2017-08-01 19:56 ` [PATCH 07/18] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header Arnaldo Carvalho de Melo
2017-08-01 20:15   ` Daniel Borkmann
2017-08-01 19:56 ` [PATCH 08/18] perf trace beauty ioctl: Improve 'cmd' beautifier Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 09/18] tools include uapi: Grab copies of drm/{drm,i915_drm}.h Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 10/18] perf trace beauty ioctl: Beautify DRM ioctl cmds Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 11/18] tools include uapi: Grab a copy of sound/asound.h Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 12/18] perf trace beautify ioctl: Beautify sound ioctl's 'cmd' arg Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 13/18] tools include uapi: Grab a copy of linux/kvm.h Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 14/18] perf trace beautify ioctl: Beautify KVM ioctl's 'cmd' arg Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 15/18] perf trace beauty ioctl: Pass _IOC_DIR to the per _IOC_TYPE scnprintf Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 16/18] tools include uapi: Grab a copy of linux/vhost.h Arnaldo Carvalho de Melo
2017-08-01 21:19   ` Michael S. Tsirkin
2017-08-02 14:18     ` Arnaldo Carvalho de Melo
2017-08-02 15:44       ` Michael S. Tsirkin
2017-08-02 18:32         ` Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 17/18] perf trace beautify ioctl: Beautify vhost virtio ioctl's 'cmd' arg Arnaldo Carvalho de Melo
2017-08-01 19:56 ` [PATCH 18/18] perf trace beautify ioctl: Beautify perf " Arnaldo Carvalho de Melo
2017-08-10 15:09 ` [GIT PULL 00/18] perf/core improvements Ingo Molnar
2017-08-10 15:09   ` Ingo Molnar

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=20170801195645.16986-7-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /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 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.