29 Mar, 2019

1 commit

  • To deal with the move of some defines from asm-generic/mmap-common.h to
    linux/mman.h done in:

    746c9398f5ac ("arch: move common mmap flags to linux/mman.h")

    The generated mmap_flags array stays the same:

    $ tools/perf/trace/beauty/mmap_flags.sh
    static const char *mmap_flags[] = {
    [ilog2(0x40) + 1] = "32BIT",
    [ilog2(0x01) + 1] = "SHARED",
    [ilog2(0x02) + 1] = "PRIVATE",
    [ilog2(0x10) + 1] = "FIXED",
    [ilog2(0x20) + 1] = "ANONYMOUS",
    [ilog2(0x100000) + 1] = "FIXED_NOREPLACE",
    [ilog2(0x0100) + 1] = "GROWSDOWN",
    [ilog2(0x0800) + 1] = "DENYWRITE",
    [ilog2(0x1000) + 1] = "EXECUTABLE",
    [ilog2(0x2000) + 1] = "LOCKED",
    [ilog2(0x4000) + 1] = "NORESERVE",
    [ilog2(0x8000) + 1] = "POPULATE",
    [ilog2(0x10000) + 1] = "NONBLOCK",
    [ilog2(0x20000) + 1] = "STACK",
    [ilog2(0x40000) + 1] = "HUGETLB",
    [ilog2(0x80000) + 1] = "SYNC",
    };
    $

    And to have the system's sys/mman.h find the definition of MAP_SHARED
    and MAP_PRIVATE, make sure they are defined in the tools/ mman-common.h
    in a way that keeps it the same as the kernel's, need for keeping the
    Android's NDK cross build working.

    This silences these perf build warnings:

    Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h'
    diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h
    Warning: Kernel ABI header at 'tools/include/uapi/linux/mman.h' differs from latest version at 'include/uapi/linux/mman.h'
    diff -u tools/include/uapi/linux/mman.h include/uapi/linux/mman.h

    Cc: Adrian Hunter
    Cc: Arnd Bergmann
    Cc: Jiri Olsa
    Cc: Michael S. Tsirkin
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-h80ycpc6pedg9s5z2rwpy6ws@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

10 Jan, 2019

1 commit

  • We use syscall.tbl to generate system call table on powerpc.

    The unistd.h copy is no longer required now. Remove it.

    Signed-off-by: Ravi Bangoria
    Cc: Jiri Olsa
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/20190110094936.3132-2-ravi.bangoria@linux.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ravi Bangoria
     

09 Jan, 2019

1 commit

  • We were using a copy of uapi/linux/fs.h to create the mount syscall
    'flags' string table to use in 'perf trace', to convert from the number
    obtained via the raw_syscalls:sys_enter into a string, using
    tools/perf/trace/beauty/mount_flags.sh, but in e262e32d6bde ("vfs:
    Suppress MS_* flag defs within the kernel unless explicitly enabled")
    those defines got moved to linux/mount.h, so grab a copy of mount.h too.

    Keep the uapi/linux/fs.h as we'll use it for the SEEK_ constants.

    Cc: Adrian Hunter
    Cc: David Howells
    Cc: Jiri Olsa
    Cc: Luis Cláudio Gonçalves
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-i2ricmpwpdrpukfq3298jr1z@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

29 Dec, 2018

1 commit


19 Dec, 2018

2 commits


30 Oct, 2018

1 commit

  • We'll use it to create tables for the 'flags' argument to the 'mount'
    and 'umount' syscalls.

    Add it to check_headers.sh so that when a new protocol gets added we get
    a notification during the build process.

    Cc: Adrian Hunter
    Cc: Benjamin Peterson
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-yacf9jvkwfwg2g95r2us3xb3@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

09 Oct, 2018

1 commit

  • So that we reduce the difference of tools/include/linux/bitops.h to the
    original kernel file, include/linux/bitops.h, trying to remove the need
    to define BITS_PER_LONG, to avoid clashes with asm/bitsperlong.h.

    And the things removed from tools/include/linux/bitops.h are really in
    linux/bits.h, so that we can have a copy and then
    tools/perf/check_headers.sh will tell us when new stuff gets added to
    linux/bits.h so that we can check if it is useful and if any adjustment
    needs to be done to the tools/{include,arch}/ copies.

    Cc: Adrian Hunter
    Cc: Alexander Sverdlin
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-y1sqyydvfzo0bjjoj4zsl562@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

15 Aug, 2018

2 commits

  • Probably leftover from the time we introducd the check-headers.sh script.

    Committer testing:

    Remove the 'rseq' syscall from tools/perf/arch/x86/entry/syscalls/syscall_64.tbl
    to fake a diff:

    make: Entering directory '/home/acme/git/perf/tools/perf'
    BUILD: Doing 'make -j4' parallel build
    Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'
    diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
    CC /tmp/build/perf/util/syscalltbl.o
    INSTALL trace_plugins

    $ diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
    --- tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 2018-08-13 15:49:50.896585176 -0300
    +++ arch/x86/entry/syscalls/syscall_64.tbl 2018-07-20 12:04:04.536858304 -0300
    @@ -342,6 +342,7 @@
    331 common pkey_free __x64_sys_pkey_free
    332 common statx __x64_sys_statx
    333 common io_pgetevents __x64_sys_io_pgetevents
    +334 common rseq __x64_sys_rseq

    #
    # x32-specific system call numbers start at 512 to avoid cache impact
    $

    Signed-off-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Kapshuk
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180813111504.3568-2-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Changing the logic to compare files with paths relative to kernel source
    base dir. This way we can keep the output message for 2 unrelated files,
    which is coming in following patch.

    Committer testing:

    Remove a line from tools/arch/x86/lib/memcpy_64.S to have it detected:

    make: Entering directory '/home/acme/git/perf/tools/perf'
    BUILD: Doing 'make -j4' parallel build
    Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
    diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S
    INSTALL GTK UI
    INSTALL binaries

    Signed-off-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Kapshuk
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180813111504.3568-1-jolsa@kernel.org
    Link: http://lkml.kernel.org/r/20180814072726.GA13931@krava
    [ Do not use pushd/popd, its a bashism, reported by Michael Ellerman, fixed by Jiri Olsa ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

14 Aug, 2018

1 commit

  • The '||' path of execution in the 'test' block of the check_2() function
    may also be taken if file2 does not exist, in which case the warning
    message about the ABI headers being different would still be printed
    where it should not be. See below.

    % file1=file1; file2=file2
    % cmd="echo diff $file1 $file2"
    % test -f $file2 && \
    eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file1'
    differs from latest version at '$file2'" >&2
    Warning: Kernel ABI header at 'tools/file1' differs from latest
    version at 'file2'

    The proposed patch converts the code following the '&&' operator into a
    compound list to be executed in the current process environment only if file2
    does exist. Should the files being compared differ, a diff command to compare
    the files concerned is printed on standard output. E.g.

    $ diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S

    Committer testing:

    Remove a line from that tools/arch/x86/lib/memcpy_64.S file to test
    this:

    BUILD: Doing 'make -j4' parallel build
    Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S'
    diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S
    CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o

    Signed-off-by: Alexander Kapshuk
    Tested-by: Arnaldo Carvalho de Melo
    Acked-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180811083915.17471-1-alexander.kapshuk@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Alexander Kapshuk
     

31 Jul, 2018

1 commit

  • We'll use it to create tables for the 'protocol' argument to the
    socket syscall when the 'family' arg is one of AF_INET or AF_INET6.

    Add it to check_headers.sh so that when a new protocol gets added we get
    a notification during the build process.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: https://lkml.kernel.org/n/tip-2amnveu1ns4emjn70xuavpje@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

25 Jul, 2018

1 commit

  • Will be used for generating the syscall id/string translation table.

    The arm64 unistd.h file simply #includes the asm-generic/unistd.h, so,
    since we will want to know whether either change, we grab both:

    arch/arm64/include/uapi/asm/unistd.h

    and

    include/uapi/asm-generic/unistd.h

    Signed-off-by: Kim Phillips
    Cc: Alexander Shishkin
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Ravi Bangoria
    Cc: Thomas Richter
    Link: http://lkml.kernel.org/r/20180706163434.1b64ffbcc0284fb79982f53b@arm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Kim Phillips
     

26 Apr, 2018

2 commits

  • Add 'check_2' function to check 2 different files, the 'check' function
    stays to check files that differs only in the prefix path.

    In upcoming changes we need to check header files in locations which
    don't follow the prefix logic.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180423090823.32309-3-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Passing whole string instead of parsing them after. It simplifies
    things for the next patches, that adds another function call, which
    makes it hard to pass arguments in the correct shape.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180423090823.32309-2-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

28 Mar, 2018

1 commit

  • Currently the "opts" variable is not zero-ed and we keep on adding to
    it, ending up with:

    $ check-headers.sh 2>&1
    + opts=' "-B"'
    + opts=' "-B" "-B"'
    + opts=' "-B" "-B" "-B"'
    + opts=' "-B" "-B" "-B" "-B"'
    + opts=' "-B" "-B" "-B" "-B" "-B"'
    + opts=' "-B" "-B" "-B" "-B" "-B" "-B"'

    Fix this by initializing it in the check() function, right before
    starting the loop.

    Signed-off-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20180321140515.2252-1-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

17 Feb, 2018

1 commit

  • Will be used for generating the syscall id/string translation table.

    Committer notes:

    Update it already to catch with these csets applied since Ravi first
    submitted this patch:

    3350eb2ea127 powerpc: sys_pkey_mprotect() system call
    9499ec1b5e82 powerpc: sys_pkey_alloc() and sys_pkey_free() system calls

    So now 'perf trace' on ppc now knows about the pkey_ syscals.

    Signed-off-by: Ravi Bangoria
    Cc: Alexander Shishkin
    Cc: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Thomas Richter
    Cc: linuxppc-dev@lists.ozlabs.org
    Link: http://lkml.kernel.org/r/20180129083417.31240-2-ravi.bangoria@linux.vnet.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ravi Bangoria
     

15 Feb, 2018

1 commit

  • This reverts commit f120c7b187e6c418238710b48723ce141f467543 which is no
    longer required with the introduction of a syscall.tbl on s390.

    Signed-off-by: Hendrik Brueckner
    Cc: Jiri Olsa
    Cc: Michael Petlan
    Cc: Thomas Richter
    Cc: linux-s390@vger.kernel.org
    LPU-Reference: 1518090470-2899-2-git-send-email-brueckner@linux.vnet.ibm.com
    Link: https://lkml.kernel.org/n/tip-q1lg0nvhha1tk39ri9aqalcb@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Hendrik Brueckner
     

23 Jan, 2018

2 commits

  • This is a pre-req to generate an architecture specific mapping of errno
    numbers to their names. This errno mapping can be used by perf trace to
    support cross-architecture trace reports and to get rid of the
    audit-libs dependency.

    Signed-off-by: Hendrik Brueckner
    Reviewed-by: Thomas Richter
    Cc: Jiri Olsa
    Cc: Michael Petlan
    Cc: linux-s390@vger.kernel.org
    LPU-Reference: 1516352177-11106-3-git-send-email-brueckner@linux.vnet.ibm.com
    Link: https://lkml.kernel.org/n/tip-q13ystrw4sjz4wyvd3654cnm@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Hendrik Brueckner
     
  • For each arch in tools/perf/arch, grab a copy of errno.h.

    This is a pre-req to generate an architecture specific mapping of errno
    numbers to their names. This errno mapping can be used by perf trace to
    support cross-architecture trace reports and to get rid of the
    audit-libs dependency.

    Signed-off-by: Hendrik Brueckner
    Reviewed-by: Thomas Richter
    Cc: Jiri Olsa
    Cc: Michael Petlan
    Cc: linux-s390@vger.kernel.org
    LPU-Reference: 1516352177-11106-2-git-send-email-brueckner@linux.vnet.ibm.com
    Link: https://lkml.kernel.org/n/tip-73azjhrzpjsskwi129020i2u@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Hendrik Brueckner
     

27 Dec, 2017

1 commit

  • Will be used for generating the syscall id/string translation table.

    Signed-off-by: Hendrik Brueckner
    Reviewed-by: Thomas Richter
    Cc: Jiri Olsa
    Cc: Michael Petlan
    Cc: linux-s390@vger.kernel.org
    LPU-Reference: 1512635281-20733-2-git-send-email-brueckner@linux.vnet.ibm.com
    Link: https://lkml.kernel.org/n/tip-vjfbfvgjrnqnbdluqd7leo98@git.kernel.org
    [ split from a larger patch ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Hendrik Brueckner
     

19 Dec, 2017

1 commit


18 Dec, 2017

1 commit

  • Long ago we decided to be verbotten including files in the kernel git
    sources from tools/ living source code, to avoid disturbing kernel
    development (and perf's and other tools/) when, say, a kernel hacker
    adds something, tests everything but tools/ and have tools/ build
    broken.

    This got broken recently by s/390, fix it by copying
    arch/s390/include/uapi/asm/perf_regs.h to tools/arch/s390/include/uapi/asm/,
    making this one be used by means of and updating
    tools/perf/check_headers.sh to make sure we are notified when the
    original changes, so that we can check if anything is needed on the
    tooling side.

    This would have been caught by the 'tarkpg' test entry in:

    $ make -C tools/perf build-test

    When run on a s/390 build system or container.

    Acked-by: Heiko Carstens
    Cc: Hendrik Brueckner
    Cc: Thomas Richter
    Cc: Martin Schwidefsky
    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Fixes: f704ef44602f ("s390/perf: add support for perf_regs and libdw")
    Link: https://lkml.kernel.org/n/tip-n57139ic0v9uffx8wdqi3d8a@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

12 Dec, 2017

1 commit


05 Dec, 2017

1 commit

  • The regs_query_register_offset() helper function converts
    register name like "%r0" to an offset of a register in user_pt_regs
    It is required by the BPF prologue generator.

    The user_pt_regs structure was recently added to "asm/ptrace.h".
    Hence, update tools/perf/check-headers.sh to keep the header file
    in sync with kernel changes.

    Suggested-by: Thomas Richter
    Signed-off-by: Hendrik Brueckner
    Reviewed-and-tested-by: Thomas Richter
    Acked-by: Alexei Starovoitov
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Heiko Carstens
    Signed-off-by: Daniel Borkmann

    Hendrik Brueckner
     

30 Nov, 2017

1 commit


07 Nov, 2017

1 commit

  • Conflicts:
    tools/perf/arch/arm/annotate/instructions.c
    tools/perf/arch/arm64/annotate/instructions.c
    tools/perf/arch/powerpc/annotate/instructions.c
    tools/perf/arch/s390/annotate/instructions.c
    tools/perf/arch/x86/tests/intel-cqm.c
    tools/perf/ui/tui/progress.c
    tools/perf/util/zlib.c

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

01 Nov, 2017

1 commit


27 Oct, 2017

1 commit


24 Oct, 2017

1 commit

  • When we use one of:

    [acme@jouet linux]$ make help | grep perf
    perf-tar-src-pkg - Build perf-4.14.0-rc3.tar source tarball
    perf-targz-src-pkg - Build perf-4.14.0-rc3.tar.gz source tarball
    perf-tarbz2-src-pkg - Build perf-4.14.0-rc3.tar.bz2 source tarball
    perf-tarxz-src-pkg - Build perf-4.14.0-rc3.tar.xz source tarball
    [acme@jouet linux]$

    I.e. when we create a detached tarball to build perf outside outside the
    enveloping kernel sources (from a kernel tarball or a checked out
    linux.git directory) we by definition can't check for differences among
    the tools/{include,arch}, etc files we originally copied from the
    kernel, so bail out in that case, to avoid warnings when doing the
    detached builds.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-vbrga0mhplv7niwxr3ghjyxv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

02 Aug, 2017

3 commits


01 Aug, 2017

3 commits

  • We will use it to generate tables for beautifying ioctl's 'cmd' arg.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-bqoq114h917u6ggazn8m1w0t@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • 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
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-d8emqpdc3m2qtzt1ei8ra2tf@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • So that we can build on older systems where otherwise we would end up
    with:

    CC /tmp/build/perf/trace/beauty/ioctl.o
    trace/beauty/ioctl.c: In function 'ioctl__scnprintf_tty_cmd':
    trace/beauty/ioctl.c:25:17: error: 'TIOCGEXCL' undeclared (first use in this function)
    trace/beauty/ioctl.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
    trace/beauty/ioctl.c:25:2: error: array index in initializer not of integer type
    trace/beauty/ioctl.c:25:2: error: (near initialization for 'ioctl_tty_cmd')

    This way we can build a tool on an older system and it will still be
    capable of processing perf.data files generated on newer systems.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-8qvkv6txwuzua6d0yvt65wl3@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

31 Jul, 2017

1 commit

  • Change this:

    Warning: arch/x86/include/asm/disabled-features.h differs from kernel
    Warning: arch/x86/include/asm/cpufeatures.h differs from kernel
    Warning: arch/powerpc/include/uapi/asm/kvm.h differs from kernel
    Warning: arch/s390/include/uapi/asm/kvm.h differs from kernel

    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h'
    Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h'
    Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h'
    Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h'

    ... to make it clearer what the warning is about, and to make it easier
    to diff the two versions when syncing up the files.

    Signed-off-by: Ingo Molnar
    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: David Carrillo-Cisneros
    Cc: Francis Deslauriers
    Cc: Geneviève Bastien
    Cc: Jiri Olsa
    Cc: Julien Desfossez
    Cc: Martin Liška
    Cc: Mathieu Desnoyers
    Cc: Milian Wolff
    Cc: Namhyung Kim
    Cc: Paul Turner
    Cc: Peter Zijlstra
    Cc: Simon Que
    Cc: Stephane Eranian
    Cc: Taeung Song
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/20170730093747.qogjn3lp7ntwcgwg@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

20 Jul, 2017

1 commit

  • So that we make sure we have recent enough defines for things
    such as 'perf trace' system call argument beautifiers.

    For instance, the 'clone' syscall argument 'flag' needs to use
    CLONE_NEWCGROUP, and that is not available in RHEL7.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-81sln0ng4a2lcxrth14vcov4@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

19 Jul, 2017

1 commit

  • In older distros we were not including our copies of unistd_{32,64}.h,
    as we were relying on the system's asm/unistd.h, and a log time ago
    the files to be included were asm-{x86_64,i386}/unistd.h.

    Fix it by also carrying a copy of asm/unistd.h, that will be the same
    as in modern distros and will allow us to provide missing __NR_setns,
    for instance, in older distros.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-iwmgm0c4m1ynstktzmkjh8di@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo