linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 00/22] perf/core improvements and fixes
@ 2017-04-24 19:54 Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 01/22] perf unwind: Provide only forward declarations for pointer types Arnaldo Carvalho de Melo
                   ` (22 more replies)
  0 siblings, 23 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter, Al Viro,
	Andi Kleen, David Ahern, David Howells, Jiri Olsa, Kyle Huey,
	Namhyung Kim, Peter Zijlstra, Stephane Eranian, Taeung Song,
	Thomas Gleixner, Tony Luck, Wang Nan, Yao Jin,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider applying,

- Arnaldo

Test results at the end of this message, as usual.

The following changes since commit 07590a7d4030c159b9a0d7171f81049a9ce23245:

  Merge tag 'perf-core-for-mingo-4.12-20170419' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-04-20 10:07:18 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170424

for you to fetch changes up to 9d43f5e8df6804ae271407500af9062e9278167a:

  perf tools: Fix the code to strip command name (2017-04-24 13:43:37 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Fix display of data source snoop indication in 'perf mem' (Andi Kleen)

- Fix the code to strip command name from /proc/PID/stat (Jiri Olsa)

Infrastructure:

- Continue the disentanglement of headers, specially util.h (Arnaldo Carvalho de Melo)

- Synchronize some header files with the kernel (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf mem: Fix display of data source snoop indication

Arnaldo Carvalho de Melo (20):
      perf unwind: Provide only forward declarations for pointer types
      perf tools: Add signal.h to places using its definitions
      perf tools: Move units conversion/formatting routines to separate object
      perf tools: Move timestamp routines from util.h to time-utils.h
      perf kvm: Make function only used by 'perf kvm' static
      perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h
      perf tools: Add compress.h for the *_decompress_to_file() headers
      perf callchain: Move callchain specific routines from util.[ch]
      perf tools: Include sys/param.h where needed
      perf tools: Remove a few more needless includes from util.h
      perf tools: Remove sys/ioctl.h from util.h
      perf tools: Remove string.h from util.h
      perf tools: Remove stale prototypes from builtin.h
      perf tools: Remove string.h, unistd.h and sys/stat.h from util.h
      perf tools: Remove poll.h and wait.h from util.h
      perf tools: Add the right header to obtain PERF_ALIGN()
      perf tools: Use just forward declarations for struct thread where possible
      tools: Update asm-generic/mman-common.h copy from the kernel
      tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
      tools arch x86: Sync cpufeatures.h

Jiri Olsa (1):
      perf tools: Fix the code to strip command name

 tools/arch/x86/include/asm/cpufeatures.h  |   1 +
 tools/arch/x86/lib/memcpy_64.S            |   2 +-
 tools/include/uapi/linux/stat.h           |   5 +-
 tools/lib/subcmd/help.h                   |   1 +
 tools/perf/arch/arm/util/cs-etm.c         |   1 +
 tools/perf/arch/arm/util/unwind-libdw.c   |   1 +
 tools/perf/arch/arm64/util/dwarf-regs.c   |   1 +
 tools/perf/arch/x86/tests/intel-cqm.c     |   2 +
 tools/perf/arch/x86/util/unwind-libdw.c   |   1 +
 tools/perf/builtin-buildid-cache.c        |   1 +
 tools/perf/builtin-c2c.c                  |   2 +
 tools/perf/builtin-ftrace.c               |   1 +
 tools/perf/builtin-help.c                 |   4 +
 tools/perf/builtin-inject.c               |   2 +
 tools/perf/builtin-kvm.c                  |  17 +++
 tools/perf/builtin-mem.c                  |   4 +
 tools/perf/builtin-record.c               |   5 +
 tools/perf/builtin-report.c               |   5 +
 tools/perf/builtin-script.c               |   5 +
 tools/perf/builtin-stat.c                 |   5 +
 tools/perf/builtin-timechart.c            |   1 +
 tools/perf/builtin-top.c                  |   1 +
 tools/perf/builtin-trace.c                |   2 +
 tools/perf/builtin-version.c              |   3 +-
 tools/perf/builtin.h                      |   4 -
 tools/perf/perf.c                         |   6 +-
 tools/perf/tests/attr.c                   |   4 +
 tools/perf/tests/bpf.c                    |   2 +
 tools/perf/tests/builtin-test.c           |   1 +
 tools/perf/tests/code-reading.c           |   1 +
 tools/perf/tests/event-times.c            |   1 +
 tools/perf/tests/parse-events.c           |   3 +
 tools/perf/tests/unit_number__scnprintf.c |   2 +-
 tools/perf/trace/beauty/signum.c          |   1 +
 tools/perf/ui/browsers/hists.c            |   2 +
 tools/perf/ui/gtk/annotate.c              |   1 +
 tools/perf/ui/gtk/hists.c                 |   1 +
 tools/perf/ui/stdio/hist.c                |   1 +
 tools/perf/util/Build                     |   1 +
 tools/perf/util/build-id.c                |   3 +
 tools/perf/util/callchain.c               | 103 +++++++++++++++
 tools/perf/util/color.h                   |   2 +
 tools/perf/util/comm.c                    |   1 +
 tools/perf/util/compress.h                |  12 ++
 tools/perf/util/config.c                  |   4 +
 tools/perf/util/debug.c                   |  33 ++++-
 tools/perf/util/debug.h                   |   3 +
 tools/perf/util/dso.c                     |   4 +
 tools/perf/util/event.c                   |  12 +-
 tools/perf/util/event.h                   |   2 +-
 tools/perf/util/evlist.c                  |   3 +
 tools/perf/util/evlist.h                  |   1 +
 tools/perf/util/evsel.c                   |   1 +
 tools/perf/util/header.c                  |   4 +
 tools/perf/util/help-unknown-cmd.c        |   1 +
 tools/perf/util/hist.c                    |   2 +
 tools/perf/util/llvm-utils.c              |   1 +
 tools/perf/util/lzma.c                    |   1 +
 tools/perf/util/machine.c                 |   3 +
 tools/perf/util/mem-events.c              |   2 +-
 tools/perf/util/namespaces.c              |   1 +
 tools/perf/util/parse-events.c            |   2 +
 tools/perf/util/pmu.c                     |   1 +
 tools/perf/util/probe-file.c              |   3 +
 tools/perf/util/python-ext-sources        |   1 +
 tools/perf/util/python.c                  |  13 ++
 tools/perf/util/session.c                 |   1 +
 tools/perf/util/session.h                 |   3 +-
 tools/perf/util/sort.c                    |   1 +
 tools/perf/util/sort.h                    |   3 +-
 tools/perf/util/strlist.c                 |   1 +
 tools/perf/util/time-utils.c              |  25 ++++
 tools/perf/util/time-utils.h              |   7 +
 tools/perf/util/top.h                     |   2 +-
 tools/perf/util/units.c                   |  39 ++++++
 tools/perf/util/units.h                   |  10 ++
 tools/perf/util/unwind-libdw.h            |   6 +-
 tools/perf/util/unwind.h                  |   9 +-
 tools/perf/util/util.c                    | 211 +-----------------------------
 tools/perf/util/util.h                    |  38 ------
 tools/perf/util/xyarray.c                 |   2 +
 tools/perf/util/zlib.c                    |   1 +
 82 files changed, 412 insertions(+), 270 deletions(-)
 create mode 100644 tools/perf/util/compress.h
 create mode 100644 tools/perf/util/units.c
 create mode 100644 tools/perf/util/units.h

Test results:

The first ones are container (docker) based builds of tools/perf with and
without libelf support, objtool where it is supported and samples/bpf/, ditto.
Where clang is available, it is also used to build perf with/without libelf.

Several are cross builds, the ones with -x-ARCH, and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.

  # dm
   1 alpine:3.4: Ok
   2 alpine:3.5: Ok
   3 alpine:edge: Ok
   4 android-ndk:r12b-arm: Ok
   5 archlinux:latest: Ok
   6 centos:5: Ok
   7 centos:6: Ok
   8 centos:7: Ok
   9 debian:7: Ok
  10 debian:8: Ok
  11 debian:9: Ok
  12 debian:experimental: Ok
  13 debian:experimental-x-arm64: Ok
  14 debian:experimental-x-mips: Ok
  15 debian:experimental-x-mips64: Ok
  16 debian:experimental-x-mipsel: Ok
  17 fedora:20: Ok
  18 fedora:21: Ok
  19 fedora:22: Ok
  20 fedora:23: Ok
  21 fedora:24: Ok
  22 fedora:24-x-ARC-uClibc: Ok
  23 fedora:25: Ok
  24 fedora:rawhide: Ok
  25 mageia:5: Ok
  26 opensuse:13.2: Ok
  27 opensuse:42.1: Ok
  28 opensuse:tumbleweed: Ok
  29 ubuntu:12.04.5: Ok
  30 ubuntu:14.04.4: Ok
  31 ubuntu:14.04.4-x-linaro-arm64: Ok
  32 ubuntu:15.10: Ok
  33 ubuntu:16.04: Ok
  34 ubuntu:16.04-x-arm: Ok
  35 ubuntu:16.04-x-arm64: Ok
  36 ubuntu:16.04-x-powerpc: Ok
  37 ubuntu:16.04-x-powerpc64: Ok
  38 ubuntu:16.04-x-s390: Ok
  39 ubuntu:16.10: Ok
  40 ubuntu:17.04: Ok
  #

  # perf test
   1: vmlinux symtab matches kallsyms            : Ok
   2: Detect openat syscall event                : Ok
   3: Detect openat syscall event on all cpus    : Ok
   4: Read samples using the mmap interface      : Ok
   5: Parse event definition strings             : Ok
   6: Simple expression parser                   : Ok
   7: PERF_RECORD_* events & perf_sample fields  : Ok
   8: Parse perf pmu format                      : Ok
   9: DSO data read                              : Ok
  10: DSO data cache                             : Ok
  11: DSO data reopen                            : Ok
  12: Roundtrip evsel->name                      : Ok
  13: Parse sched tracepoints fields             : Ok
  14: syscalls:sys_enter_openat event fields     : Ok
  15: Setup struct perf_event_attr               : Ok
  16: Match and link multiple hists              : Ok
  17: 'import perf' in python                    : Ok
  18: Breakpoint overflow signal handler         : Ok
  19: Breakpoint overflow sampling               : Ok
  20: Number of exit events of a simple workload : Ok
  21: Software clock events period values        : Ok
  22: Object code reading                        : Ok
  23: Sample parsing                             : Ok
  24: Use a dummy software event to keep tracking: Ok
  25: Parse with no sample_id_all bit set        : Ok
  26: Filter hist entries                        : Ok
  27: Lookup mmap thread                         : Ok
  28: Share thread mg                            : Ok
  29: Sort output of hist entries                : Ok
  30: Cumulate child hist entries                : Ok
  31: Track with sched_switch                    : Ok
  32: Filter fds with revents mask in a fdarray  : Ok
  33: Add fd to a fdarray, making it autogrow    : Ok
  34: kmod_path__parse                           : Ok
  35: Thread map                                 : Ok
  36: LLVM search and compile                    :
  36.1: Basic BPF llvm compile                    : Ok
  36.2: kbuild searching                          : Ok
  36.3: Compile source for BPF prologue generation: Ok
  36.4: Compile source for BPF relocation         : Ok
  37: Session topology                           : Ok
  38: BPF filter                                 :
  38.1: Basic BPF filtering                      : Ok
  38.2: BPF pinning                              : Ok
  38.3: BPF prologue generation                  : Ok
  38.4: BPF relocation checker                   : Ok
  39: Synthesize thread map                      : Ok
  40: Remove thread map                          : Ok
  41: Synthesize cpu map                         : Ok
  42: Synthesize stat config                     : Ok
  43: Synthesize stat                            : Ok
  44: Synthesize stat round                      : Ok
  45: Synthesize attr update                     : Ok
  46: Event times                                : Ok
  47: Read backward ring buffer                  : Ok
  48: Print cpu map                              : Ok
  49: Probe SDT events                           : Ok
  50: is_printable_array                         : Ok
  51: Print bitmap                               : Ok
  52: perf hooks                                 : Ok
  53: builtin clang support                      : Skip (not compiled in)
  54: unit_number__scnprintf                     : Ok
  55: x86 rdpmc                                  : Ok
  56: Convert perf time to TSC                   : Ok
  57: DWARF unwind                               : Ok
  58: x86 instruction decoder - new instructions : Ok
  59: Intel cqm nmi context read                 : Skip
  #
  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/linux/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
  cd . && make FEATURE_DUMP_COPY=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump
                    make_doc_O: && make doc
         make_install_prefix_O: && make install prefix=/tmp/krava
            make_no_libaudit_O: && make NO_LIBAUDIT=1
             make_util_map_o_O: && make util/map.o
              make_no_libelf_O: && make NO_LIBELF=1
             make_no_scripts_O: && make NO_LIBPYTHON=1 NO_LIBPERL=1
                make_no_gtk2_O: && make NO_GTK2=1
           make_no_backtrace_O: && make NO_BACKTRACE=1
                make_minimal_O: && make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
                  make_no_ui_O: && make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
            make_no_auxtrace_O: && make NO_AUXTRACE=1
                 make_perf_o_O: && make perf.o
   make_install_prefix_slash_O: && make install prefix=/tmp/krava/
        make_with_babeltrace_O: && make LIBBABELTRACE=1
                make_no_newt_O: && make NO_NEWT=1
             make_no_libperl_O: && make NO_LIBPERL=1
            make_no_demangle_O: && make NO_DEMANGLE=1
                  make_debug_O: && make DEBUG=1
           make_no_libunwind_O: && make NO_LIBUNWIND=1
                   make_tags_O: && make tags
            make_install_bin_O: && make install-bin
              make_no_libbpf_O: && make NO_LIBBPF=1
                   make_help_O: && make help
                   make_pure_O: && make
                 make_static_O: && make LDFLAGS=-static
         make_with_clangllvm_O: && make LIBCLANGLLVM=1
       make_util_pmu_bison_o_O: && make util/pmu-bison.o
           make_no_libbionic_O: && make NO_LIBBIONIC=1
               make_no_slang_O: && make NO_SLANG=1
           make_no_libpython_O: && make NO_LIBPYTHON=1
              make_clean_all_O: && make clean all
  make_no_libdw_dwarf_unwind_O: && make NO_LIBDW_DWARF_UNWIND=1
             make_no_libnuma_O: && make NO_LIBNUMA=1
                make_install_O: && make install
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* [PATCH 01/22] perf unwind: Provide only forward declarations for pointer types
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 02/22] perf tools: Add signal.h to places using its definitions Arnaldo Carvalho de Melo
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

No need to drag the headers, helps in untangling them and reducing build
time.

Link: http://lkml.kernel.org/n/tip-l8soqph92duyw5jdha0fij8b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/unwind.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h
index 61fb1e90ff51..bfbdcc6198c9 100644
--- a/tools/perf/util/unwind.h
+++ b/tools/perf/util/unwind.h
@@ -1,10 +1,13 @@
 #ifndef __UNWIND_H
 #define __UNWIND_H
 
+#include <linux/compiler.h>
 #include <linux/types.h>
-#include "event.h"
-#include "symbol.h"
-#include "thread.h"
+
+struct map;
+struct perf_sample;
+struct symbol;
+struct thread;
 
 struct unwind_entry {
 	struct map	*map;
-- 
2.9.3

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

* [PATCH 02/22] perf tools: Add signal.h to places using its definitions
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 01/22] perf unwind: Provide only forward declarations for pointer types Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 03/22] perf tools: Move units conversion/formatting routines to separate object Arnaldo Carvalho de Melo
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

And remove it from util.h, disentangling it a bit more.

Link: http://lkml.kernel.org/n/tip-2zg9s5nx90yde64j3g4z2uhk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/x86/tests/intel-cqm.c | 1 +
 tools/perf/builtin-inject.c           | 1 +
 tools/perf/builtin-kvm.c              | 1 +
 tools/perf/builtin-record.c           | 1 +
 tools/perf/builtin-report.c           | 1 +
 tools/perf/builtin-script.c           | 1 +
 tools/perf/builtin-stat.c             | 1 +
 tools/perf/builtin-top.c              | 1 +
 tools/perf/builtin-trace.c            | 1 +
 tools/perf/perf.c                     | 1 +
 tools/perf/trace/beauty/signum.c      | 1 +
 tools/perf/ui/gtk/annotate.c          | 1 +
 tools/perf/ui/gtk/hists.c             | 1 +
 tools/perf/util/evlist.c              | 1 +
 tools/perf/util/evlist.h              | 1 +
 tools/perf/util/util.c                | 1 +
 tools/perf/util/util.h                | 1 -
 17 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c
index 03c62eb0106b..befde6708c33 100644
--- a/tools/perf/arch/x86/tests/intel-cqm.c
+++ b/tools/perf/arch/x86/tests/intel-cqm.c
@@ -6,6 +6,7 @@
 #include "evsel.h"
 #include "arch-tests.h"
 
+#include <signal.h>
 #include <sys/mman.h>
 #include <errno.h>
 #include <string.h>
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index b102ee702aa1..8bd791cca008 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -23,6 +23,7 @@
 
 #include <linux/list.h>
 #include <errno.h>
+#include <signal.h>
 
 struct perf_inject {
 	struct perf_tool	tool;
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 4002277475cf..2b1732cfc0be 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -31,6 +31,7 @@
 #include <inttypes.h>
 #include <termios.h>
 #include <semaphore.h>
+#include <signal.h>
 #include <pthread.h>
 #include <math.h>
 
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 70340ff2008d..e1b937f23894 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -44,6 +44,7 @@
 #include <inttypes.h>
 #include <unistd.h>
 #include <sched.h>
+#include <signal.h>
 #include <sys/mman.h>
 #include <asm/bug.h>
 #include <linux/time64.h>
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 5bbd4b2ef6d2..b8f2dd322496 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -42,6 +42,7 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <regex.h>
+#include <signal.h>
 #include <linux/bitmap.h>
 #include <linux/stringify.h>
 
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index fe1dcd4f2c6d..76a88bdeebe4 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -35,6 +35,7 @@
 #include <dirent.h>
 #include <errno.h>
 #include <inttypes.h>
+#include <signal.h>
 
 #include "sane_ctype.h"
 
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index be2cd537c537..e3837febb4ff 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -70,6 +70,7 @@
 #include <linux/time64.h>
 #include <api/fs/fs.h>
 #include <errno.h>
+#include <signal.h>
 #include <stdlib.h>
 #include <sys/prctl.h>
 #include <inttypes.h>
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 47984a838b73..7ab42b8311a1 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -59,6 +59,7 @@
 #include <errno.h>
 #include <time.h>
 #include <sched.h>
+#include <signal.h>
 
 #include <sys/syscall.h>
 #include <sys/ioctl.h>
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index d1c8cdc6788b..ef3613f2fe6a 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -45,6 +45,7 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <libaudit.h> /* FIXME: Still needed for audit_errno_to_name */
+#include <signal.h>
 #include <stdlib.h>
 #include <string.h>
 #include <linux/err.h>
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 9ccccb0fbd8f..356588982d08 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -21,6 +21,7 @@
 #include <api/fs/tracing_path.h>
 #include <errno.h>
 #include <pthread.h>
+#include <signal.h>
 #include <stdlib.h>
 #include <time.h>
 #include <linux/kernel.h>
diff --git a/tools/perf/trace/beauty/signum.c b/tools/perf/trace/beauty/signum.c
index d3b0b1fab077..fde8f2fc6558 100644
--- a/tools/perf/trace/beauty/signum.c
+++ b/tools/perf/trace/beauty/signum.c
@@ -1,3 +1,4 @@
+#include <signal.h>
 
 static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscall_arg *arg)
 {
diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c
index 71359b898b67..e99ba86158d2 100644
--- a/tools/perf/ui/gtk/annotate.c
+++ b/tools/perf/ui/gtk/annotate.c
@@ -4,6 +4,7 @@
 #include "util/evsel.h"
 #include "ui/helpline.h"
 #include <inttypes.h>
+#include <signal.h>
 
 enum {
 	ANN_COL__PERCENT,
diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c
index c42de4dcc055..e24f83957705 100644
--- a/tools/perf/ui/gtk/hists.c
+++ b/tools/perf/ui/gtk/hists.c
@@ -6,6 +6,7 @@
 #include "../helpline.h"
 #include "../string2.h"
 #include "gtk.h"
+#include <signal.h>
 
 #define MAX_COLUMNS			32
 
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index f74ea2e55fde..8d36cf345375 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -18,6 +18,7 @@
 #include "evsel.h"
 #include "debug.h"
 #include "asm/bug.h"
+#include <signal.h>
 #include <unistd.h>
 
 #include "parse-events.h"
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
index 3fed4fb2e866..94cea4398a13 100644
--- a/tools/perf/util/evlist.h
+++ b/tools/perf/util/evlist.h
@@ -11,6 +11,7 @@
 #include "evsel.h"
 #include "util.h"
 #include "auxtrace.h"
+#include <signal.h>
 #include <unistd.h>
 
 struct pollfd;
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index b9716bc6e8fd..bc42c459f586 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -9,6 +9,7 @@
 #endif
 #include <dirent.h>
 #include <inttypes.h>
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 2a1166f8bb37..6bf141647403 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -22,7 +22,6 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <time.h>
-#include <signal.h>
 #include <assert.h>
 #include <utime.h>
 #include <sys/wait.h>
-- 
2.9.3

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

* [PATCH 03/22] perf tools: Move units conversion/formatting routines to separate object
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 01/22] perf unwind: Provide only forward declarations for pointer types Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 02/22] perf tools: Add signal.h to places using its definitions Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 04/22] perf tools: Move timestamp routines from util.h to time-utils.h Arnaldo Carvalho de Melo
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	David Ahern, Jiri Olsa, Namhyung Kim, Wang Nan

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

Out of util.h, to disentangle it a bit more.

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-vpksyj3w5fk9t8s6mxmkajyr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-record.c               |  1 +
 tools/perf/builtin-report.c               |  1 +
 tools/perf/tests/unit_number__scnprintf.c |  2 +-
 tools/perf/ui/browsers/hists.c            |  1 +
 tools/perf/util/Build                     |  1 +
 tools/perf/util/evlist.c                  |  1 +
 tools/perf/util/python-ext-sources        |  1 +
 tools/perf/util/units.c                   | 39 +++++++++++++++++++++++++++++++
 tools/perf/util/units.h                   | 10 ++++++++
 tools/perf/util/util.c                    | 35 ---------------------------
 tools/perf/util/util.h                    |  3 ---
 11 files changed, 56 insertions(+), 39 deletions(-)
 create mode 100644 tools/perf/util/units.c
 create mode 100644 tools/perf/util/units.h

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index e1b937f23894..99156b4363a5 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -38,6 +38,7 @@
 #include "util/bpf-loader.h"
 #include "util/trigger.h"
 #include "util/perf-hooks.h"
+#include "util/units.h"
 #include "asm/bug.h"
 
 #include <errno.h>
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index b8f2dd322496..3f89e0eaf0d4 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -37,6 +37,7 @@
 #include "arch/common.h"
 #include "util/time-utils.h"
 #include "util/auxtrace.h"
+#include "util/units.h"
 
 #include <dlfcn.h>
 #include <errno.h>
diff --git a/tools/perf/tests/unit_number__scnprintf.c b/tools/perf/tests/unit_number__scnprintf.c
index f84cb70ee5e5..44589de084b8 100644
--- a/tools/perf/tests/unit_number__scnprintf.c
+++ b/tools/perf/tests/unit_number__scnprintf.c
@@ -2,7 +2,7 @@
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include "tests.h"
-#include "util.h"
+#include "units.h"
 #include "debug.h"
 
 int test__unit_number__scnprint(int subtest __maybe_unused)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index f0b5b2b0e521..1b12a69740b3 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -24,6 +24,7 @@
 #include "annotate.h"
 #include "srcline.h"
 #include "string2.h"
+#include "units.h"
 
 #include "sane_ctype.h"
 
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index f0b9e5d0e2fc..069583bdc670 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -89,6 +89,7 @@ libperf-y += help-unknown-cmd.o
 libperf-y += mem-events.o
 libperf-y += vsprintf.o
 libperf-y += drv_configs.o
+libperf-y += units.o
 libperf-y += time-utils.o
 libperf-y += expr-bison.o
 
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 8d36cf345375..5eb638fd003f 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -17,6 +17,7 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "debug.h"
+#include "units.h"
 #include "asm/bug.h"
 #include <signal.h>
 #include <unistd.h>
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index 7d3927447fba..9f3b0d9754a8 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -27,3 +27,4 @@ util/trace-event.c
 ../lib/rbtree.c
 util/string.c
 util/symbol_fprintf.c
+util/units.c
diff --git a/tools/perf/util/units.c b/tools/perf/util/units.c
new file mode 100644
index 000000000000..f6a2a3d117d5
--- /dev/null
+++ b/tools/perf/util/units.c
@@ -0,0 +1,39 @@
+#include "units.h"
+#include <inttypes.h>
+#include <linux/kernel.h>
+#include <linux/time64.h>
+
+unsigned long convert_unit(unsigned long value, char *unit)
+{
+	*unit = ' ';
+
+	if (value > 1000) {
+		value /= 1000;
+		*unit = 'K';
+	}
+
+	if (value > 1000) {
+		value /= 1000;
+		*unit = 'M';
+	}
+
+	if (value > 1000) {
+		value /= 1000;
+		*unit = 'G';
+	}
+
+	return value;
+}
+
+int unit_number__scnprintf(char *buf, size_t size, u64 n)
+{
+	char unit[4] = "BKMG";
+	int i = 0;
+
+	while (((n / 1024) > 1) && (i < 3)) {
+		n /= 1024;
+		i++;
+	}
+
+	return scnprintf(buf, size, "%" PRIu64 "%c", n, unit[i]);
+}
diff --git a/tools/perf/util/units.h b/tools/perf/util/units.h
new file mode 100644
index 000000000000..3ed7774afaa9
--- /dev/null
+++ b/tools/perf/util/units.h
@@ -0,0 +1,10 @@
+#ifndef PERF_UNIT_H
+#define PERF_UNIT_H
+
+#include <stddef.h>
+#include <linux/types.h>
+
+unsigned long convert_unit(unsigned long value, char *unit);
+int unit_number__scnprintf(char *buf, size_t size, u64 n);
+
+#endif /* PERF_UNIT_H */
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index bc42c459f586..7741d5f6022b 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -272,28 +272,6 @@ int copyfile(const char *from, const char *to)
 	return copyfile_mode(from, to, 0755);
 }
 
-unsigned long convert_unit(unsigned long value, char *unit)
-{
-	*unit = ' ';
-
-	if (value > 1000) {
-		value /= 1000;
-		*unit = 'K';
-	}
-
-	if (value > 1000) {
-		value /= 1000;
-		*unit = 'M';
-	}
-
-	if (value > 1000) {
-		value /= 1000;
-		*unit = 'G';
-	}
-
-	return value;
-}
-
 static ssize_t ion(bool is_read, int fd, void *buf, size_t n)
 {
 	void *buf_start = buf;
@@ -731,16 +709,3 @@ int fetch_current_timestamp(char *buf, size_t sz)
 
 	return 0;
 }
-
-int unit_number__scnprintf(char *buf, size_t size, u64 n)
-{
-	char unit[4] = "BKMG";
-	int i = 0;
-
-	while (((n / 1024) > 1) && (i < 3)) {
-		n /= 1024;
-		i++;
-	}
-
-	return scnprintf(buf, size, "%" PRIu64 "%c", n, unit[i]);
-}
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 6bf141647403..add9e77369a2 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -73,7 +73,6 @@ int copyfile(const char *from, const char *to);
 int copyfile_mode(const char *from, const char *to, mode_t mode);
 int copyfile_offset(int fromfd, loff_t from_ofs, int tofd, loff_t to_ofs, u64 size);
 
-unsigned long convert_unit(unsigned long value, char *unit);
 ssize_t readn(int fd, void *buf, size_t n);
 ssize_t writen(int fd, void *buf, size_t n);
 
@@ -134,6 +133,4 @@ int sched_getcpu(void);
 
 int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz);
 
-int unit_number__scnprintf(char *buf, size_t size, u64 n);
-
 #endif /* GIT_COMPAT_UTIL_H */
-- 
2.9.3

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

* [PATCH 04/22] perf tools: Move timestamp routines from util.h to time-utils.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 03/22] perf tools: Move units conversion/formatting routines to separate object Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 05/22] perf kvm: Make function only used by 'perf kvm' static Arnaldo Carvalho de Melo
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

We already have a header for time utilities, so use it.

Link: http://lkml.kernel.org/n/tip-sijzpbvutlg0c3oxn49hy9ca@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-buildid-cache.c |  1 +
 tools/perf/builtin-kvm.c           |  1 +
 tools/perf/builtin-record.c        |  1 +
 tools/perf/util/time-utils.c       | 25 +++++++++++++++++++++++++
 tools/perf/util/time-utils.h       |  7 +++++++
 tools/perf/util/util.c             | 25 -------------------------
 tools/perf/util/util.h             |  6 ------
 7 files changed, 35 insertions(+), 31 deletions(-)

diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c
index 034c3d4a7b27..64b44e81c771 100644
--- a/tools/perf/builtin-buildid-cache.c
+++ b/tools/perf/builtin-buildid-cache.c
@@ -22,6 +22,7 @@
 #include "util/build-id.h"
 #include "util/session.h"
 #include "util/symbol.h"
+#include "util/time-utils.h"
 
 static int build_id_cache__kcore_buildid(const char *proc_dir, char *sbuildid)
 {
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 2b1732cfc0be..d86ac0ac2c99 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -24,6 +24,7 @@
 #ifdef HAVE_TIMERFD_SUPPORT
 #include <sys/timerfd.h>
 #endif
+#include <sys/time.h>
 
 #include <linux/kernel.h>
 #include <linux/time64.h>
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 99156b4363a5..32a9a68d38a2 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -38,6 +38,7 @@
 #include "util/bpf-loader.h"
 #include "util/trigger.h"
 #include "util/perf-hooks.h"
+#include "util/time-utils.h"
 #include "util/units.h"
 #include "asm/bug.h"
 
diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c
index d1b21c72206d..5b5d0214debd 100644
--- a/tools/perf/util/time-utils.c
+++ b/tools/perf/util/time-utils.c
@@ -117,3 +117,28 @@ bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp)
 
 	return false;
 }
+
+int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz)
+{
+	u64  sec = timestamp / NSEC_PER_SEC;
+	u64 usec = (timestamp % NSEC_PER_SEC) / NSEC_PER_USEC;
+
+	return scnprintf(buf, sz, "%"PRIu64".%06"PRIu64, sec, usec);
+}
+
+int fetch_current_timestamp(char *buf, size_t sz)
+{
+	struct timeval tv;
+	struct tm tm;
+	char dt[32];
+
+	if (gettimeofday(&tv, NULL) || !localtime_r(&tv.tv_sec, &tm))
+		return -1;
+
+	if (!strftime(dt, sizeof(dt), "%Y%m%d%H%M%S", &tm))
+		return -1;
+
+	scnprintf(buf, sz, "%s%02u", dt, (unsigned)tv.tv_usec / 10000);
+
+	return 0;
+}
diff --git a/tools/perf/util/time-utils.h b/tools/perf/util/time-utils.h
index c1f197c4af6c..8656be08513b 100644
--- a/tools/perf/util/time-utils.h
+++ b/tools/perf/util/time-utils.h
@@ -1,6 +1,9 @@
 #ifndef _TIME_UTILS_H_
 #define _TIME_UTILS_H_
 
+#include <stddef.h>
+#include <linux/types.h>
+
 struct perf_time_interval {
 	u64 start, end;
 };
@@ -11,4 +14,8 @@ int perf_time__parse_str(struct perf_time_interval *ptime, const char *ostr);
 
 bool perf_time__skip_sample(struct perf_time_interval *ptime, u64 timestamp);
 
+int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz);
+
+int fetch_current_timestamp(char *buf, size_t sz);
+
 #endif
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 7741d5f6022b..e86dba2f791a 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -381,14 +381,6 @@ void sighandler_dump_stack(int sig)
 	raise(sig);
 }
 
-int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz)
-{
-	u64  sec = timestamp / NSEC_PER_SEC;
-	u64 usec = (timestamp % NSEC_PER_SEC) / NSEC_PER_USEC;
-
-	return scnprintf(buf, sz, "%"PRIu64".%06"PRIu64, sec, usec);
-}
-
 unsigned long parse_tag_value(const char *str, struct parse_tag *tags)
 {
 	struct parse_tag *i = tags;
@@ -692,20 +684,3 @@ const char *perf_tip(const char *dirpath)
 
 	return tip;
 }
-
-int fetch_current_timestamp(char *buf, size_t sz)
-{
-	struct timeval tv;
-	struct tm tm;
-	char dt[32];
-
-	if (gettimeofday(&tv, NULL) || !localtime_r(&tv.tv_sec, &tm))
-		return -1;
-
-	if (!strftime(dt, sizeof(dt), "%Y%m%d%H%M%S", &tm))
-		return -1;
-
-	scnprintf(buf, sz, "%s%02u", dt, (unsigned)tv.tv_usec / 10000);
-
-	return 0;
-}
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index add9e77369a2..dc8eb942f92b 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -20,10 +20,7 @@
 #include <limits.h>
 #include <sys/param.h>
 #include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
 #include <assert.h>
-#include <utime.h>
 #include <sys/wait.h>
 #include <poll.h>
 #include <sys/socket.h>
@@ -125,12 +122,9 @@ int fetch_kernel_version(unsigned int *puint,
 #define KVER_PARAM(x)	KVER_VERSION(x), KVER_PATCHLEVEL(x), KVER_SUBLEVEL(x)
 
 const char *perf_tip(const char *dirpath);
-int fetch_current_timestamp(char *buf, size_t sz);
 
 #ifndef HAVE_SCHED_GETCPU_SUPPORT
 int sched_getcpu(void);
 #endif
 
-int timestamp__scnprintf_usec(u64 timestamp, char *buf, size_t sz);
-
 #endif /* GIT_COMPAT_UTIL_H */
-- 
2.9.3

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

* [PATCH 05/22] perf kvm: Make function only used by 'perf kvm' static
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 04/22] perf tools: Move timestamp routines from util.h to time-utils.h Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 06/22] perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h Arnaldo Carvalho de Melo
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

No need to have this polluting util.h, it was polluted enough already.

Link: http://lkml.kernel.org/n/tip-wfdidqlwbvi5y0s61kv6z2gn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-kvm.c | 14 ++++++++++++++
 tools/perf/util/util.c   | 14 --------------
 tools/perf/util/util.h   |  1 -
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index d86ac0ac2c99..129af3e9c728 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -36,6 +36,20 @@
 #include <pthread.h>
 #include <math.h>
 
+static const char *get_filename_for_perf_kvm(void)
+{
+	const char *filename;
+
+	if (perf_host && !perf_guest)
+		filename = strdup("perf.data.host");
+	else if (!perf_host && perf_guest)
+		filename = strdup("perf.data.guest");
+	else
+		filename = strdup("perf.data.kvm");
+
+	return filename;
+}
+
 #ifdef HAVE_KVM_STAT_SUPPORT
 #include "util/kvm-stat.h"
 
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index e86dba2f791a..eb49330c77d4 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -496,20 +496,6 @@ int parse_callchain_record(const char *arg, struct callchain_param *param)
 	return ret;
 }
 
-const char *get_filename_for_perf_kvm(void)
-{
-	const char *filename;
-
-	if (perf_host && !perf_guest)
-		filename = strdup("perf.data.host");
-	else if (!perf_host && perf_guest)
-		filename = strdup("perf.data.guest");
-	else
-		filename = strdup("perf.data.kvm");
-
-	return filename;
-}
-
 int perf_event_paranoid(void)
 {
 	int value;
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index dc8eb942f92b..c3f6d0de69c5 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -100,7 +100,6 @@ int perf_event_paranoid(void);
 void mem_bswap_64(void *src, int byte_size);
 void mem_bswap_32(void *src, int byte_size);
 
-const char *get_filename_for_perf_kvm(void);
 bool find_process(const char *name);
 
 #ifdef HAVE_ZLIB_SUPPORT
-- 
2.9.3

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

* [PATCH 06/22] perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 05/22] perf kvm: Make function only used by 'perf kvm' static Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 07/22] perf mem: Fix display of data source snoop indication Arnaldo Carvalho de Melo
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Two more out of util.h.

Link: http://lkml.kernel.org/n/tip-polkuxm1cpr06lbgue5pyqum@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/debug.c | 32 +++++++++++++++++++++++++++++++-
 tools/perf/util/debug.h |  3 +++
 tools/perf/util/util.c  | 31 -------------------------------
 tools/perf/util/util.h  |  3 ---
 4 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index 6e1d7e159649..9eaf86f4003b 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -8,7 +8,9 @@
 #include <stdio.h>
 #include <api/debug.h>
 #include <linux/time64.h>
-
+#ifdef HAVE_BACKTRACE_SUPPORT
+#include <execinfo.h>
+#endif
 #include "cache.h"
 #include "color.h"
 #include "event.h"
@@ -248,3 +250,31 @@ void perf_debug_setup(void)
 {
 	libapi_set_print(pr_warning_wrapper, pr_warning_wrapper, pr_debug_wrapper);
 }
+
+/* Obtain a backtrace and print it to stdout. */
+#ifdef HAVE_BACKTRACE_SUPPORT
+void dump_stack(void)
+{
+	void *array[16];
+	size_t size = backtrace(array, ARRAY_SIZE(array));
+	char **strings = backtrace_symbols(array, size);
+	size_t i;
+
+	printf("Obtained %zd stack frames.\n", size);
+
+	for (i = 0; i < size; i++)
+		printf("%s\n", strings[i]);
+
+	free(strings);
+}
+#else
+void dump_stack(void) {}
+#endif
+
+void sighandler_dump_stack(int sig)
+{
+	psignal(sig, "perf");
+	dump_stack();
+	signal(sig, SIG_DFL);
+	raise(sig);
+}
diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h
index 98832f5531d3..8a23ea1a71c7 100644
--- a/tools/perf/util/debug.h
+++ b/tools/perf/util/debug.h
@@ -56,4 +56,7 @@ int perf_debug_option(const char *str);
 void perf_debug_setup(void);
 int perf_quiet_option(void);
 
+void dump_stack(void);
+void sighandler_dump_stack(int sig);
+
 #endif	/* __PERF_DEBUG_H */
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index eb49330c77d4..ae8036f06329 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -4,9 +4,6 @@
 #include <api/fs/fs.h>
 #include <sys/mman.h>
 #include <sys/utsname.h>
-#ifdef HAVE_BACKTRACE_SUPPORT
-#include <execinfo.h>
-#endif
 #include <dirent.h>
 #include <inttypes.h>
 #include <signal.h>
@@ -353,34 +350,6 @@ int hex2u64(const char *ptr, u64 *long_val)
 	return p - ptr;
 }
 
-/* Obtain a backtrace and print it to stdout. */
-#ifdef HAVE_BACKTRACE_SUPPORT
-void dump_stack(void)
-{
-	void *array[16];
-	size_t size = backtrace(array, ARRAY_SIZE(array));
-	char **strings = backtrace_symbols(array, size);
-	size_t i;
-
-	printf("Obtained %zd stack frames.\n", size);
-
-	for (i = 0; i < size; i++)
-		printf("%s\n", strings[i]);
-
-	free(strings);
-}
-#else
-void dump_stack(void) {}
-#endif
-
-void sighandler_dump_stack(int sig)
-{
-	psignal(sig, "perf");
-	dump_stack();
-	signal(sig, SIG_DFL);
-	raise(sig);
-}
-
 unsigned long parse_tag_value(const char *str, struct parse_tag *tags)
 {
 	struct parse_tag *i = tags;
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index c3f6d0de69c5..07c4293742e7 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -80,9 +80,6 @@ void event_attr_init(struct perf_event_attr *attr);
 size_t hex_width(u64 v);
 int hex2u64(const char *ptr, u64 *val);
 
-void dump_stack(void);
-void sighandler_dump_stack(int sig);
-
 extern unsigned int page_size;
 extern int cacheline_size;
 extern int sysctl_perf_event_max_stack;
-- 
2.9.3

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

* [PATCH 07/22] perf mem: Fix display of data source snoop indication
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 06/22] perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 08/22] perf tools: Add compress.h for the *_decompress_to_file() headers Arnaldo Carvalho de Melo
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Andi Kleen, Jiri Olsa, Stephane Eranian,
	Arnaldo Carvalho de Melo

From: Andi Kleen <ak@linux.intel.com>

'perf mem report' doesn't display the data source snoop indication correctly.

In the kernel API the definition is:

  #define PERF_MEM_SNOOP_NONE     0x02 /* no snoop */
  #define PERF_MEM_SNOOP_HIT      0x04 /* snoop hit */
  #define PERF_MEM_SNOOP_MISS     0x08 /* snoop miss */

but the table used by the perf tools exchanged "Hit" and "Miss":

        "None",
        "Miss",
        "Hit",

Fix the table in perf.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20170419174940.13641-1-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/mem-events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
index c56d52f90b54..06f5a3a4295c 100644
--- a/tools/perf/util/mem-events.c
+++ b/tools/perf/util/mem-events.c
@@ -206,8 +206,8 @@ int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
 static const char * const snoop_access[] = {
 	"N/A",
 	"None",
-	"Miss",
 	"Hit",
+	"Miss",
 	"HitM",
 };
 
-- 
2.9.3

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

* [PATCH 08/22] perf tools: Add compress.h for the *_decompress_to_file() headers
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 07/22] perf mem: Fix display of data source snoop indication Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 09/22] perf callchain: Move callchain specific routines from util.[ch] Arnaldo Carvalho de Melo
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Out of util.h, the implementations were already in separate files, that
are built conditionally.

Link: http://lkml.kernel.org/n/tip-0ur7szxsb59f8758kfe63prb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/compress.h | 12 ++++++++++++
 tools/perf/util/dso.c      |  1 +
 tools/perf/util/lzma.c     |  1 +
 tools/perf/util/util.h     |  8 --------
 tools/perf/util/zlib.c     |  1 +
 5 files changed, 15 insertions(+), 8 deletions(-)
 create mode 100644 tools/perf/util/compress.h

diff --git a/tools/perf/util/compress.h b/tools/perf/util/compress.h
new file mode 100644
index 000000000000..67fd1bb7c2b7
--- /dev/null
+++ b/tools/perf/util/compress.h
@@ -0,0 +1,12 @@
+#ifndef PERF_COMPRESS_H
+#define PERF_COMPRESS_H
+
+#ifdef HAVE_ZLIB_SUPPORT
+int gzip_decompress_to_file(const char *input, int output_fd);
+#endif
+
+#ifdef HAVE_LZMA_SUPPORT
+int lzma_decompress_to_file(const char *input, int output_fd);
+#endif
+
+#endif /* PERF_COMPRESS_H */
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index cbfe17f5168a..3339ab7cabc5 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -3,6 +3,7 @@
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <errno.h>
+#include "compress.h"
 #include "path.h"
 #include "symbol.h"
 #include "dso.h"
diff --git a/tools/perf/util/lzma.c b/tools/perf/util/lzma.c
index 5b73b268c169..4ca7c5c6cdcd 100644
--- a/tools/perf/util/lzma.c
+++ b/tools/perf/util/lzma.c
@@ -2,6 +2,7 @@
 #include <lzma.h>
 #include <stdio.h>
 #include <linux/compiler.h>
+#include "compress.h"
 #include "util.h"
 #include "debug.h"
 
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 07c4293742e7..5dea8a96cf84 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -99,14 +99,6 @@ void mem_bswap_32(void *src, int byte_size);
 
 bool find_process(const char *name);
 
-#ifdef HAVE_ZLIB_SUPPORT
-int gzip_decompress_to_file(const char *input, int output_fd);
-#endif
-
-#ifdef HAVE_LZMA_SUPPORT
-int lzma_decompress_to_file(const char *input, int output_fd);
-#endif
-
 int get_stack_size(const char *str, unsigned long *_size);
 
 int fetch_kernel_version(unsigned int *puint,
diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c
index 495a449fc25c..1329d843eb7b 100644
--- a/tools/perf/util/zlib.c
+++ b/tools/perf/util/zlib.c
@@ -4,6 +4,7 @@
 #include <sys/mman.h>
 #include <zlib.h>
 
+#include "util/compress.h"
 #include "util/util.h"
 #include "util/debug.h"
 
-- 
2.9.3

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

* [PATCH 09/22] perf callchain: Move callchain specific routines from util.[ch]
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 08/22] perf tools: Add compress.h for the *_decompress_to_file() headers Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 10/22] perf tools: Include sys/param.h where needed Arnaldo Carvalho de Melo
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Where they belong, no point in leaving those in the generic "util"
files.

Link: http://lkml.kernel.org/n/tip-ljx3iiip1hlfa7a7apjem7ph@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/callchain.c | 103 +++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/python.c    |  13 ++++++
 tools/perf/util/util.c      | 104 --------------------------------------------
 tools/perf/util/util.h      |   4 --
 4 files changed, 116 insertions(+), 108 deletions(-)

diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
index 0096d45a06b3..81fc29ac798f 100644
--- a/tools/perf/util/callchain.c
+++ b/tools/perf/util/callchain.c
@@ -24,6 +24,21 @@
 #include "machine.h"
 #include "callchain.h"
 
+#define CALLCHAIN_PARAM_DEFAULT			\
+	.mode		= CHAIN_GRAPH_ABS,	\
+	.min_percent	= 0.5,			\
+	.order		= ORDER_CALLEE,		\
+	.key		= CCKEY_FUNCTION,	\
+	.value		= CCVAL_PERCENT,	\
+
+struct callchain_param callchain_param = {
+	CALLCHAIN_PARAM_DEFAULT
+};
+
+struct callchain_param callchain_param_default = {
+	CALLCHAIN_PARAM_DEFAULT
+};
+
 __thread struct callchain_cursor callchain_cursor;
 
 int parse_callchain_record_opt(const char *arg, struct callchain_param *param)
@@ -113,6 +128,32 @@ static int parse_callchain_value(const char *value)
 	return -1;
 }
 
+static int get_stack_size(const char *str, unsigned long *_size)
+{
+	char *endptr;
+	unsigned long size;
+	unsigned long max_size = round_down(USHRT_MAX, sizeof(u64));
+
+	size = strtoul(str, &endptr, 0);
+
+	do {
+		if (*endptr)
+			break;
+
+		size = round_up(size, sizeof(u64));
+		if (!size || size > max_size)
+			break;
+
+		*_size = size;
+		return 0;
+
+	} while (0);
+
+	pr_err("callchain: Incorrect stack dump size (max %ld): %s\n",
+	       max_size, str);
+	return -1;
+}
+
 static int
 __parse_callchain_report_opt(const char *arg, bool allow_record_opt)
 {
@@ -196,6 +237,68 @@ int parse_callchain_top_opt(const char *arg)
 	return __parse_callchain_report_opt(arg, true);
 }
 
+int parse_callchain_record(const char *arg, struct callchain_param *param)
+{
+	char *tok, *name, *saveptr = NULL;
+	char *buf;
+	int ret = -1;
+
+	/* We need buffer that we know we can write to. */
+	buf = malloc(strlen(arg) + 1);
+	if (!buf)
+		return -ENOMEM;
+
+	strcpy(buf, arg);
+
+	tok = strtok_r((char *)buf, ",", &saveptr);
+	name = tok ? : (char *)buf;
+
+	do {
+		/* Framepointer style */
+		if (!strncmp(name, "fp", sizeof("fp"))) {
+			if (!strtok_r(NULL, ",", &saveptr)) {
+				param->record_mode = CALLCHAIN_FP;
+				ret = 0;
+			} else
+				pr_err("callchain: No more arguments "
+				       "needed for --call-graph fp\n");
+			break;
+
+		/* Dwarf style */
+		} else if (!strncmp(name, "dwarf", sizeof("dwarf"))) {
+			const unsigned long default_stack_dump_size = 8192;
+
+			ret = 0;
+			param->record_mode = CALLCHAIN_DWARF;
+			param->dump_size = default_stack_dump_size;
+
+			tok = strtok_r(NULL, ",", &saveptr);
+			if (tok) {
+				unsigned long size = 0;
+
+				ret = get_stack_size(tok, &size);
+				param->dump_size = size;
+			}
+		} else if (!strncmp(name, "lbr", sizeof("lbr"))) {
+			if (!strtok_r(NULL, ",", &saveptr)) {
+				param->record_mode = CALLCHAIN_LBR;
+				ret = 0;
+			} else
+				pr_err("callchain: No more arguments "
+					"needed for --call-graph lbr\n");
+			break;
+		} else {
+			pr_err("callchain: Unknown --call-graph option "
+			       "value: %s\n", arg);
+			break;
+		}
+
+	} while (0);
+
+	free(buf);
+	return ret;
+}
+
 int perf_callchain_config(const char *var, const char *value)
 {
 	char *endptr;
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index 0533711af44d..c129e99114ae 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -4,6 +4,7 @@
 #include <poll.h>
 #include <linux/err.h>
 #include "evlist.h"
+#include "callchain.h"
 #include "evsel.h"
 #include "event.h"
 #include "cpumap.h"
@@ -11,6 +12,18 @@
 #include "thread_map.h"
 
 /*
+ * Provide these two so that we don't have to link against callchain.c and
+ * start dragging hist.c, etc.
+ */
+struct callchain_param callchain_param;
+
+int parse_callchain_record(const char *arg __maybe_unused,
+			   struct callchain_param *param __maybe_unused)
+{
+	return 0;
+}
+
+/*
  * Support debug printing even though util/debug.c is not linked.  That means
  * implementing 'verbose' and 'eprintf'.
  */
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index ae8036f06329..131d21a659fb 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -17,24 +17,8 @@
 #include <linux/log2.h>
 #include <linux/time64.h>
 #include <unistd.h>
-#include "callchain.h"
 #include "strlist.h"
 
-#define CALLCHAIN_PARAM_DEFAULT			\
-	.mode		= CHAIN_GRAPH_ABS,	\
-	.min_percent	= 0.5,			\
-	.order		= ORDER_CALLEE,		\
-	.key		= CCKEY_FUNCTION,	\
-	.value		= CCVAL_PERCENT,	\
-
-struct callchain_param callchain_param = {
-	CALLCHAIN_PARAM_DEFAULT
-};
-
-struct callchain_param callchain_param_default = {
-	CALLCHAIN_PARAM_DEFAULT
-};
-
 /*
  * XXX We need to find a better place for these things...
  */
@@ -377,94 +361,6 @@ unsigned long parse_tag_value(const char *str, struct parse_tag *tags)
 	return (unsigned long) -1;
 }
 
-int get_stack_size(const char *str, unsigned long *_size)
-{
-	char *endptr;
-	unsigned long size;
-	unsigned long max_size = round_down(USHRT_MAX, sizeof(u64));
-
-	size = strtoul(str, &endptr, 0);
-
-	do {
-		if (*endptr)
-			break;
-
-		size = round_up(size, sizeof(u64));
-		if (!size || size > max_size)
-			break;
-
-		*_size = size;
-		return 0;
-
-	} while (0);
-
-	pr_err("callchain: Incorrect stack dump size (max %ld): %s\n",
-	       max_size, str);
-	return -1;
-}
-
-int parse_callchain_record(const char *arg, struct callchain_param *param)
-{
-	char *tok, *name, *saveptr = NULL;
-	char *buf;
-	int ret = -1;
-
-	/* We need buffer that we know we can write to. */
-	buf = malloc(strlen(arg) + 1);
-	if (!buf)
-		return -ENOMEM;
-
-	strcpy(buf, arg);
-
-	tok = strtok_r((char *)buf, ",", &saveptr);
-	name = tok ? : (char *)buf;
-
-	do {
-		/* Framepointer style */
-		if (!strncmp(name, "fp", sizeof("fp"))) {
-			if (!strtok_r(NULL, ",", &saveptr)) {
-				param->record_mode = CALLCHAIN_FP;
-				ret = 0;
-			} else
-				pr_err("callchain: No more arguments "
-				       "needed for --call-graph fp\n");
-			break;
-
-		/* Dwarf style */
-		} else if (!strncmp(name, "dwarf", sizeof("dwarf"))) {
-			const unsigned long default_stack_dump_size = 8192;
-
-			ret = 0;
-			param->record_mode = CALLCHAIN_DWARF;
-			param->dump_size = default_stack_dump_size;
-
-			tok = strtok_r(NULL, ",", &saveptr);
-			if (tok) {
-				unsigned long size = 0;
-
-				ret = get_stack_size(tok, &size);
-				param->dump_size = size;
-			}
-		} else if (!strncmp(name, "lbr", sizeof("lbr"))) {
-			if (!strtok_r(NULL, ",", &saveptr)) {
-				param->record_mode = CALLCHAIN_LBR;
-				ret = 0;
-			} else
-				pr_err("callchain: No more arguments "
-					"needed for --call-graph lbr\n");
-			break;
-		} else {
-			pr_err("callchain: Unknown --call-graph option "
-			       "value: %s\n", arg);
-			break;
-		}
-
-	} while (0);
-
-	free(buf);
-	return ret;
-}
-
 int perf_event_paranoid(void)
 {
 	int value;
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 5dea8a96cf84..fcad17ce5c19 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
-#include <limits.h>
 #include <sys/param.h>
 #include <sys/types.h>
 #include <assert.h>
@@ -25,7 +24,6 @@
 #include <poll.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <linux/kernel.h>
 #include <linux/types.h>
 
 extern char buildid_dir[];
@@ -99,8 +97,6 @@ void mem_bswap_32(void *src, int byte_size);
 
 bool find_process(const char *name);
 
-int get_stack_size(const char *str, unsigned long *_size);
-
 int fetch_kernel_version(unsigned int *puint,
 			 char *str, size_t str_sz);
 #define KVER_VERSION(x)		(((x) >> 16) & 0xff)
-- 
2.9.3

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

* [PATCH 10/22] perf tools: Include sys/param.h where needed
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 09/22] perf callchain: Move callchain specific routines from util.[ch] Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 11/22] perf tools: Remove a few more needless includes from util.h Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

As it is going away from util.h, where it is not needed.

This is mostly for things like MAXPATHLEN, MAX() and MIN(), these later
two probably should go away in favor of its kernel sources replacements.

Link: http://lkml.kernel.org/n/tip-z1666f3fl3fqobxvjr5o2r39@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-c2c.c        | 1 +
 tools/perf/builtin-script.c     | 1 +
 tools/perf/tests/attr.c         | 1 +
 tools/perf/tests/code-reading.c | 1 +
 tools/perf/util/config.c        | 1 +
 tools/perf/util/header.c        | 1 +
 tools/perf/util/hist.c          | 1 +
 tools/perf/util/parse-events.c  | 1 +
 tools/perf/util/util.h          | 1 -
 9 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index a90c1260f49e..a14be1cd3d70 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -15,6 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/stringify.h>
 #include <asm/bug.h>
+#include <sys/param.h>
 #include "util.h"
 #include "debug.h"
 #include "builtin.h"
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 76a88bdeebe4..b093a3c21e40 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -36,6 +36,7 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <signal.h>
+#include <sys/param.h>
 
 #include "sane_ctype.h"
 
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index ba87cd529bfc..c19e0da54337 100644
--- a/tools/perf/tests/attr.c
+++ b/tools/perf/tests/attr.c
@@ -24,6 +24,7 @@
 #include <stdio.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
+#include <sys/param.h>
 #include "../perf.h"
 #include "util.h"
 #include <subcmd/exec-cmd.h>
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 3a8bf1565493..1f14e7612cbb 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -6,6 +6,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>
+#include <sys/param.h>
 
 #include "parse-events.h"
 #include "evlist.h"
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index f5604039cbe4..07d87d2dbee7 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -9,6 +9,7 @@
  *
  */
 #include <errno.h>
+#include <sys/param.h>
 #include "util.h"
 #include "cache.h"
 #include <subcmd/exec-cmd.h>
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 28a3acb7b313..915bc4f39482 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2,6 +2,7 @@
 #include <inttypes.h>
 #include "util.h"
 #include "string2.h"
+#include <sys/param.h>
 #include <sys/types.h>
 #include <byteswap.h>
 #include <unistd.h>
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 65d42758aadd..2944458b9edf 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -12,6 +12,7 @@
 #include "ui/progress.h"
 #include <errno.h>
 #include <math.h>
+#include <sys/param.h>
 
 static bool hists__filter_entry_by_dso(struct hists *hists,
 				       struct hist_entry *he);
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 7d84338b19ee..4f7e42e18f8a 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -2,6 +2,7 @@
 #include <linux/err.h>
 #include <dirent.h>
 #include <errno.h>
+#include <sys/param.h>
 #include "term.h"
 #include "../perf.h"
 #include "evlist.h"
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index fcad17ce5c19..4e2afd6427cd 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
-#include <sys/param.h>
 #include <sys/types.h>
 #include <assert.h>
 #include <sys/wait.h>
-- 
2.9.3

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

* [PATCH 11/22] perf tools: Remove a few more needless includes from util.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 10/22] perf tools: Include sys/param.h where needed Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 12/22] perf tools: Remove sys/ioctl.h " Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Link: http://lkml.kernel.org/n/tip-sb2zu21d6h42e5qnsrtl6wuu@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/util.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 4e2afd6427cd..0df20a3973da 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -10,18 +10,14 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/stat.h>
-#include <sys/statfs.h>
 #include <fcntl.h>
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
-#include <sys/types.h>
-#include <assert.h>
 #include <sys/wait.h>
 #include <poll.h>
-#include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <linux/types.h>
 
-- 
2.9.3

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

* [PATCH 12/22] perf tools: Remove sys/ioctl.h from util.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 11/22] perf tools: Remove a few more needless includes from util.h Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 13/22] perf tools: Remove string.h " Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Not needed in this header, added to the places that need 'struct
winsize' and the ioctl defines.

Link: http://lkml.kernel.org/n/tip-2pznlli3146y4242otlcm70m@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evlist.c       | 1 +
 tools/perf/util/evsel.c        | 1 +
 tools/perf/util/parse-events.c | 1 +
 tools/perf/util/top.h          | 2 +-
 tools/perf/util/util.h         | 1 -
 5 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 5eb638fd003f..46c0faf6c502 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -25,6 +25,7 @@
 #include "parse-events.h"
 #include <subcmd/parse-options.h>
 
+#include <sys/ioctl.h>
 #include <sys/mman.h>
 
 #include <linux/bitops.h>
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 44a7aef3911b..0e879097adfb 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -16,6 +16,7 @@
 #include <linux/hw_breakpoint.h>
 #include <linux/perf_event.h>
 #include <linux/err.h>
+#include <sys/ioctl.h>
 #include <sys/resource.h>
 #include "asm/bug.h"
 #include "callchain.h"
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 4f7e42e18f8a..01e779b91c8e 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -2,6 +2,7 @@
 #include <linux/err.h>
 #include <dirent.h>
 #include <errno.h>
+#include <sys/ioctl.h>
 #include <sys/param.h>
 #include "term.h"
 #include "../perf.h"
diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
index b2940c88734a..9bdfb78a9a35 100644
--- a/tools/perf/util/top.h
+++ b/tools/perf/util/top.h
@@ -5,7 +5,7 @@
 #include <linux/types.h>
 #include <stddef.h>
 #include <stdbool.h>
-#include <termios.h>
+#include <sys/ioctl.h>
 
 struct perf_evlist;
 struct perf_evsel;
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 0df20a3973da..c014b2fc22b3 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -18,7 +18,6 @@
 #include <string.h>
 #include <sys/wait.h>
 #include <poll.h>
-#include <sys/ioctl.h>
 #include <linux/types.h>
 
 extern char buildid_dir[];
-- 
2.9.3

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

* [PATCH 13/22] perf tools: Remove string.h from util.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 12/22] perf tools: Remove sys/ioctl.h " Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 14/22] perf tools: Remove stale prototypes from builtin.h Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Not needed in this header, added to the places that need strdup,
strcmp and a few other prototypes.

Link: http://lkml.kernel.org/n/tip-t24yy85xnlv55kyosrum2ubs@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/comm.c       | 1 +
 tools/perf/util/namespaces.c | 1 +
 tools/perf/util/util.h       | 1 -
 tools/perf/util/xyarray.c    | 2 ++
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/comm.c b/tools/perf/util/comm.c
index 530a62a7b51e..7bc981b6bf29 100644
--- a/tools/perf/util/comm.c
+++ b/tools/perf/util/comm.c
@@ -3,6 +3,7 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <linux/refcount.h>
 
 struct comm_str {
diff --git a/tools/perf/util/namespaces.c b/tools/perf/util/namespaces.c
index 2de8da64d90c..67dcbcc73c7d 100644
--- a/tools/perf/util/namespaces.c
+++ b/tools/perf/util/namespaces.c
@@ -11,6 +11,7 @@
 #include "event.h"
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 struct namespaces *namespaces__new(struct namespaces_event *event)
 {
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index c014b2fc22b3..b8dfbe1d9670 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -15,7 +15,6 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <string.h>
 #include <sys/wait.h>
 #include <poll.h>
 #include <linux/types.h>
diff --git a/tools/perf/util/xyarray.c b/tools/perf/util/xyarray.c
index c10ba41ef3f6..7251fdbabced 100644
--- a/tools/perf/util/xyarray.c
+++ b/tools/perf/util/xyarray.c
@@ -1,5 +1,7 @@
 #include "xyarray.h"
 #include "util.h"
+#include <stdlib.h>
+#include <string.h>
 
 struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size)
 {
-- 
2.9.3

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

* [PATCH 14/22] perf tools: Remove stale prototypes from builtin.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 13/22] perf tools: Remove string.h " Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 15/22] perf tools: Remove string.h, unistd.h and sys/stat.h from util.h Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Some, like prune_packed_objects() are clearly git specific, others
don't have implementations and some are used in just one place, make
them static.

Link: http://lkml.kernel.org/n/tip-faj3c5dnttf3hurv4pujut8n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin.h | 4 ----
 tools/perf/perf.c    | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/tools/perf/builtin.h b/tools/perf/builtin.h
index 26669bf9129c..d4d19fe3d050 100644
--- a/tools/perf/builtin.h
+++ b/tools/perf/builtin.h
@@ -2,16 +2,12 @@
 #define BUILTIN_H
 
 #include "util/util.h"
-#include "util/strbuf.h"
 
 extern const char perf_usage_string[];
 extern const char perf_more_info_string[];
 
 void list_common_cmds_help(void);
 const char *help_unknown_cmd(const char *cmd);
-void prune_packed_objects(int);
-int read_line_with_nul(char *buf, int size, FILE *file);
-int check_pager_config(const char *cmd);
 
 int cmd_annotate(int argc, const char **argv);
 int cmd_bench(int argc, const char **argv);
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 356588982d08..0b2cad0fb3f9 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -91,7 +91,7 @@ static int pager_command_config(const char *var, const char *value, void *data)
 }
 
 /* returns 0 for "no pager", 1 for "use pager", and -1 for "not specified" */
-int check_pager_config(const char *cmd)
+static int check_pager_config(const char *cmd)
 {
 	int err;
 	struct pager_config c;
-- 
2.9.3

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

* [PATCH 15/22] perf tools: Remove string.h, unistd.h and sys/stat.h from util.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (13 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 14/22] perf tools: Remove stale prototypes from builtin.h Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 16/22] perf tools: Remove poll.h and wait.h " Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Not needed in this header, added to the places that need FILE,
putchar(), access() and a few other prototypes.

Link: http://lkml.kernel.org/n/tip-xxtdsl6nsna82j7puwbdjqhs@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/subcmd/help.h                 | 1 +
 tools/perf/arch/arm/util/cs-etm.c       | 1 +
 tools/perf/arch/arm64/util/dwarf-regs.c | 1 +
 tools/perf/builtin-help.c               | 4 ++++
 tools/perf/builtin-mem.c                | 3 +++
 tools/perf/builtin-report.c             | 3 +++
 tools/perf/builtin-script.c             | 3 +++
 tools/perf/builtin-stat.c               | 3 +++
 tools/perf/builtin-version.c            | 3 ++-
 tools/perf/perf.c                       | 3 +++
 tools/perf/tests/attr.c                 | 3 +++
 tools/perf/tests/bpf.c                  | 2 ++
 tools/perf/tests/parse-events.c         | 3 +++
 tools/perf/util/build-id.c              | 2 ++
 tools/perf/util/color.h                 | 2 ++
 tools/perf/util/config.c                | 3 +++
 tools/perf/util/dso.c                   | 3 +++
 tools/perf/util/event.c                 | 3 +++
 tools/perf/util/header.c                | 3 +++
 tools/perf/util/machine.c               | 3 +++
 tools/perf/util/pmu.c                   | 1 +
 tools/perf/util/probe-file.c            | 3 +++
 tools/perf/util/strlist.c               | 1 +
 tools/perf/util/util.c                  | 1 +
 tools/perf/util/util.h                  | 3 ---
 25 files changed, 57 insertions(+), 4 deletions(-)

diff --git a/tools/lib/subcmd/help.h b/tools/lib/subcmd/help.h
index e145a020780c..9bd4223dc722 100644
--- a/tools/lib/subcmd/help.h
+++ b/tools/lib/subcmd/help.h
@@ -2,6 +2,7 @@
 #define __SUBCMD_HELP_H
 
 #include <sys/types.h>
+#include <stdio.h>
 
 struct cmdnames {
 	size_t alloc;
diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
index dfea6b635525..29361d9b635a 100644
--- a/tools/perf/arch/arm/util/cs-etm.c
+++ b/tools/perf/arch/arm/util/cs-etm.c
@@ -33,6 +33,7 @@
 #include "../../util/cs-etm.h"
 
 #include <stdlib.h>
+#include <sys/stat.h>
 
 #define ENABLE_SINK_MAX	128
 #define CS_BUS_DEVICE_PATH "/bus/coresight/devices/"
diff --git a/tools/perf/arch/arm64/util/dwarf-regs.c b/tools/perf/arch/arm64/util/dwarf-regs.c
index f268720ff021..cd764a9fd098 100644
--- a/tools/perf/arch/arm64/util/dwarf-regs.c
+++ b/tools/perf/arch/arm64/util/dwarf-regs.c
@@ -10,6 +10,7 @@
 
 #include <errno.h>
 #include <stddef.h>
+#include <string.h>
 #include <dwarf-regs.h>
 #include <linux/ptrace.h> /* for struct user_pt_regs */
 #include <linux/stringify.h>
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c
index 7bde2f59dac2..492f8e14ab09 100644
--- a/tools/perf/builtin-help.c
+++ b/tools/perf/builtin-help.c
@@ -14,6 +14,10 @@
 #include "util/debug.h"
 #include <linux/kernel.h>
 #include <errno.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 static struct man_viewer_list {
 	struct man_viewer_list *next;
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index 1ebc67390898..2e5be1d63af6 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -1,4 +1,7 @@
 #include <inttypes.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include "builtin.h"
 #include "perf.h"
 
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 3f89e0eaf0d4..22478ff2b706 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -46,6 +46,9 @@
 #include <signal.h>
 #include <linux/bitmap.h>
 #include <linux/stringify.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 struct report {
 	struct perf_tool	tool;
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index b093a3c21e40..d05aec491cff 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -37,6 +37,9 @@
 #include <inttypes.h>
 #include <signal.h>
 #include <sys/param.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #include "sane_ctype.h"
 
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index e3837febb4ff..eb3cc0b9a9e4 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -76,6 +76,9 @@
 #include <inttypes.h>
 #include <locale.h>
 #include <math.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #include "sane_ctype.h"
 
diff --git a/tools/perf/builtin-version.c b/tools/perf/builtin-version.c
index b9a095b1db99..d25149456a2f 100644
--- a/tools/perf/builtin-version.c
+++ b/tools/perf/builtin-version.c
@@ -1,6 +1,7 @@
-#include "util/util.h"
 #include "builtin.h"
 #include "perf.h"
+#include <linux/compiler.h>
+#include <stdio.h>
 
 int cmd_version(int argc __maybe_unused, const char **argv __maybe_unused)
 {
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 0b2cad0fb3f9..4cc6960f6226 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -24,6 +24,9 @@
 #include <signal.h>
 #include <stdlib.h>
 #include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include <linux/kernel.h>
 
 const char perf_usage_string[] =
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index c19e0da54337..0dd77494bb58 100644
--- a/tools/perf/tests/attr.c
+++ b/tools/perf/tests/attr.c
@@ -25,6 +25,9 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <sys/param.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include "../perf.h"
 #include "util.h"
 #include <subcmd/exec-cmd.h>
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c
index b78fbd611a7c..5876da126b58 100644
--- a/tools/perf/tests/bpf.c
+++ b/tools/perf/tests/bpf.c
@@ -1,6 +1,8 @@
 #include <errno.h>
 #include <stdio.h>
 #include <sys/epoll.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 #include <util/util.h>
 #include <util/bpf-loader.h>
 #include <util/evlist.h>
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index 981d2bf9914f..7fad885491c5 100644
--- a/tools/perf/tests/parse-events.c
+++ b/tools/perf/tests/parse-events.c
@@ -7,6 +7,9 @@
 #include "util.h"
 #include <dirent.h>
 #include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include <linux/kernel.h>
 #include <linux/hw_breakpoint.h>
 #include <api/fs/fs.h>
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 923ea290bb6e..687b5add4bde 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -10,6 +10,8 @@
 #include <dirent.h>
 #include <errno.h>
 #include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include "build-id.h"
 #include "event.h"
 #include "symbol.h"
diff --git a/tools/perf/util/color.h b/tools/perf/util/color.h
index a93997f16dec..52122bcc3170 100644
--- a/tools/perf/util/color.h
+++ b/tools/perf/util/color.h
@@ -1,6 +1,8 @@
 #ifndef __PERF_COLOR_H
 #define __PERF_COLOR_H
 
+#include <stdio.h>
+
 /* "\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes */
 #define COLOR_MAXLEN 24
 
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 07d87d2dbee7..8d724f0fa5a8 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -16,6 +16,9 @@
 #include "util/hist.h"  /* perf_hist_config */
 #include "util/llvm-utils.h"   /* perf_llvm_config */
 #include "config.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #include "sane_ctype.h"
 
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 3339ab7cabc5..a96a99d2369f 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -2,6 +2,9 @@
 #include <linux/kernel.h>
 #include <sys/time.h>
 #include <sys/resource.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include <errno.h>
 #include "compress.h"
 #include "path.h"
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index cf457ef534da..2e829ac0f615 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -3,6 +3,9 @@
 #include <inttypes.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */
 #include <api/fs/fs.h>
 #include "event.h"
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 915bc4f39482..948b2c5efb65 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -11,7 +11,10 @@
 #include <linux/list.h>
 #include <linux/kernel.h>
 #include <linux/bitops.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <sys/utsname.h>
+#include <unistd.h>
 
 #include "evlist.h"
 #include "evsel.h"
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 988e84ce6f88..7a47f52ccfcc 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -14,6 +14,9 @@
 #include "thread.h"
 #include "vdso.h"
 #include <stdbool.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
 #include "unwind.h"
 #include "linux/hash.h"
 #include "asm/bug.h"
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index bca1844594d0..ac16a9db1fb5 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -2,6 +2,7 @@
 #include <linux/compiler.h>
 #include <sys/types.h>
 #include <errno.h>
+#include <sys/stat.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <stdbool.h>
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index 685653f2bc32..d679389e627c 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -15,7 +15,10 @@
  *
  */
 #include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 #include <sys/uio.h>
+#include <unistd.h>
 #include "util.h"
 #include "event.h"
 #include "strlist.h"
diff --git a/tools/perf/util/strlist.c b/tools/perf/util/strlist.c
index 0d3dfcb919b4..9de5434bb49e 100644
--- a/tools/perf/util/strlist.c
+++ b/tools/perf/util/strlist.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 static
 struct rb_node *strlist__node_new(struct rblist *rblist, const void *entry)
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 131d21a659fb..6450c75a6f5b 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -3,6 +3,7 @@
 #include "debug.h"
 #include <api/fs/fs.h>
 #include <sys/mman.h>
+#include <sys/stat.h>
 #include <sys/utsname.h>
 #include <dirent.h>
 #include <inttypes.h>
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index b8dfbe1d9670..bd883f25b76e 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -7,9 +7,6 @@
 #define _DEFAULT_SOURCE 1
 #define HAS_BOOL
 
-#include <unistd.h>
-#include <stdio.h>
-#include <sys/stat.h>
 #include <fcntl.h>
 #include <stdbool.h>
 #include <stddef.h>
-- 
2.9.3

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

* [PATCH 16/22] perf tools: Remove poll.h and wait.h from util.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (14 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 15/22] perf tools: Remove string.h, unistd.h and sys/stat.h from util.h Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 17/22] perf tools: Add the right header to obtain PERF_ALIGN() Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Not needed in this header, added to the places that need poll(), wait()
and a few other prototypes.

Link: http://lkml.kernel.org/n/tip-i39c7b6xmo1vwd9wxp6fmkl0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/x86/tests/intel-cqm.c | 1 +
 tools/perf/builtin-ftrace.c           | 1 +
 tools/perf/builtin-kvm.c              | 1 +
 tools/perf/builtin-record.c           | 2 ++
 tools/perf/builtin-stat.c             | 1 +
 tools/perf/builtin-trace.c            | 1 +
 tools/perf/tests/builtin-test.c       | 1 +
 tools/perf/tests/event-times.c        | 1 +
 tools/perf/util/debug.c               | 1 +
 tools/perf/util/help-unknown-cmd.c    | 1 +
 tools/perf/util/llvm-utils.c          | 1 +
 tools/perf/util/util.h                | 2 --
 12 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c
index befde6708c33..f9713a71d77e 100644
--- a/tools/perf/arch/x86/tests/intel-cqm.c
+++ b/tools/perf/arch/x86/tests/intel-cqm.c
@@ -8,6 +8,7 @@
 
 #include <signal.h>
 #include <sys/mman.h>
+#include <sys/wait.h>
 #include <errno.h>
 #include <string.h>
 
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index 0f34ab7a9ec1..9e0b35cd0eea 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -13,6 +13,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <fcntl.h>
+#include <poll.h>
 
 #include "debug.h"
 #include <subcmd/parse-options.h>
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index 129af3e9c728..f309c3773522 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -30,6 +30,7 @@
 #include <linux/time64.h>
 #include <errno.h>
 #include <inttypes.h>
+#include <poll.h>
 #include <termios.h>
 #include <semaphore.h>
 #include <signal.h>
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 32a9a68d38a2..ee7d0a82ccd0 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -44,10 +44,12 @@
 
 #include <errno.h>
 #include <inttypes.h>
+#include <poll.h>
 #include <unistd.h>
 #include <sched.h>
 #include <signal.h>
 #include <sys/mman.h>
+#include <sys/wait.h>
 #include <asm/bug.h>
 #include <linux/time64.h>
 
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index eb3cc0b9a9e4..a935b5023732 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -78,6 +78,7 @@
 #include <math.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/wait.h>
 #include <unistd.h>
 
 #include "sane_ctype.h"
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index ef3613f2fe6a..eaa66fb57347 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -45,6 +45,7 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <libaudit.h> /* FIXME: Still needed for audit_errno_to_name */
+#include <poll.h>
 #include <signal.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index 552fd9aca08d..9e08d297f1a9 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -6,6 +6,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <string.h>
+#include <sys/wait.h>
 #include "builtin.h"
 #include "hist.h"
 #include "intlist.h"
diff --git a/tools/perf/tests/event-times.c b/tools/perf/tests/event-times.c
index 4683514751d6..634f20c631d8 100644
--- a/tools/perf/tests/event-times.c
+++ b/tools/perf/tests/event-times.c
@@ -2,6 +2,7 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <string.h>
+#include <sys/wait.h>
 #include "tests.h"
 #include "evlist.h"
 #include "evsel.h"
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c
index 9eaf86f4003b..a5b3777ffee6 100644
--- a/tools/perf/util/debug.c
+++ b/tools/perf/util/debug.c
@@ -6,6 +6,7 @@
 #include <string.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <sys/wait.h>
 #include <api/debug.h>
 #include <linux/time64.h>
 #ifdef HAVE_BACKTRACE_SUPPORT
diff --git a/tools/perf/util/help-unknown-cmd.c b/tools/perf/util/help-unknown-cmd.c
index 34201440ac03..1c88ad6425b8 100644
--- a/tools/perf/util/help-unknown-cmd.c
+++ b/tools/perf/util/help-unknown-cmd.c
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "config.h"
+#include <poll.h>
 #include <stdio.h>
 #include <subcmd/help.h>
 #include "../builtin.h"
diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 824356488ce6..c6a15f204c03 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -12,6 +12,7 @@
 #include "llvm-utils.h"
 #include "config.h"
 #include "util.h"
+#include <sys/wait.h>
 
 #define CLANG_BPF_CMD_DEFAULT_TEMPLATE				\
 		"$CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS "\
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index bd883f25b76e..3852b6d3270a 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -12,8 +12,6 @@
 #include <stddef.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <sys/wait.h>
-#include <poll.h>
 #include <linux/types.h>
 
 extern char buildid_dir[];
-- 
2.9.3

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

* [PATCH 17/22] perf tools: Add the right header to obtain PERF_ALIGN()
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (15 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 16/22] perf tools: Remove poll.h and wait.h " Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 18/22] perf tools: Use just forward declarations for struct thread where possible Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

The util/event.h header needs PERF_ALIGN(), but wasn't including
linux/kernel.h, where it is defined, instead it was getting it by
luck by including map.h, which it doesn't need at all.

Fix it by including the right header.

Link: http://lkml.kernel.org/n/tip-nf3t9blzm5ncoxsczi8oy9mx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/event.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index eb7a7b200737..db2de6413518 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -3,9 +3,9 @@
 
 #include <limits.h>
 #include <stdio.h>
+#include <linux/kernel.h>
 
 #include "../perf.h"
-#include "map.h"
 #include "build-id.h"
 #include "perf_regs.h"
 
-- 
2.9.3

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

* [PATCH 18/22] perf tools: Use just forward declarations for struct thread where possible
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (16 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 17/22] perf tools: Add the right header to obtain PERF_ALIGN() Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 19/22] tools: Update asm-generic/mman-common.h copy from the kernel Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

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

Removing various instances of unnecessary includes, reducing the maze of
header dependencies.

Link: http://lkml.kernel.org/n/tip-hwu6eyuok9pc57alookyzmsf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/arm/util/unwind-libdw.c | 1 +
 tools/perf/arch/x86/util/unwind-libdw.c | 1 +
 tools/perf/builtin-c2c.c                | 1 +
 tools/perf/builtin-inject.c             | 1 +
 tools/perf/builtin-mem.c                | 1 +
 tools/perf/builtin-timechart.c          | 1 +
 tools/perf/ui/browsers/hists.c          | 1 +
 tools/perf/ui/stdio/hist.c              | 1 +
 tools/perf/util/build-id.c              | 1 +
 tools/perf/util/hist.c                  | 1 +
 tools/perf/util/session.c               | 1 +
 tools/perf/util/session.h               | 3 +--
 tools/perf/util/sort.c                  | 1 +
 tools/perf/util/sort.h                  | 3 ++-
 tools/perf/util/unwind-libdw.h          | 6 ++++--
 15 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/tools/perf/arch/arm/util/unwind-libdw.c b/tools/perf/arch/arm/util/unwind-libdw.c
index b4176c60117a..bacfa00fca39 100644
--- a/tools/perf/arch/arm/util/unwind-libdw.c
+++ b/tools/perf/arch/arm/util/unwind-libdw.c
@@ -1,6 +1,7 @@
 #include <elfutils/libdwfl.h>
 #include "../../util/unwind-libdw.h"
 #include "../../util/perf_regs.h"
+#include "../../util/event.h"
 
 bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
 {
diff --git a/tools/perf/arch/x86/util/unwind-libdw.c b/tools/perf/arch/x86/util/unwind-libdw.c
index c4b72176ca83..38dc9bb2a7c9 100644
--- a/tools/perf/arch/x86/util/unwind-libdw.c
+++ b/tools/perf/arch/x86/util/unwind-libdw.c
@@ -1,6 +1,7 @@
 #include <elfutils/libdwfl.h>
 #include "../../util/unwind-libdw.h"
 #include "../../util/perf_regs.h"
+#include "../../util/event.h"
 
 bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
 {
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index a14be1cd3d70..e33b4acece90 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -32,6 +32,7 @@
 #include <asm/bug.h>
 #include "ui/browsers/hists.h"
 #include "evlist.h"
+#include "thread.h"
 
 struct c2c_hists {
 	struct hists		hists;
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 8bd791cca008..ea8db38eedd1 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -18,6 +18,7 @@
 #include "util/data.h"
 #include "util/auxtrace.h"
 #include "util/jit.h"
+#include "util/thread.h"
 
 #include <subcmd/parse-options.h>
 
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index 2e5be1d63af6..e001c0290793 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -12,6 +12,7 @@
 #include "util/data.h"
 #include "util/mem-events.h"
 #include "util/debug.h"
+#include "util/symbol.h"
 
 #define MEM_OPERATION_LOAD	0x1
 #define MEM_OPERATION_STORE	0x2
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 38e2c437b7b3..4e2e61695986 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -29,6 +29,7 @@
 #include <linux/rbtree.h>
 #include <linux/time64.h>
 #include "util/symbol.h"
+#include "util/thread.h"
 #include "util/callchain.h"
 
 #include "perf.h"
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 1b12a69740b3..69f4570bd4f9 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -14,6 +14,7 @@
 #include "../../util/sort.h"
 #include "../../util/util.h"
 #include "../../util/top.h"
+#include "../../util/thread.h"
 #include "../../arch/common.h"
 
 #include "../browsers/hists.h"
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 5565105c9688..42e432bd2eb4 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -6,6 +6,7 @@
 #include "../../util/evsel.h"
 #include "../../util/srcline.h"
 #include "../../util/string2.h"
+#include "../../util/thread.h"
 #include "../../util/sane_ctype.h"
 
 static size_t callchain__fprintf_left_margin(FILE *fp, int left_margin)
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 687b5add4bde..168cc49654e7 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -15,6 +15,7 @@
 #include "build-id.h"
 #include "event.h"
 #include "symbol.h"
+#include "thread.h"
 #include <linux/kernel.h>
 #include "debug.h"
 #include "session.h"
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 2944458b9edf..cf0186a088c1 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -9,6 +9,7 @@
 #include "evsel.h"
 #include "annotate.h"
 #include "srcline.h"
+#include "thread.h"
 #include "ui/progress.h"
 #include <errno.h>
 #include <math.h>
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 19d993f2a305..3041c6b98191 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -19,6 +19,7 @@
 #include "perf_regs.h"
 #include "asm/bug.h"
 #include "auxtrace.h"
+#include "thread.h"
 #include "thread-stack.h"
 #include "stat.h"
 
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 1ffae42f76a1..47b5e7dbcb18 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -5,8 +5,6 @@
 #include "event.h"
 #include "header.h"
 #include "machine.h"
-#include "symbol.h"
-#include "thread.h"
 #include "data.h"
 #include "ordered-events.h"
 #include <linux/kernel.h>
@@ -14,6 +12,7 @@
 #include <linux/perf_event.h>
 
 struct ip_callchain;
+struct symbol;
 struct thread;
 
 struct auxtrace;
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index fe4fd7b5f8e0..5762ae4e9e91 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -6,6 +6,7 @@
 #include "hist.h"
 #include "comm.h"
 #include "symbol.h"
+#include "thread.h"
 #include "evsel.h"
 #include "evlist.h"
 #include "strlist.h"
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 8bcec05ee578..b7c75597e18f 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -21,7 +21,8 @@
 #include "parse-events.h"
 #include "hist.h"
 #include "srcline.h"
-#include "thread.h"
+
+struct thread;
 
 extern regex_t parent_regex;
 extern const char *sort_order;
diff --git a/tools/perf/util/unwind-libdw.h b/tools/perf/util/unwind-libdw.h
index 58328669ed16..4a2b269a7b3b 100644
--- a/tools/perf/util/unwind-libdw.h
+++ b/tools/perf/util/unwind-libdw.h
@@ -2,10 +2,12 @@
 #define __PERF_UNWIND_LIBDW_H
 
 #include <elfutils/libdwfl.h>
-#include "event.h"
-#include "thread.h"
 #include "unwind.h"
 
+struct machine;
+struct perf_sample;
+struct thread;
+
 bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg);
 
 struct unwind_info {
-- 
2.9.3

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

* [PATCH 19/22] tools: Update asm-generic/mman-common.h copy from the kernel
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (17 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 18/22] perf tools: Use just forward declarations for struct thread where possible Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with " Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter, Al Viro,
	David Ahern, David Howells, Jiri Olsa, Namhyung Kim, Wang Nan

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

To get the changes in the commit Fixes: 3209f68b3ca4 ("statx: Include a
mask for stx_attributes in struct statx")

Silencing this perf build warning:

  Warning: tools/include/uapi/linux/stat.h differs from kernel

No need to change the statx syscall beautifiers in 'perf trace' at this
time.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: David Ahern <dsahern@gmail.com>
Cc: David Howells <dhowells@redhat.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-y8bgiyzuvura62lffvh1zbg9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/uapi/linux/stat.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/include/uapi/linux/stat.h b/tools/include/uapi/linux/stat.h
index 51a6b86e3700..d538897b8e08 100644
--- a/tools/include/uapi/linux/stat.h
+++ b/tools/include/uapi/linux/stat.h
@@ -114,7 +114,7 @@ struct statx {
 	__u64	stx_ino;	/* Inode number */
 	__u64	stx_size;	/* File size */
 	__u64	stx_blocks;	/* Number of 512-byte blocks allocated */
-	__u64	__spare1[1];
+	__u64	stx_attributes_mask; /* Mask to show what's supported in stx_attributes */
 	/* 0x40 */
 	struct statx_timestamp	stx_atime;	/* Last access time */
 	struct statx_timestamp	stx_btime;	/* File creation time */
@@ -152,9 +152,10 @@ struct statx {
 #define STATX_BASIC_STATS	0x000007ffU	/* The stuff in the normal stat struct */
 #define STATX_BTIME		0x00000800U	/* Want/got stx_btime */
 #define STATX_ALL		0x00000fffU	/* All currently supported flags */
+#define STATX__RESERVED		0x80000000U	/* Reserved for future struct statx expansion */
 
 /*
- * Attributes to be found in stx_attributes
+ * Attributes to be found in stx_attributes and masked in stx_attributes_mask.
  *
  * These give information about the features or the state of a file that might
  * be of use to ordinary userspace programs such as GUIs or ls rather than
-- 
2.9.3

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

* [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (18 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 19/22] tools: Update asm-generic/mman-common.h copy from the kernel Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 20:36   ` Luck, Tony
  2017-04-24 19:54 ` [PATCH 21/22] tools arch x86: Sync cpufeatures.h Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  22 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo, Tony Luck

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

Just a minor fix done in:

  Fixes: 26a37ab319a2 ("x86/mce: Fix copy/paste error in exception table entries")

Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/n/tip-ni9jzdd5yxlail6pq8cuexw2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/arch/x86/lib/memcpy_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/arch/x86/lib/memcpy_64.S b/tools/arch/x86/lib/memcpy_64.S
index 49e6ebac7e73..98dcc112b363 100644
--- a/tools/arch/x86/lib/memcpy_64.S
+++ b/tools/arch/x86/lib/memcpy_64.S
@@ -286,7 +286,7 @@ ENDPROC(memcpy_mcsafe_unrolled)
 	_ASM_EXTABLE_FAULT(.L_copy_leading_bytes, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w0, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w1, .L_memcpy_mcsafe_fail)
-	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
+	_ASM_EXTABLE_FAULT(.L_cache_w2, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w4, .L_memcpy_mcsafe_fail)
 	_ASM_EXTABLE_FAULT(.L_cache_w5, .L_memcpy_mcsafe_fail)
-- 
2.9.3

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

* [PATCH 21/22] tools arch x86: Sync cpufeatures.h
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (19 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with " Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 19:54 ` [PATCH 22/22] perf tools: Fix the code to strip command name Arnaldo Carvalho de Melo
  2017-04-24 20:40 ` [GIT PULL 00/22] perf/core improvements and fixes Ingo Molnar
  22 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Kyle Huey, Thomas Gleixner

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

To catch changes made in:

  90218ac77d05 ("x86/cpufeature: Detect CPUID faulting support")

No changes needed in the tools using this file at this time.

Cc: Kyle Huey <me@kylehuey.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/n/tip-qiqsj5qg2ljbsbfre2zaf9v4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/arch/x86/include/asm/cpufeatures.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h
index b04bb6dfed7f..0fe00446f9ca 100644
--- a/tools/arch/x86/include/asm/cpufeatures.h
+++ b/tools/arch/x86/include/asm/cpufeatures.h
@@ -187,6 +187,7 @@
  * Reuse free bits when adding new feature flags!
  */
 #define X86_FEATURE_RING3MWAIT	( 7*32+ 0) /* Ring 3 MONITOR/MWAIT */
+#define X86_FEATURE_CPUID_FAULT ( 7*32+ 1) /* Intel CPUID faulting */
 #define X86_FEATURE_CPB		( 7*32+ 2) /* AMD Core Performance Boost */
 #define X86_FEATURE_EPB		( 7*32+ 3) /* IA32_ENERGY_PERF_BIAS support */
 #define X86_FEATURE_CAT_L3	( 7*32+ 4) /* Cache Allocation Technology L3 */
-- 
2.9.3

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

* [PATCH 22/22] perf tools: Fix the code to strip command name
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (20 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 21/22] tools arch x86: Sync cpufeatures.h Arnaldo Carvalho de Melo
@ 2017-04-24 19:54 ` Arnaldo Carvalho de Melo
  2017-04-24 20:08   ` David Ahern
  2017-04-24 20:40 ` [GIT PULL 00/22] perf/core improvements and fixes Ingo Molnar
  22 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-24 19:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, David Ahern, Namhyung Kim,
	Peter Zijlstra, Yao Jin, Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

Recent commit broke command name strip in perf_event__get_comm_ids
function. It replaced left to right search for '\n' with rtrim, which
actually does right to left search. It occasionally caught earlier '\n'
and kept trash in the command name.

Keeping the ltrim, but moving back the left to right '\n' search
instead of the rtrim.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Taeung Song <treeze.taeung@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Yao Jin <yao.jin@linux.intel.com>
Fixes: bdd97ca63faa ("perf tools: Refactor the code to strip command name with {l,r}trim()")
Link: http://lkml.kernel.org/r/20170420092430.29657-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/event.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 2e829ac0f615..142835c0ca0a 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -141,8 +141,15 @@ static int perf_event__get_comm_ids(pid_t pid, char *comm, size_t len,
 	ppids = strstr(bf, "PPid:");
 
 	if (name) {
+		char *nl;
+
 		name += 5;  /* strlen("Name:") */
-		name = rtrim(ltrim(name));
+		name = ltrim(name);
+
+		nl = strchr(name, '\n');
+		if (nl)
+			*nl = '\0';
+
 		size = strlen(name);
 		if (size >= len)
 			size = len - 1;
-- 
2.9.3

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

* Re: [PATCH 22/22] perf tools: Fix the code to strip command name
  2017-04-24 19:54 ` [PATCH 22/22] perf tools: Fix the code to strip command name Arnaldo Carvalho de Melo
@ 2017-04-24 20:08   ` David Ahern
  0 siblings, 0 replies; 42+ messages in thread
From: David Ahern @ 2017-04-24 20:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Namhyung Kim, Peter Zijlstra, Yao Jin,
	Arnaldo Carvalho de Melo

On 4/24/17 1:54 PM, Arnaldo Carvalho de Melo wrote:
> From: Jiri Olsa <jolsa@kernel.org>
> 
> Recent commit broke command name strip in perf_event__get_comm_ids
> function. It replaced left to right search for '\n' with rtrim, which
> actually does right to left search. It occasionally caught earlier '\n'
> and kept trash in the command name.
> 

interesting. When I reviewed that patch it didn't cross my mind that a
comm Name could have a newline in it. seems very odd to do so.

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

* Re: [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
  2017-04-24 19:54 ` [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with " Arnaldo Carvalho de Melo
@ 2017-04-24 20:36   ` Luck, Tony
  2017-04-25  2:59     ` Joe Perches
  2017-04-25 14:13     ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 42+ messages in thread
From: Luck, Tony @ 2017-04-24 20:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Andy Whitcroft, Joe Perches
  Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo

On Mon, Apr 24, 2017 at 04:54:37PM -0300, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Just a minor fix done in:
> 
>   Fixes: 26a37ab319a2 ("x86/mce: Fix copy/paste error in exception table entries")
> 
> Cc: Tony Luck <tony.luck@intel.com>
> Link: http://lkml.kernel.org/n/tip-ni9jzdd5yxlail6pq8cuexw2@git.kernel.org
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/arch/x86/lib/memcpy_64.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/arch/x86/lib/memcpy_64.S b/tools/arch/x86/lib/memcpy_64.S
> index 49e6ebac7e73..98dcc112b363 100644
> --- a/tools/arch/x86/lib/memcpy_64.S
> +++ b/tools/arch/x86/lib/memcpy_64.S
> @@ -286,7 +286,7 @@ ENDPROC(memcpy_mcsafe_unrolled)
>  	_ASM_EXTABLE_FAULT(.L_copy_leading_bytes, .L_memcpy_mcsafe_fail)
>  	_ASM_EXTABLE_FAULT(.L_cache_w0, .L_memcpy_mcsafe_fail)
>  	_ASM_EXTABLE_FAULT(.L_cache_w1, .L_memcpy_mcsafe_fail)
> -	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
> +	_ASM_EXTABLE_FAULT(.L_cache_w2, .L_memcpy_mcsafe_fail)
>  	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
>  	_ASM_EXTABLE_FAULT(.L_cache_w4, .L_memcpy_mcsafe_fail)
>  	_ASM_EXTABLE_FAULT(.L_cache_w5, .L_memcpy_mcsafe_fail)

If we are going to have all these copies of kernel files below
"tools/...", perhaps checkpatch could warn people touching one
that the other needs the same update?

-Tony

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

* Re: [GIT PULL 00/22] perf/core improvements and fixes
  2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (21 preceding siblings ...)
  2017-04-24 19:54 ` [PATCH 22/22] perf tools: Fix the code to strip command name Arnaldo Carvalho de Melo
@ 2017-04-24 20:40 ` Ingo Molnar
  22 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2017-04-24 20:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Al Viro, Andi Kleen, David Ahern,
	David Howells, Jiri Olsa, Kyle Huey, Namhyung Kim,
	Peter Zijlstra, Stephane Eranian, Taeung Song, Thomas Gleixner,
	Tony Luck, Wang Nan, Yao Jin, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider applying,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 07590a7d4030c159b9a0d7171f81049a9ce23245:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170419' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-04-20 10:07:18 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.12-20170424
> 
> for you to fetch changes up to 9d43f5e8df6804ae271407500af9062e9278167a:
> 
>   perf tools: Fix the code to strip command name (2017-04-24 13:43:37 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fix display of data source snoop indication in 'perf mem' (Andi Kleen)
> 
> - Fix the code to strip command name from /proc/PID/stat (Jiri Olsa)
> 
> Infrastructure:
> 
> - Continue the disentanglement of headers, specially util.h (Arnaldo Carvalho de Melo)
> 
> - Synchronize some header files with the kernel (Arnaldo Carvalho de Melo)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf mem: Fix display of data source snoop indication
> 
> Arnaldo Carvalho de Melo (20):
>       perf unwind: Provide only forward declarations for pointer types
>       perf tools: Add signal.h to places using its definitions
>       perf tools: Move units conversion/formatting routines to separate object
>       perf tools: Move timestamp routines from util.h to time-utils.h
>       perf kvm: Make function only used by 'perf kvm' static
>       perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h
>       perf tools: Add compress.h for the *_decompress_to_file() headers
>       perf callchain: Move callchain specific routines from util.[ch]
>       perf tools: Include sys/param.h where needed
>       perf tools: Remove a few more needless includes from util.h
>       perf tools: Remove sys/ioctl.h from util.h
>       perf tools: Remove string.h from util.h
>       perf tools: Remove stale prototypes from builtin.h
>       perf tools: Remove string.h, unistd.h and sys/stat.h from util.h
>       perf tools: Remove poll.h and wait.h from util.h
>       perf tools: Add the right header to obtain PERF_ALIGN()
>       perf tools: Use just forward declarations for struct thread where possible
>       tools: Update asm-generic/mman-common.h copy from the kernel
>       tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
>       tools arch x86: Sync cpufeatures.h
> 
> Jiri Olsa (1):
>       perf tools: Fix the code to strip command name
> 
>  tools/arch/x86/include/asm/cpufeatures.h  |   1 +
>  tools/arch/x86/lib/memcpy_64.S            |   2 +-
>  tools/include/uapi/linux/stat.h           |   5 +-
>  tools/lib/subcmd/help.h                   |   1 +
>  tools/perf/arch/arm/util/cs-etm.c         |   1 +
>  tools/perf/arch/arm/util/unwind-libdw.c   |   1 +
>  tools/perf/arch/arm64/util/dwarf-regs.c   |   1 +
>  tools/perf/arch/x86/tests/intel-cqm.c     |   2 +
>  tools/perf/arch/x86/util/unwind-libdw.c   |   1 +
>  tools/perf/builtin-buildid-cache.c        |   1 +
>  tools/perf/builtin-c2c.c                  |   2 +
>  tools/perf/builtin-ftrace.c               |   1 +
>  tools/perf/builtin-help.c                 |   4 +
>  tools/perf/builtin-inject.c               |   2 +
>  tools/perf/builtin-kvm.c                  |  17 +++
>  tools/perf/builtin-mem.c                  |   4 +
>  tools/perf/builtin-record.c               |   5 +
>  tools/perf/builtin-report.c               |   5 +
>  tools/perf/builtin-script.c               |   5 +
>  tools/perf/builtin-stat.c                 |   5 +
>  tools/perf/builtin-timechart.c            |   1 +
>  tools/perf/builtin-top.c                  |   1 +
>  tools/perf/builtin-trace.c                |   2 +
>  tools/perf/builtin-version.c              |   3 +-
>  tools/perf/builtin.h                      |   4 -
>  tools/perf/perf.c                         |   6 +-
>  tools/perf/tests/attr.c                   |   4 +
>  tools/perf/tests/bpf.c                    |   2 +
>  tools/perf/tests/builtin-test.c           |   1 +
>  tools/perf/tests/code-reading.c           |   1 +
>  tools/perf/tests/event-times.c            |   1 +
>  tools/perf/tests/parse-events.c           |   3 +
>  tools/perf/tests/unit_number__scnprintf.c |   2 +-
>  tools/perf/trace/beauty/signum.c          |   1 +
>  tools/perf/ui/browsers/hists.c            |   2 +
>  tools/perf/ui/gtk/annotate.c              |   1 +
>  tools/perf/ui/gtk/hists.c                 |   1 +
>  tools/perf/ui/stdio/hist.c                |   1 +
>  tools/perf/util/Build                     |   1 +
>  tools/perf/util/build-id.c                |   3 +
>  tools/perf/util/callchain.c               | 103 +++++++++++++++
>  tools/perf/util/color.h                   |   2 +
>  tools/perf/util/comm.c                    |   1 +
>  tools/perf/util/compress.h                |  12 ++
>  tools/perf/util/config.c                  |   4 +
>  tools/perf/util/debug.c                   |  33 ++++-
>  tools/perf/util/debug.h                   |   3 +
>  tools/perf/util/dso.c                     |   4 +
>  tools/perf/util/event.c                   |  12 +-
>  tools/perf/util/event.h                   |   2 +-
>  tools/perf/util/evlist.c                  |   3 +
>  tools/perf/util/evlist.h                  |   1 +
>  tools/perf/util/evsel.c                   |   1 +
>  tools/perf/util/header.c                  |   4 +
>  tools/perf/util/help-unknown-cmd.c        |   1 +
>  tools/perf/util/hist.c                    |   2 +
>  tools/perf/util/llvm-utils.c              |   1 +
>  tools/perf/util/lzma.c                    |   1 +
>  tools/perf/util/machine.c                 |   3 +
>  tools/perf/util/mem-events.c              |   2 +-
>  tools/perf/util/namespaces.c              |   1 +
>  tools/perf/util/parse-events.c            |   2 +
>  tools/perf/util/pmu.c                     |   1 +
>  tools/perf/util/probe-file.c              |   3 +
>  tools/perf/util/python-ext-sources        |   1 +
>  tools/perf/util/python.c                  |  13 ++
>  tools/perf/util/session.c                 |   1 +
>  tools/perf/util/session.h                 |   3 +-
>  tools/perf/util/sort.c                    |   1 +
>  tools/perf/util/sort.h                    |   3 +-
>  tools/perf/util/strlist.c                 |   1 +
>  tools/perf/util/time-utils.c              |  25 ++++
>  tools/perf/util/time-utils.h              |   7 +
>  tools/perf/util/top.h                     |   2 +-
>  tools/perf/util/units.c                   |  39 ++++++
>  tools/perf/util/units.h                   |  10 ++
>  tools/perf/util/unwind-libdw.h            |   6 +-
>  tools/perf/util/unwind.h                  |   9 +-
>  tools/perf/util/util.c                    | 211 +-----------------------------
>  tools/perf/util/util.h                    |  38 ------
>  tools/perf/util/xyarray.c                 |   2 +
>  tools/perf/util/zlib.c                    |   1 +
>  82 files changed, 412 insertions(+), 270 deletions(-)
>  create mode 100644 tools/perf/util/compress.h
>  create mode 100644 tools/perf/util/units.c
>  create mode 100644 tools/perf/util/units.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
  2017-04-24 20:36   ` Luck, Tony
@ 2017-04-25  2:59     ` Joe Perches
  2017-04-25 16:18       ` Luck, Tony
  2017-04-25 14:13     ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 42+ messages in thread
From: Joe Perches @ 2017-04-25  2:59 UTC (permalink / raw)
  To: Luck, Tony, Arnaldo Carvalho de Melo, Andy Whitcroft
  Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo

On Mon, 2017-04-24 at 13:36 -0700, Luck, Tony wrote:
> On Mon, Apr 24, 2017 at 04:54:37PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > Just a minor fix done in:
> > 
> >   Fixes: 26a37ab319a2 ("x86/mce: Fix copy/paste error in exception table entries")
> > 
> > Cc: Tony Luck <tony.luck@intel.com>
> > Link: http://lkml.kernel.org/n/tip-ni9jzdd5yxlail6pq8cuexw2@git.kernel.org
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > ---
> >  tools/arch/x86/lib/memcpy_64.S | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/arch/x86/lib/memcpy_64.S b/tools/arch/x86/lib/memcpy_64.S
> > index 49e6ebac7e73..98dcc112b363 100644
> > --- a/tools/arch/x86/lib/memcpy_64.S
> > +++ b/tools/arch/x86/lib/memcpy_64.S
> > @@ -286,7 +286,7 @@ ENDPROC(memcpy_mcsafe_unrolled)
> >  	_ASM_EXTABLE_FAULT(.L_copy_leading_bytes, .L_memcpy_mcsafe_fail)
> >  	_ASM_EXTABLE_FAULT(.L_cache_w0, .L_memcpy_mcsafe_fail)
> >  	_ASM_EXTABLE_FAULT(.L_cache_w1, .L_memcpy_mcsafe_fail)
> > -	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
> > +	_ASM_EXTABLE_FAULT(.L_cache_w2, .L_memcpy_mcsafe_fail)
> >  	_ASM_EXTABLE_FAULT(.L_cache_w3, .L_memcpy_mcsafe_fail)
> >  	_ASM_EXTABLE_FAULT(.L_cache_w4, .L_memcpy_mcsafe_fail)
> >  	_ASM_EXTABLE_FAULT(.L_cache_w5, .L_memcpy_mcsafe_fail)
> 
> If we are going to have all these copies of kernel files below
> "tools/...", perhaps checkpatch could warn people touching one
> that the other needs the same update?

How would checkpatch know tools hasn't already updated the other?

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

* Re: [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
  2017-04-24 20:36   ` Luck, Tony
  2017-04-25  2:59     ` Joe Perches
@ 2017-04-25 14:13     ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-25 14:13 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Andy Whitcroft, Joe Perches, Ingo Molnar, linux-kernel,
	Arnaldo Carvalho de Melo

Em Mon, Apr 24, 2017 at 01:36:30PM -0700, Luck, Tony escreveu:
> On Mon, Apr 24, 2017 at 04:54:37PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>

> > Just a minor fix done in:

> >   Fixes: 26a37ab319a2 ("x86/mce: Fix copy/paste error in exception table entries")

<SNIP>

> If we are going to have all these copies of kernel files below
> "tools/...", perhaps checkpatch could warn people touching one
> that the other needs the same update?

So, we have tools/perf/check-headers.sh that will warn, when building
tools/perf/, if some of the files we get from the kernel is out of
synch.

When we see this, we should look to see if the change will entail
changes in tools/, if it will drag some other header we don't need, etc.

Sometimes, like in this case, we don't want to pull extra headers, like
asm/export.h, so we have this in that check-headers.sh script:

[acme@jouet linux]$ tail -5 tools/perf/check-headers.sh
# 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>"
[acme@jouet linux]$

I.e. we want to get as close to what is in the kernel as possible, but
with some exceptions.

And we don't want to add more work to the kernel developers, who can
continue working as if there is no tools/ in the tree.

For those who want to help tools/, then its just a matter of building
perf when doing changes to kernel headers.

We also want these copies because with:

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

We can create tarball with just what is needed to build perf, then get
that tarball and move to some other system and build a newer perf to run
in some older environment, older kernel, etc.

- Arnaldo

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

* RE: [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
  2017-04-25  2:59     ` Joe Perches
@ 2017-04-25 16:18       ` Luck, Tony
  2017-04-25 16:28         ` Joe Perches
  0 siblings, 1 reply; 42+ messages in thread
From: Luck, Tony @ 2017-04-25 16:18 UTC (permalink / raw)
  To: Joe Perches, Arnaldo Carvalho de Melo, Andy Whitcroft
  Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo

>> If we are going to have all these copies of kernel files below
>> "tools/...", perhaps checkpatch could warn people touching one
>> that the other needs the same update?
>
> How would checkpatch know tools hasn't already updated the other?

If checkpatch had a list of all the tools copies, it could warn if a patch
touched a file without touching the copy.

Not completely ideal because people might update the two files in
separate patches in a series (in which case they would see warnings
from both patches).

Also means that checkpatch needs the list of copied files ... not sure
how often that changes.

-Tony

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

* Re: [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel
  2017-04-25 16:18       ` Luck, Tony
@ 2017-04-25 16:28         ` Joe Perches
  0 siblings, 0 replies; 42+ messages in thread
From: Joe Perches @ 2017-04-25 16:28 UTC (permalink / raw)
  To: Luck, Tony, Arnaldo Carvalho de Melo, Andy Whitcroft
  Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo

On Tue, 2017-04-25 at 16:18 +0000, Luck, Tony wrote:
> > > If we are going to have all these copies of kernel files below
> > > "tools/...", perhaps checkpatch could warn people touching one
> > > that the other needs the same update?
> > 
> > How would checkpatch know tools hasn't already updated the other?
> 
> If checkpatch had a list of all the tools copies, it could warn if a patch
> touched a file without touching the copy.

I rather doubt these files are modified simultaneously.

A quick and no doubt incomplete git log -- "tools/*/kernel.h"
seems to show little simultaneity.

> Not completely ideal because people might update the two files in
> separate patches in a series (in which case they would see warnings
> from both patches).
> 
> Also means that checkpatch needs the list of copied files ... not sure
> how often that changes.

Nor I.  Anyway, feel free to propose an actual patch.

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

* [GIT PULL 00/22] perf/core improvements and fixes
@ 2018-11-30 18:26 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-11-30 18:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter, Alexander Shishkin,
	Alexei Starovoitov, Alexey Budankov, Andi Kleen, Anton Blanchard,
	Daniel Borkmann, David Ahern, David Howells, David S . Miller,
	Eric Saint-Etienne, Ivan Babrou, Jin Yao, Jiri Olsa,
	Julia Lawall, Leo Yan, Mathieu Poirier, Namhyung Kim,
	Peter Zijlstra, Ravi Bangoria, Slavomir Kaslev, Stephane Eranian,
	Steven Rostedt, Thomas Richter, Tzvetomir Stoyanov, Wang Nan,
	Wen Yang, yuzhoujian, zhong.weidong, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, more to come,

Regards,

- Arnaldo

Test results at the end of this message, as usual.

The following changes since commit b1a9d7b0190119dad5b9b7841751b5a7586bbc8b:

  Merge tag 'perf-urgent-for-mingo-4.20-20181121' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2018-11-21 15:57:21 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.21-20181130

for you to fetch changes up to 09d3f015d1e1b4fee7e9bbdcf54201d239393391:

  uprobes: Fix handle_swbp() vs. unregister() + register() race once more (2018-11-23 08:31:19 +0100)

----------------------------------------------------------------
perf/core improvements and fixes:

- Introduce 'perf record --aio' to use asynchronous IO trace writing in
  'perf record' disabled by default, i.e. one needs to explicitly use
  'perf record --aio' to use it, in which case the number of AIO aiocb
  structs will be one, specify 'perf record --aio=N' to ask for more,
  according to your needs, related to the number of processors in your
  machine. Reports about the effectiveness of this option are welcome
  so that we can decide on making it the default mode of operation. Read
  the respective patches commit logs for further information (Alexey Budankov)

- Add fallback routines to be used in places where we don't have the cpu mode
  (kernel/user space/hypervisor) and thus must first fallback lookups looking
  at all map trees when trying to resolve symbols (Adrian Hunter)

- Introduce 'perf top --kallsyms file' to match 'perf report --kallsyms', useful
  when dealing with BPF, where symbol resolution happens via kallsyms, not via
  the default vmlinux ELF symtabs (Arnaldo Carvalho de Melo)

- Fix CSV mode column output for non-cgroup events in 'perf stat' (Stephane Eranian)

- Fix 'perf stat' shadow stats for clock events. (Ravi Bangoria)

- Fix error with config term "pt=0", where we should just force "pt=1" and
  warn the user about the former being non-sensical (Adrian Hunter)

- Fix 'perf test' entry where we expect 'sleep' to come in a PERF_RECORD_COMM
  but instead we get 'coreutils' when sleep is provided by some versions of
  the 'coreutils' package (Adrian Hunter)

- Remove needless rb_tree extra indirection from map__find() (Eric Saint-Etienne)

- Add sanity check to libtraceevent's is_timestamp_in_us() (Tzvetomir Stoyanov)

- Use ERR_CAST instead of ERR_PTR(PTR_ERR()) (Wen Yang)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andrea Parri (1):
      uprobes: Fix handle_swbp() vs. unregister() + register() race once more

Jiri Olsa (3):
      perf/x86/intel: Move branch tracing setup to the Intel-specific source file
      perf/x86/intel: Add generic branch tracing check to intel_pmu_has_bts()
      perf/x86/intel: Disallow precise_ip on BTS events

 arch/x86/events/core.c       | 20 ----------------
 arch/x86/events/intel/core.c | 56 ++++++++++++++++++++++++++++++++++----------
 arch/x86/events/perf_event.h | 13 ++++++----
 kernel/events/uprobes.c      | 12 ++++++++--
 4 files changed, 63 insertions(+), 38 deletions(-)

Test results:

XXX: Investigation on the watchpoint and breakpoint 'perf test' failures is
     underway, doesn't look like related to patches in this batch.

The first ones are container (docker) based builds of tools/perf with
and without libelf support.  Where clang is available, it is also used
to build perf with/without libelf, and building with LIBCLANGLLVM=1
(built-in clang) with gcc and clang when clang and its devel libraries
are installed.

The objtool and samples/bpf/ builds are disabled now that I'm switching from
using the sources in a local volume to fetching them from a http server to
build it inside the container, to make it easier to build in a container cluster.
Those will come back later.

Several are cross builds, the ones with -x-ARCH and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.

The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.

Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.

  # dm
   1 alpine:3.4                    : Ok   gcc (Alpine 5.3.0) 5.3.0
   2 alpine:3.5                    : Ok   gcc (Alpine 6.2.1) 6.2.1 20160822
   3 alpine:3.6                    : Ok   gcc (Alpine 6.3.0) 6.3.0
   4 alpine:3.7                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   5 alpine:3.8                    : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 alpine:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   7 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   8 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   9 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  11 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  12 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)
  13 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
  14 clearlinux:latest             : Ok   gcc (Clear Linux OS for Intel Architecture) 8.2.1 20180502
  15 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  16 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  17 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  18 debian:experimental           : Ok   gcc (Debian 8.2.0-10) 8.2.0
  19 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 8.2.0-10) 8.2.0
  20 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 8.2.0-7) 8.2.0
  21 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 8.2.0-10) 8.2.0
  22 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 8.2.0-7) 8.2.0
  23 fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  24 fedora:21                     : Ok   gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
  25 fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  26 fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  27 fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  28 fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  29 fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  30 fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
  31 fedora:27                     : Ok   gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6)
  32 fedora:28                     : Ok   gcc (GCC) 8.2.1 20181105 (Red Hat 8.2.1-5)
  33 fedora:29                     : Ok   gcc (GCC) 8.2.1 20181011 (Red Hat 8.2.1-4)
  34 fedora:rawhide                : Ok   gcc (GCC) 8.2.1 20181011 (Red Hat 8.2.1-4)
  35 gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 7.3.0-r3 p1.4) 7.3.0
  36 mageia:5                      : Ok   gcc (GCC) 4.9.2
  37 mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
  38 opensuse:13.2                 : Ok   gcc (SUSE Linux) 4.8.3 20140627 [gcc-4_8-branch revision 212064]
  39 opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
  40 opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
  41 opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
  42 opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
  43 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23.0.1)
  44 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36.0.1)
  45 ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  46 ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  47 ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
  48 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
  49 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  52 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  53 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  54 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  55 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  56 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
  57 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  58 ubuntu:18.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0
  59 ubuntu:18.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) 7.3.0
  60 ubuntu:18.04-x-m68k           : Ok   m68k-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  61 ubuntu:18.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  62 ubuntu:18.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  63 ubuntu:18.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  64 ubuntu:18.04-x-riscv64        : Ok   riscv64-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  65 ubuntu:18.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  66 ubuntu:18.04-x-sh4            : Ok   sh4-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  67 ubuntu:18.04-x-sparc64        : Ok   sparc64-linux-gnu-gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
  68 ubuntu:18.10                  : Ok   gcc (Ubuntu 8.2.0-7ubuntu1) 8.2.0
  # 

  # uname -a
  Linux seventh 4.18.19-100.fc27.x86_64 #1 SMP Wed Nov 14 22:04:34 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  # git log --oneline -1
  ceed7c10bbb4 tools lib traceevent: Add sanity check to is_timestamp_in_us()
  # perf version --build-options
  perf version 4.20.rc3.gceed7c
                   dwarf: [ on  ]  # HAVE_DWARF_SUPPORT
      dwarf_getlocations: [ on  ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
                   glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
                    gtk2: [ on  ]  # HAVE_GTK2_SUPPORT
           syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
                  libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
                  libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
                 libnuma: [ on  ]  # HAVE_LIBNUMA_SUPPORT
  numa_num_possible_cpus: [ on  ]  # HAVE_LIBNUMA_SUPPORT
                 libperl: [ on  ]  # HAVE_LIBPERL_SUPPORT
               libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
                libslang: [ on  ]  # HAVE_SLANG_SUPPORT
               libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
               libunwind: [ on  ]  # HAVE_LIBUNWIND_SUPPORT
      libdw-dwarf-unwind: [ on  ]  # HAVE_DWARF_SUPPORT
                    zlib: [ on  ]  # HAVE_ZLIB_SUPPORT
                    lzma: [ on  ]  # HAVE_LZMA_SUPPORT
               get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
                     bpf: [ on  ]  # HAVE_LIBBPF_SUPPORT
  # perf test
   1: vmlinux symtab matches kallsyms                       : Ok
   2: Detect openat syscall event                           : Ok
   3: Detect openat syscall event on all cpus               : Ok
   4: Read samples using the mmap interface                 : Ok
   5: Test data source output                               : Ok
   6: Parse event definition strings                        : Ok
   7: Simple expression parser                              : Ok
   8: PERF_RECORD_* events & perf_sample fields             : Ok
   9: Parse perf pmu format                                 : Ok
  10: DSO data read                                         : Ok
  11: DSO data cache                                        : Ok
  12: DSO data reopen                                       : Ok
  13: Roundtrip evsel->name                                 : Ok
  14: Parse sched tracepoints fields                        : Ok
  15: syscalls:sys_enter_openat event fields                : Ok
  16: Setup struct perf_event_attr                          : Ok
  17: Match and link multiple hists                         : Ok
  18: 'import perf' in python                               : Ok
  19: Breakpoint overflow signal handler                    : Ok
  20: Breakpoint overflow sampling                          : Ok
  21: Breakpoint accounting                                 : Ok
  22: Watchpoint                                            :
  22.1: Read Only Watchpoint                                : Skip
  22.2: Write Only Watchpoint                               : Ok
  22.3: Read / Write Watchpoint                             : Ok
  22.4: Modify Watchpoint                                   : FAILED!
  23: Number of exit events of a simple workload            : Ok
  24: Software clock events period values                   : Ok
  25: Object code reading                                   : Ok
  26: Sample parsing                                        : Ok
  27: Use a dummy software event to keep tracking           : Ok
  28: Parse with no sample_id_all bit set                   : Ok
  29: Filter hist entries                                   : Ok
  30: Lookup mmap thread                                    : Ok
  31: Share thread mg                                       : Ok
  32: Sort output of hist entries                           : Ok
  33: Cumulate child hist entries                           : Ok
  34: Track with sched_switch                               : Ok
  35: Filter fds with revents mask in a fdarray             : Ok
  36: Add fd to a fdarray, making it autogrow               : Ok
  37: kmod_path__parse                                      : Ok
  38: Thread map                                            : Ok
  39: LLVM search and compile                               :
  39.1: Basic BPF llvm compile                              : Ok
  39.2: kbuild searching                                    : Ok
  39.3: Compile source for BPF prologue generation          : Ok
  39.4: Compile source for BPF relocation                   : Ok
  40: Session topology                                      : Ok
  41: BPF filter                                            :
  41.1: Basic BPF filtering                                 : Ok
  41.2: BPF pinning                                         : Ok
  41.3: BPF prologue generation                             : Ok
  41.4: BPF relocation checker                              : Ok
  42: Synthesize thread map                                 : Ok
  43: Remove thread map                                     : Ok
  44: Synthesize cpu map                                    : Ok
  45: Synthesize stat config                                : Ok
  46: Synthesize stat                                       : Ok
  47: Synthesize stat round                                 : Ok
  48: Synthesize attr update                                : Ok
  49: Event times                                           : Ok
  50: Read backward ring buffer                             : Ok
  51: Print cpu map                                         : Ok
  52: Probe SDT events                                      : Ok
  53: is_printable_array                                    : Ok
  54: Print bitmap                                          : Ok
  55: perf hooks                                            : Ok
  56: builtin clang support                                 : Skip (not compiled in)
  57: unit_number__scnprintf                                : Ok
  58: mem2node                                              : Ok
  59: x86 rdpmc                                             : Ok
  60: Convert perf time to TSC                              : Ok
  61: DWARF unwind                                          : Ok
  62: x86 instruction decoder - new instructions            : Ok
  63: x86 bp modify                                         : FAILED!
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: Check open filename arg using perf trace + vfs_getname: Ok
  66: Use vfs_getname probe to get syscall args filenames   : Ok
  67: Add vfs_getname probe to get syscall args filenames   : Ok

  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/perf/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
             make_util_map_o_O: make util/map.o
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                   make_help_O: make help
         make_with_clangllvm_O: make LIBCLANGLLVM=1
         make_install_prefix_O: make install prefix=/tmp/krava
           make_no_libbionic_O: make NO_LIBBIONIC=1
                make_no_newt_O: make NO_NEWT=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
                make_install_O: make install
            make_no_auxtrace_O: make NO_AUXTRACE=1
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
                  make_debug_O: make DEBUG=1
                    make_doc_O: make doc
              make_no_libbpf_O: make NO_LIBBPF=1
              make_no_libelf_O: make NO_LIBELF=1
                make_no_gtk2_O: make NO_GTK2=1
               make_no_slang_O: make NO_SLANG=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
            make_no_demangle_O: make NO_DEMANGLE=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
           make_no_backtrace_O: make NO_BACKTRACE=1
             make_no_libnuma_O: make NO_LIBNUMA=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
                 make_perf_o_O: make perf.o
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
           make_no_libpython_O: make NO_LIBPYTHON=1
            make_install_bin_O: make install-bin
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
                   make_pure_O: make
             make_no_libperl_O: make NO_LIBPERL=1
              make_clean_all_O: make clean all
                 make_static_O: make LDFLAGS=-static
                   make_tags_O: make tags
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $

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

* [GIT PULL 00/22] perf/core improvements and fixes
@ 2016-12-13 15:09 Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-12-13 15:09 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexei Starovoitov, Alexis Berlemont,
	Andi Kleen, Daniel Borkmann, David Ahern, Hemant Kumar,
	Jiri Olsa, Joe Stringer, Masami Hiramatsu, Minchan Kim,
	Namhyung Kim, Peter Zijlstra, Wang Nan

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

Hi Ingo,

	Please consider pulling, I had most of this queued before your first
pull req to Linus for 4.10, most are fixes, with 'perf sched timehist --idle'
as a followup new feature to the 'perf sched timehist' command introduced in
this window.

Thanks,

- Arnaldo

Test results at the end of this message, as usual.

The following changes since commit b0c1ef52959582144bbea9a2b37db7f4c9e399f7:

  perf/x86: Fix exclusion of BTS and LBR for Goldmont (2016-12-11 13:06:09 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20161213

for you to fetch changes up to a03f73547fb6e0f7f2942c46cce9b48df50238ba:

  samples/bpf: Drop unnecessary build targets. (2016-12-13 10:38:10 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

New features:

- Introduce 'perf sched timehist --idle', to analyse processes
  going to/from idle state (Namhyung Kim)

- Add scanning of SDT (Software Defined Tracing) probles arguments (Alexis Berlemont)

Fixes:

- Allow 'perf record -u user' to continue when facing races with threads
  going away after having scanned them via /proc (Jiri Olsa)

- Fix 'perf mem' --all-user/--all-kernel options (Jiri Olsa)

Infrastructure:

- Switch over samples/bpf/ to tools/lib/bpf, removing libbpf duplication (Joe Stringer)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Alexis Berlemont (1):
      perf sdt: Add scanning of sdt probles arguments

Arnaldo Carvalho de Melo (1):
      perf tools: Remove some needless __maybe_unused

Jiri Olsa (6):
      perf tools: Move headers check into bash script
      perf mem: Fix --all-user/--all-kernel options
      perf evsel: Use variable instead of repeating lengthy FD macro
      perf thread_map: Add thread_map__remove function
      perf evsel: Allow to ignore missing pid
      perf record: Force ignore_missing_thread for uid option

Joe Stringer (8):
      tools lib bpf: Sync {tools,}/include/uapi/linux/bpf.h
      tools lib bpf: use __u32 from linux/types.h
      tools lib bpf: Add flags to bpf_create_map()
      samples/bpf: Make samples more libbpf-centric
      samples/bpf: Switch over to libbpf
      samples/bpf: Remove perf_event_open() declaration
      samples/bpf: Move open_raw_sock to separate header
      samples/bpf: Drop unnecessary build targets.

Namhyung Kim (6):
      perf sched timehist: Split is_idle_sample()
      perf sched timehist: Introduce struct idle_time_data
      perf sched timehist: Save callchain when entering idle
      perf sched timehist: Skip non-idle events when necessary
      perf sched timehist: Add -I/--idle-hist option
      perf sched timehist: Show callchains for idle stat

 samples/bpf/Makefile                              |  60 ++---
 samples/bpf/README.rst                            |   4 +-
 samples/bpf/bpf_load.c                            |  20 +-
 samples/bpf/fds_example.c                         |  10 +-
 samples/bpf/lathist_user.c                        |   3 +-
 samples/bpf/libbpf.c                              | 155 -------------
 samples/bpf/libbpf.h                              |  25 +--
 samples/bpf/map_perf_test_user.c                  |   1 +
 samples/bpf/offwaketime_user.c                    |  10 +-
 samples/bpf/sampleip_user.c                       |   8 +-
 samples/bpf/sock_example.c                        |  11 +-
 samples/bpf/sock_example.h                        |  35 +++
 samples/bpf/sockex1_user.c                        |   9 +-
 samples/bpf/sockex2_user.c                        |   7 +-
 samples/bpf/sockex3_user.c                        |   7 +-
 samples/bpf/spintest_user.c                       |  10 +-
 samples/bpf/tc_l2_redirect_user.c                 |   4 +-
 samples/bpf/test_cgrp2_array_pin.c                |   4 +-
 samples/bpf/test_current_task_under_cgroup_user.c |  10 +-
 samples/bpf/test_maps.c                           | 142 ++++++------
 samples/bpf/test_overhead_user.c                  |   2 +
 samples/bpf/test_probe_write_user_user.c          |   4 +-
 samples/bpf/test_verifier.c                       |   8 +-
 samples/bpf/trace_event_user.c                    |  24 +-
 samples/bpf/trace_output_user.c                   |   6 +-
 samples/bpf/tracex1_user.c                        |   2 +
 samples/bpf/tracex2_user.c                        |  12 +-
 samples/bpf/tracex3_user.c                        |   6 +-
 samples/bpf/tracex4_user.c                        |   6 +-
 samples/bpf/tracex5_user.c                        |   2 +
 samples/bpf/tracex6_user.c                        |   7 +-
 samples/bpf/xdp1_user.c                           |   4 +-
 tools/include/uapi/linux/bpf.h                    |  51 +++++
 tools/lib/bpf/bpf.c                               |   7 +-
 tools/lib/bpf/bpf.h                               |   6 +-
 tools/lib/bpf/libbpf.c                            |   3 +-
 tools/perf/Documentation/perf-sched.txt           |   4 +
 tools/perf/Makefile.perf                          |  94 +-------
 tools/perf/builtin-c2c.c                          |  13 +-
 tools/perf/builtin-mem.c                          |   4 +-
 tools/perf/builtin-record.c                       |   3 +
 tools/perf/builtin-report.c                       |   2 +-
 tools/perf/builtin-sched.c                        | 261 +++++++++++++++++++---
 tools/perf/builtin-stat.c                         |   6 +-
 tools/perf/check-headers.sh                       |  59 +++++
 tools/perf/perf.h                                 |   1 +
 tools/perf/tests/builtin-test.c                   |   4 +
 tools/perf/tests/tests.h                          |   1 +
 tools/perf/tests/thread-map.c                     |  44 ++++
 tools/perf/util/evsel.c                           |  61 ++++-
 tools/perf/util/evsel.h                           |   1 +
 tools/perf/util/symbol-elf.c                      |  25 ++-
 tools/perf/util/symbol.h                          |   1 +
 tools/perf/util/thread_map.c                      |  22 ++
 tools/perf/util/thread_map.h                      |   1 +
 55 files changed, 786 insertions(+), 506 deletions(-)
 delete mode 100644 samples/bpf/libbpf.c
 create mode 100644 samples/bpf/sock_example.h
 create mode 100755 tools/perf/check-headers.sh

  # uname -a
  Linux jouet 4.9.0-rc8+ #1 SMP Mon Dec 12 11:20:49 BRT 2016 x86_64 x86_64 x86_64 GNU/Linux
  # perf test
   1: vmlinux symtab matches kallsyms            : Ok
   2: Detect openat syscall event                : Ok
   3: Detect openat syscall event on all cpus    : Ok
   4: Read samples using the mmap interface      : Ok
   5: Parse event definition strings             : Ok
   6: PERF_RECORD_* events & perf_sample fields  : Ok
   7: Parse perf pmu format                      : Ok
   8: DSO data read                              : Ok
   9: DSO data cache                             : Ok
  10: DSO data reopen                            : Ok
  11: Roundtrip evsel->name                      : Ok
  12: Parse sched tracepoints fields             : Ok
  13: syscalls:sys_enter_openat event fields     : Ok
  14: Setup struct perf_event_attr               : Ok
  15: Match and link multiple hists              : Ok
  16: 'import perf' in python                    : Ok
  17: Breakpoint overflow signal handler         : Ok
  18: Breakpoint overflow sampling               : Ok
  19: Number of exit events of a simple workload : Ok
  20: Software clock events period values        : Ok
  21: Object code reading                        : Ok
  22: Sample parsing                             : Ok
  23: Use a dummy software event to keep tracking: Ok
  24: Parse with no sample_id_all bit set        : Ok
  25: Filter hist entries                        : Ok
  26: Lookup mmap thread                         : Ok
  27: Share thread mg                            : Ok
  28: Sort output of hist entries                : Ok
  29: Cumulate child hist entries                : Ok
  30: Track with sched_switch                    : Ok
  31: Filter fds with revents mask in a fdarray  : Ok
  32: Add fd to a fdarray, making it autogrow    : Ok
  33: kmod_path__parse                           : Ok
  34: Thread map                                 : Ok
  35: LLVM search and compile                    :
  35.1: Basic BPF llvm compile                    : Ok
  35.2: kbuild searching                          : Ok
  35.3: Compile source for BPF prologue generation: Ok
  35.4: Compile source for BPF relocation         : Ok
  36: Session topology                           : Ok
  37: BPF filter                                 :
  37.1: Basic BPF filtering                      : Ok
  37.2: BPF prologue generation                  : Ok
  37.3: BPF relocation checker                   : Ok
  38: Synthesize thread map                      : Ok
  39: Remove thread map                          : Ok
  40: Synthesize cpu map                         : Ok
  41: Synthesize stat config                     : Ok
  42: Synthesize stat                            : Ok
  43: Synthesize stat round                      : Ok
  44: Synthesize attr update                     : Ok
  45: Event times                                : Ok
  46: Read backward ring buffer                  : Ok
  47: Print cpu map                              : Ok
  48: Probe SDT events                           : Ok
  49: is_printable_array                         : Ok
  50: Print bitmap                               : Ok
  51: perf hooks                                 : Ok
  52: builtin clang support                      : Skip (not compiled in)
  53: x86 rdpmc                                  : Ok
  54: Convert perf time to TSC                   : Ok
  55: DWARF unwind                               : Ok
  56: x86 instruction decoder - new instructions : Ok
  57: Intel cqm nmi context read                 : Skip
  #
  # time dm
     1 alpine:3.4: Ok
     2 android-ndk:r12b-arm: Ok
     3 archlinux:latest: Ok
     4 centos:5: Ok
     5 centos:6: Ok
     6 centos:7: Ok
     7 debian:7: Ok
     8 debian:8: Ok
     9 debian:experimental: Ok
    10 debian:experimental-x-mips64: Ok
    11 fedora:20: Ok
    12 fedora:21: Ok
    13 fedora:22: Ok
    14 fedora:23: Ok
    15 fedora:24: Ok
    16 fedora:24-x-ARC-uClibc: Ok
    17 fedora:25: Ok
    18 fedora:rawhide: Ok
    19 mageia:5: Ok
    20 opensuse:13.2: Ok
    21 opensuse:42.1: Ok
    22 opensuse:tumbleweed: Ok
    23 ubuntu:12.04.5: Ok
    24 ubuntu:14.04.4-x-linaro-arm64: Ok
    25 ubuntu:16.04: Ok
    26 ubuntu:16.04-x-arm: Ok
    27 ubuntu:16.04-x-arm64: Ok
    28 ubuntu:16.04-x-powerpc: Ok
    29 ubuntu:16.04-x-powerpc64: Ok
    30 ubuntu:16.04-x-powerpc64el: Ok
    31 ubuntu:16.04-x-s390: Ok
    32 ubuntu:16.10: Ok
  #
  [acme@felicio linux]$ make -C tools/perf build-test
  make: Entering directory `/home/acme/git/linux/tools/perf'
  - tarpkg: ./tests/perf-targz-src-pkg .
        make_with_babeltrace_O: make LIBBABELTRACE=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                    make_doc_O: make doc
                 make_cscope_O: make cscope
                  make_debug_O: make DEBUG=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
                 make_perf_o_O: make perf.o
            make_install_bin_O: make install-bin
                make_no_newt_O: make NO_NEWT=1
               make_no_slang_O: make NO_SLANG=1
              make_clean_all_O: make clean all
                   make_help_O: make help
           make_no_libbionic_O: make NO_LIBBIONIC=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
            make_no_demangle_O: make NO_DEMANGLE=1
              make_no_libelf_O: make NO_LIBELF=1
                   make_pure_O: make
             make_no_libnuma_O: make NO_LIBNUMA=1
              make_no_libbpf_O: make NO_LIBBPF=1
                make_no_gtk2_O: make NO_GTK2=1
           make_no_libpython_O: make NO_LIBPYTHON=1
             make_no_libperl_O: make NO_LIBPERL=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
                 make_static_O: make LDFLAGS=-static
             make_util_map_o_O: make util/map.o
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
         make_install_prefix_O: make install prefix=/tmp/krava
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                   make_tags_O: make tags
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
                make_install_O: make install
            make_no_auxtrace_O: make NO_AUXTRACE=1
           make_no_backtrace_O: make NO_BACKTRACE=1
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
  OK
  make: Leaving directory `/home/acme/git/linux/tools/perf'
  [acme@felicio linux]$

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

* Re: [GIT PULL 00/22] perf/core improvements and fixes
  2016-10-04  2:36 Arnaldo Carvalho de Melo
@ 2016-10-04  8:07 ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2016-10-04  8:07 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Linux Weekly News, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Colin Ian King, David Ahern,
	Jiri Olsa, linuxppc-dev, Madhavan Srinivasan, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, Ravi Bangoria, Sukadev Bhattiprolu,
	Wang Nan, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Build and test stats at the end of the message.
> 
> The following changes since commit 41aad2a6d4fcdda8d73c9739daf7a9f3f49499d6:
> 
>   Merge tag 'perf-core-for-mingo-20160929' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-09-29 19:09:58 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20161003
> 
> for you to fetch changes up to b42c7369e3f451e22c2b0be5d193955498d37546:
> 
>   perf pmu-events: Add Skylake frontend MSR support (2016-10-03 21:52:01 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Allow vendors to provide JSON files describing PMU events, that then
>   get parsed to generate C tables that are linked against perf, allowing
>   the use of the names in their documentations, such as:
> 
>   # perf list l1d
> 
>   List of pre-defined events (to be used in -e):
> 
>   Cache:
>     l1d.replacement
>          [L1D data line replacements]
>     l1d_pend_miss.fb_full
>          [Cycles a demand request was blocked due to Fill Buffers inavailability]
>     l1d_pend_miss.pending
>          [L1D miss oustandings duration in cycles]
>     l1d_pend_miss.pending_cycles
>          [Cycles with L1D load Misses outstanding]
>     l1d_pend_miss.pending_cycles_any
>          [Cycles with L1D load Misses outstanding from any thread on physical core]
>     l2_trans.l1d_wb
>          [L1D writebacks that access L2 cache]
> 
>   Pipeline:
>     cycle_activity.cycles_l1d_miss
>          [Cycles while L1 cache miss demand load is outstanding]
>     cycle_activity.cycles_l1d_pending
>          [Cycles while L1 cache miss demand load is outstanding]
>     cycle_activity.stalls_l1d_miss
>          [Execution stalls while L1 cache miss demand load is outstanding]
>     cycle_activity.stalls_l1d_pending
>          [Execution stalls while L1 cache miss demand load is outstanding]
> 
>   The above example was done on a Broadwell based ThinkPad t450s after
>   downloading and installing such JSON files which will be added to the
>   tools/perf/pmu-events/ directory in a subsequent patchkit.
> 
>   Now one can use those names with -e/--event in all 'perf tools'.
>   (Andi Kleen, Sukadev Bhattiprolu)
> 
> - Add a missing pointer dereference in 'perf probe' (Colin Ian King)
> 
> - Add support for building host programs to be used in generating files
>   to be used in the build process, such as fixdep and jevents, fixing
>   the usage of these features in a cross compilation setup (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (12):
>       perf tools: Add jsmn `jasmine' JSON parser
>       perf jevents: Program to convert JSON file
>       perf tools: Support CPU id matching for x86 v2
>       perf jevents: Handle header line in mapfile
>       perf pmu: Support alias descriptions
>       perf tools: Query terminal width and use in perf list
>       perf list: Add a --no-desc flag
>       perf pmu: Add override support for event list CPUID
>       perf list jevents: Add support for event list topics
>       perf tools: Make alias matching case-insensitive
>       perf pmu-events: Fix fixed counters on Intel
>       perf pmu-events: Add Skylake frontend MSR support
> 
> Arnaldo Carvalho de Melo (1):
>       perf tools: Experiment with cppcheck
> 
> Colin Ian King (1):
>       perf probe: Check if *ptr2 is zero and not ptr2
> 
> Jiri Olsa (2):
>       tools build: Add support for host programs format
>       tools build: Make fixdep a hostprog
> 
> Sukadev Bhattiprolu (6):
>       perf pmu: Use pmu_events table to create aliases
>       perf powerpc: Support CPU ID matching for Powerpc
>       perf jevents: Add support for long descriptions
>       perf list: Support long jevents descriptions
>       perf tools: Add README for info on parsing JSON/map files
>       perf tools: Allow period= in perf stat CPU event descriptions.
> 
>  tools/build/Build                      |   2 +
>  tools/build/Build.include              |   5 +
>  tools/build/Makefile                   |   8 +-
>  tools/build/Makefile.build             |  19 +-
>  tools/build/Makefile.include           |   4 -
>  tools/lib/subcmd/pager.c               |  16 +
>  tools/lib/subcmd/pager.h               |   1 +
>  tools/perf/Documentation/perf-list.txt |  12 +-
>  tools/perf/Makefile.perf               |  34 +-
>  tools/perf/arch/powerpc/util/header.c  |  11 +
>  tools/perf/arch/x86/util/header.c      |  24 +-
>  tools/perf/builtin-list.c              |  20 +-
>  tools/perf/pmu-events/Build            |  13 +
>  tools/perf/pmu-events/README           | 147 ++++++
>  tools/perf/pmu-events/jevents.c        | 812 +++++++++++++++++++++++++++++++++
>  tools/perf/pmu-events/jevents.h        |  18 +
>  tools/perf/pmu-events/jsmn.c           | 313 +++++++++++++
>  tools/perf/pmu-events/jsmn.h           |  67 +++
>  tools/perf/pmu-events/json.c           | 162 +++++++
>  tools/perf/pmu-events/json.h           |  38 ++
>  tools/perf/pmu-events/pmu-events.h     |  37 ++
>  tools/perf/util/evlist.c               |  12 +-
>  tools/perf/util/evsel.c                |   3 +-
>  tools/perf/util/header.h               |   1 +
>  tools/perf/util/machine.c              |   6 +-
>  tools/perf/util/parse-events.c         |   8 +-
>  tools/perf/util/parse-events.h         |   3 +-
>  tools/perf/util/pmu.c                  | 176 ++++++-
>  tools/perf/util/pmu.h                  |   6 +-
>  tools/perf/util/probe-event.c          |   2 +-
>  tools/perf/util/strbuf.h               |   3 +-
>  tools/perf/util/thread.c               |   9 +-
>  32 files changed, 1926 insertions(+), 66 deletions(-)
>  create mode 100644 tools/perf/pmu-events/Build
>  create mode 100644 tools/perf/pmu-events/README
>  create mode 100644 tools/perf/pmu-events/jevents.c
>  create mode 100644 tools/perf/pmu-events/jevents.h
>  create mode 100644 tools/perf/pmu-events/jsmn.c
>  create mode 100644 tools/perf/pmu-events/jsmn.h
>  create mode 100644 tools/perf/pmu-events/json.c
>  create mode 100644 tools/perf/pmu-events/json.h
>  create mode 100644 tools/perf/pmu-events/pmu-events.h
> 
>   # time dm
>    1 alpine:3.4: Ok
>    2 android-ndk:r12b-arm: Ok
>    3 archlinux:latest: Ok
>    4 centos:5: Ok
>    5 centos:6: Ok
>    6 centos:7: Ok
>    7 debian:7: Ok
>    8 debian:8: Ok
>    9 debian:experimental: Ok
>   10 fedora:20: Ok
>   11 fedora:21: Ok
>   12 fedora:22: Ok
>   13 fedora:23: Ok
>   14 fedora:24: Ok
>   15 fedora:24-x-ARC-uClibc: Ok
>   16 fedora:rawhide: Ok
>   17 mageia:5: Ok
>   18 opensuse:13.2: Ok
>   19 opensuse:42.1: Ok
>   20 opensuse:tumbleweed: Ok
>   21 ubuntu:12.04.5: Ok
>   22 ubuntu:14.04: Ok
>   23 ubuntu:14.04.4: Ok
>   24 ubuntu:15.10: Ok
>   25 ubuntu:16.04: Ok
>   26 ubuntu:16.04-x-arm: Ok
>   27 ubuntu:16.04-x-arm64: Ok
>   28 ubuntu:16.04-x-powerpc: Ok
>   29 ubuntu:16.04-x-powerpc64: Ok
>   30 ubuntu:16.04-x-powerpc64el: Ok
>   31 ubuntu:16.04-x-s390: Ok
>   32 ubuntu:16.10: Ok
> 
>   real	33m23.855s
>   user	0m2.128s
>   sys	0m2.305s
>   #
> 
>   # perf test
>    1: vmlinux symtab matches kallsyms                          : Ok
>    2: detect openat syscall event                              : Ok
>    3: detect openat syscall event on all cpus                  : Ok
>    4: read samples using the mmap interface                    : Ok
>    5: parse events tests                                       : Ok
>    6: Validate PERF_RECORD_* events & perf_sample fields       : Ok
>    7: Test perf pmu format parsing                             : Ok
>    8: Test dso data read                                       : Ok
>    9: Test dso data cache                                      : Ok
>   10: Test dso data reopen                                     : Ok
>   11: roundtrip evsel->name check                              : Ok
>   12: Check parsing of sched tracepoints fields                : Ok
>   13: Generate and check syscalls:sys_enter_openat event fields: Ok
>   14: struct perf_event_attr setup                             : Ok
>   15: Test matching and linking multiple hists                 : Ok
>   16: Try 'import perf' in python, checking link problems      : Ok
>   17: Test breakpoint overflow signal handler                  : Ok
>   18: Test breakpoint overflow sampling                        : Ok
>   19: Test number of exit event of a simple workload           : Ok
>   20: Test software clock events have valid period values      : Ok
>   21: Test object code reading                                 : Ok
>   22: Test sample parsing                                      : Ok
>   23: Test using a dummy software event to keep tracking       : Ok
>   24: Test parsing with no sample_id_all bit set               : Ok
>   25: Test filtering hist entries                              : Ok
>   26: Test mmap thread lookup                                  : Ok
>   27: Test thread mg sharing                                   : Ok
>   28: Test output sorting of hist entries                      : Ok
>   29: Test cumulation of child hist entries                    : Ok
>   30: Test tracking with sched_switch                          : Ok
>   31: Filter fds with revents mask in a fdarray                : Ok
>   32: Add fd to a fdarray, making it autogrow                  : Ok
>   33: Test kmod_path__parse function                           : Ok
>   34: Test thread map                                          : Ok
>   35: Test LLVM searching and compiling                        :
>   35.1: Basic BPF llvm compiling test                          : Ok
>   35.2: Test kbuild searching                                  : Ok
>   35.3: Compile source for BPF prologue generation test        : Ok
>   35.4: Compile source for BPF relocation test                 : Ok
>   36: Test topology in session                                 : Ok
>   37: Test BPF filter                                          :
>   37.1: Test basic BPF filtering                               : Ok
>   37.2: Test BPF prologue generation                           : Ok
>   37.3: Test BPF relocation checker                            : Ok
>   38: Test thread map synthesize                               : Ok
>   39: Test cpu map synthesize                                  : Ok
>   40: Test stat config synthesize                              : Ok
>   41: Test stat synthesize                                     : Ok
>   42: Test stat round synthesize                               : Ok
>   43: Test attr update synthesize                              : Ok
>   44: Test events times                                        : Ok
>   45: Test backward reading from ring buffer                   : Ok
>   46: Test cpu map print                                       : Ok
>   47: Test SDT event probing                                   : Ok
>   48: Test is_printable_array function                         : Ok
>   49: Test bitmap print                                        : Ok
>   50: x86 rdpmc test                                           : Ok
>   51: Test converting perf time to TSC                         : Ok
>   52: Test dwarf unwind                                        : Ok
>   53: Test x86 instruction decoder - new instructions          : Ok
>   54: Test intel cqm nmi context read                          : Skip
>   # 
> 
>   $ make -C tools/perf build-test
>   make: Entering directory '/home/acme/git/linux/tools/perf'
>                       - tarpkg: ./tests/perf-targz-src-pkg .
>              make_no_libperl_O: make NO_LIBPERL=1
>                 make_no_newt_O: make NO_NEWT=1
>                make_no_slang_O: make NO_SLANG=1
>              make_no_libnuma_O: make NO_LIBNUMA=1
>         make_with_babeltrace_O: make LIBBABELTRACE=1
>    make_install_prefix_slash_O: make install prefix=/tmp/krava/
>               make_no_libbpf_O: make NO_LIBBPF=1
>             make_no_demangle_O: make NO_DEMANGLE=1
>             make_install_bin_O: make install-bin
>                 make_install_O: make install
>            make_no_libbionic_O: make NO_LIBBIONIC=1
>            make_no_libunwind_O: make NO_LIBUNWIND=1
>             make_no_libaudit_O: make NO_LIBAUDIT=1
>            make_no_libpython_O: make NO_LIBPYTHON=1
>                    make_tags_O: make tags
>                  make_perf_o_O: make perf.o
>                  make_static_O: make LDFLAGS=-static
>               make_clean_all_O: make clean all
>          make_install_prefix_O: make install prefix=/tmp/krava
>                    make_help_O: make help
>              make_util_map_o_O: make util/map.o
>                   make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
>   make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
>                 make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1
>            make_no_backtrace_O: make NO_BACKTRACE=1
>                   make_debug_O: make DEBUG=1
>               make_no_libelf_O: make NO_LIBELF=1
>              make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
>             make_no_auxtrace_O: make NO_AUXTRACE=1
>                     make_doc_O: make doc
>        make_util_pmu_bison_o_O: make util/pmu-bison.o
>                 make_no_gtk2_O: make NO_GTK2=1
>   OK

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/22] perf/core improvements and fixes
@ 2016-10-04  2:36 Arnaldo Carvalho de Melo
  2016-10-04  8:07 ` Ingo Molnar
  0 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-10-04  2:36 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Linux Weekly News, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Andi Kleen, Colin Ian King,
	David Ahern, Jiri Olsa, linuxppc-dev, Madhavan Srinivasan,
	Masami Hiramatsu, Namhyung Kim, Peter Zijlstra, Ravi Bangoria,
	Sukadev Bhattiprolu, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

Build and test stats at the end of the message.

The following changes since commit 41aad2a6d4fcdda8d73c9739daf7a9f3f49499d6:

  Merge tag 'perf-core-for-mingo-20160929' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-09-29 19:09:58 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20161003

for you to fetch changes up to b42c7369e3f451e22c2b0be5d193955498d37546:

  perf pmu-events: Add Skylake frontend MSR support (2016-10-03 21:52:01 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

- Allow vendors to provide JSON files describing PMU events, that then
  get parsed to generate C tables that are linked against perf, allowing
  the use of the names in their documentations, such as:

  # perf list l1d

  List of pre-defined events (to be used in -e):

  Cache:
    l1d.replacement
         [L1D data line replacements]
    l1d_pend_miss.fb_full
         [Cycles a demand request was blocked due to Fill Buffers inavailability]
    l1d_pend_miss.pending
         [L1D miss oustandings duration in cycles]
    l1d_pend_miss.pending_cycles
         [Cycles with L1D load Misses outstanding]
    l1d_pend_miss.pending_cycles_any
         [Cycles with L1D load Misses outstanding from any thread on physical core]
    l2_trans.l1d_wb
         [L1D writebacks that access L2 cache]

  Pipeline:
    cycle_activity.cycles_l1d_miss
         [Cycles while L1 cache miss demand load is outstanding]
    cycle_activity.cycles_l1d_pending
         [Cycles while L1 cache miss demand load is outstanding]
    cycle_activity.stalls_l1d_miss
         [Execution stalls while L1 cache miss demand load is outstanding]
    cycle_activity.stalls_l1d_pending
         [Execution stalls while L1 cache miss demand load is outstanding]

  The above example was done on a Broadwell based ThinkPad t450s after
  downloading and installing such JSON files which will be added to the
  tools/perf/pmu-events/ directory in a subsequent patchkit.

  Now one can use those names with -e/--event in all 'perf tools'.
  (Andi Kleen, Sukadev Bhattiprolu)

- Add a missing pointer dereference in 'perf probe' (Colin Ian King)

- Add support for building host programs to be used in generating files
  to be used in the build process, such as fixdep and jevents, fixing
  the usage of these features in a cross compilation setup (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (12):
      perf tools: Add jsmn `jasmine' JSON parser
      perf jevents: Program to convert JSON file
      perf tools: Support CPU id matching for x86 v2
      perf jevents: Handle header line in mapfile
      perf pmu: Support alias descriptions
      perf tools: Query terminal width and use in perf list
      perf list: Add a --no-desc flag
      perf pmu: Add override support for event list CPUID
      perf list jevents: Add support for event list topics
      perf tools: Make alias matching case-insensitive
      perf pmu-events: Fix fixed counters on Intel
      perf pmu-events: Add Skylake frontend MSR support

Arnaldo Carvalho de Melo (1):
      perf tools: Experiment with cppcheck

Colin Ian King (1):
      perf probe: Check if *ptr2 is zero and not ptr2

Jiri Olsa (2):
      tools build: Add support for host programs format
      tools build: Make fixdep a hostprog

Sukadev Bhattiprolu (6):
      perf pmu: Use pmu_events table to create aliases
      perf powerpc: Support CPU ID matching for Powerpc
      perf jevents: Add support for long descriptions
      perf list: Support long jevents descriptions
      perf tools: Add README for info on parsing JSON/map files
      perf tools: Allow period= in perf stat CPU event descriptions.

 tools/build/Build                      |   2 +
 tools/build/Build.include              |   5 +
 tools/build/Makefile                   |   8 +-
 tools/build/Makefile.build             |  19 +-
 tools/build/Makefile.include           |   4 -
 tools/lib/subcmd/pager.c               |  16 +
 tools/lib/subcmd/pager.h               |   1 +
 tools/perf/Documentation/perf-list.txt |  12 +-
 tools/perf/Makefile.perf               |  34 +-
 tools/perf/arch/powerpc/util/header.c  |  11 +
 tools/perf/arch/x86/util/header.c      |  24 +-
 tools/perf/builtin-list.c              |  20 +-
 tools/perf/pmu-events/Build            |  13 +
 tools/perf/pmu-events/README           | 147 ++++++
 tools/perf/pmu-events/jevents.c        | 812 +++++++++++++++++++++++++++++++++
 tools/perf/pmu-events/jevents.h        |  18 +
 tools/perf/pmu-events/jsmn.c           | 313 +++++++++++++
 tools/perf/pmu-events/jsmn.h           |  67 +++
 tools/perf/pmu-events/json.c           | 162 +++++++
 tools/perf/pmu-events/json.h           |  38 ++
 tools/perf/pmu-events/pmu-events.h     |  37 ++
 tools/perf/util/evlist.c               |  12 +-
 tools/perf/util/evsel.c                |   3 +-
 tools/perf/util/header.h               |   1 +
 tools/perf/util/machine.c              |   6 +-
 tools/perf/util/parse-events.c         |   8 +-
 tools/perf/util/parse-events.h         |   3 +-
 tools/perf/util/pmu.c                  | 176 ++++++-
 tools/perf/util/pmu.h                  |   6 +-
 tools/perf/util/probe-event.c          |   2 +-
 tools/perf/util/strbuf.h               |   3 +-
 tools/perf/util/thread.c               |   9 +-
 32 files changed, 1926 insertions(+), 66 deletions(-)
 create mode 100644 tools/perf/pmu-events/Build
 create mode 100644 tools/perf/pmu-events/README
 create mode 100644 tools/perf/pmu-events/jevents.c
 create mode 100644 tools/perf/pmu-events/jevents.h
 create mode 100644 tools/perf/pmu-events/jsmn.c
 create mode 100644 tools/perf/pmu-events/jsmn.h
 create mode 100644 tools/perf/pmu-events/json.c
 create mode 100644 tools/perf/pmu-events/json.h
 create mode 100644 tools/perf/pmu-events/pmu-events.h

  # time dm
   1 alpine:3.4: Ok
   2 android-ndk:r12b-arm: Ok
   3 archlinux:latest: Ok
   4 centos:5: Ok
   5 centos:6: Ok
   6 centos:7: Ok
   7 debian:7: Ok
   8 debian:8: Ok
   9 debian:experimental: Ok
  10 fedora:20: Ok
  11 fedora:21: Ok
  12 fedora:22: Ok
  13 fedora:23: Ok
  14 fedora:24: Ok
  15 fedora:24-x-ARC-uClibc: Ok
  16 fedora:rawhide: Ok
  17 mageia:5: Ok
  18 opensuse:13.2: Ok
  19 opensuse:42.1: Ok
  20 opensuse:tumbleweed: Ok
  21 ubuntu:12.04.5: Ok
  22 ubuntu:14.04: Ok
  23 ubuntu:14.04.4: Ok
  24 ubuntu:15.10: Ok
  25 ubuntu:16.04: Ok
  26 ubuntu:16.04-x-arm: Ok
  27 ubuntu:16.04-x-arm64: Ok
  28 ubuntu:16.04-x-powerpc: Ok
  29 ubuntu:16.04-x-powerpc64: Ok
  30 ubuntu:16.04-x-powerpc64el: Ok
  31 ubuntu:16.04-x-s390: Ok
  32 ubuntu:16.10: Ok

  real	33m23.855s
  user	0m2.128s
  sys	0m2.305s
  #

  # perf test
   1: vmlinux symtab matches kallsyms                          : Ok
   2: detect openat syscall event                              : Ok
   3: detect openat syscall event on all cpus                  : Ok
   4: read samples using the mmap interface                    : Ok
   5: parse events tests                                       : Ok
   6: Validate PERF_RECORD_* events & perf_sample fields       : Ok
   7: Test perf pmu format parsing                             : Ok
   8: Test dso data read                                       : Ok
   9: Test dso data cache                                      : Ok
  10: Test dso data reopen                                     : Ok
  11: roundtrip evsel->name check                              : Ok
  12: Check parsing of sched tracepoints fields                : Ok
  13: Generate and check syscalls:sys_enter_openat event fields: Ok
  14: struct perf_event_attr setup                             : Ok
  15: Test matching and linking multiple hists                 : Ok
  16: Try 'import perf' in python, checking link problems      : Ok
  17: Test breakpoint overflow signal handler                  : Ok
  18: Test breakpoint overflow sampling                        : Ok
  19: Test number of exit event of a simple workload           : Ok
  20: Test software clock events have valid period values      : Ok
  21: Test object code reading                                 : Ok
  22: Test sample parsing                                      : Ok
  23: Test using a dummy software event to keep tracking       : Ok
  24: Test parsing with no sample_id_all bit set               : Ok
  25: Test filtering hist entries                              : Ok
  26: Test mmap thread lookup                                  : Ok
  27: Test thread mg sharing                                   : Ok
  28: Test output sorting of hist entries                      : Ok
  29: Test cumulation of child hist entries                    : Ok
  30: Test tracking with sched_switch                          : Ok
  31: Filter fds with revents mask in a fdarray                : Ok
  32: Add fd to a fdarray, making it autogrow                  : Ok
  33: Test kmod_path__parse function                           : Ok
  34: Test thread map                                          : Ok
  35: Test LLVM searching and compiling                        :
  35.1: Basic BPF llvm compiling test                          : Ok
  35.2: Test kbuild searching                                  : Ok
  35.3: Compile source for BPF prologue generation test        : Ok
  35.4: Compile source for BPF relocation test                 : Ok
  36: Test topology in session                                 : Ok
  37: Test BPF filter                                          :
  37.1: Test basic BPF filtering                               : Ok
  37.2: Test BPF prologue generation                           : Ok
  37.3: Test BPF relocation checker                            : Ok
  38: Test thread map synthesize                               : Ok
  39: Test cpu map synthesize                                  : Ok
  40: Test stat config synthesize                              : Ok
  41: Test stat synthesize                                     : Ok
  42: Test stat round synthesize                               : Ok
  43: Test attr update synthesize                              : Ok
  44: Test events times                                        : Ok
  45: Test backward reading from ring buffer                   : Ok
  46: Test cpu map print                                       : Ok
  47: Test SDT event probing                                   : Ok
  48: Test is_printable_array function                         : Ok
  49: Test bitmap print                                        : Ok
  50: x86 rdpmc test                                           : Ok
  51: Test converting perf time to TSC                         : Ok
  52: Test dwarf unwind                                        : Ok
  53: Test x86 instruction decoder - new instructions          : Ok
  54: Test intel cqm nmi context read                          : Skip
  # 

  $ make -C tools/perf build-test
  make: Entering directory '/home/acme/git/linux/tools/perf'
                      - tarpkg: ./tests/perf-targz-src-pkg .
             make_no_libperl_O: make NO_LIBPERL=1
                make_no_newt_O: make NO_NEWT=1
               make_no_slang_O: make NO_SLANG=1
             make_no_libnuma_O: make NO_LIBNUMA=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
              make_no_libbpf_O: make NO_LIBBPF=1
            make_no_demangle_O: make NO_DEMANGLE=1
            make_install_bin_O: make install-bin
                make_install_O: make install
           make_no_libbionic_O: make NO_LIBBIONIC=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
           make_no_libpython_O: make NO_LIBPYTHON=1
                   make_tags_O: make tags
                 make_perf_o_O: make perf.o
                 make_static_O: make LDFLAGS=-static
              make_clean_all_O: make clean all
         make_install_prefix_O: make install prefix=/tmp/krava
                   make_help_O: make help
             make_util_map_o_O: make util/map.o
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
                make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1
           make_no_backtrace_O: make NO_BACKTRACE=1
                  make_debug_O: make DEBUG=1
              make_no_libelf_O: make NO_LIBELF=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
                    make_doc_O: make doc
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                make_no_gtk2_O: make NO_GTK2=1
  OK

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

* Re: [GIT PULL 00/22] perf/core improvements and fixes
  2016-09-20 20:03 Arnaldo Carvalho de Melo
@ 2016-09-20 21:34 ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2016-09-20 21:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Andi Kleen,
	Chris Riyder, David Ahern, Don Zickus, Hemant Kumar, Jiri Olsa,
	Joe Mario, Kim Phillips, Markus Trippelsdorf, Masami Hiramatsu,
	Mathieu Poirier, Michael Ellerman, Milian Wolff, Namhyung Kim,
	Naveen N . Rao, Pawel Moll, Peter Zijlstra, pi3orama,
	Ravi Bangoria, Russell King, Taeung Song, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit cd34cd97b7b4336aa2c623c37daffab264c7c6ce:
> 
>   perf/x86/intel/uncore: Add Skylake server uncore support (2016-09-10 11:18:52 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160920
> 
> for you to fetch changes up to 3c028a0cb5b71f47d523bc8ad2c597cb257f41fb:
> 
>   perf symbols: Do not open device files (2016-09-20 16:20:21 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Support event group view with hierarchy mode in 'perf top' and 'perf report'
>   (Namhyung Kim)
> 
>   e.g.:
> 
>   $ perf record -e '{cycles,instructions}' make
>   $ perf report --hierarchy --stdio
>   ...
>   #               Overhead  Command / Shared Object / Symbol
>   # ......................  ..................................
>   ...
>       25.74%  27.18%        sh
>          19.96%  24.14%        libc-2.24.so
>             9.55%  14.64%        [.] __strcmp_sse2
>             1.54%   0.00%        [.] __tfind
>             1.07%   1.13%        [.] _int_malloc
>             0.95%   0.00%        [.] __strchr_sse2
>             0.89%   1.39%        [.] __tsearch
>             0.76%   0.00%        [.] strlen
> 
> - Fix the dwarf regs table for x86_64, adding a missing % to the "%di"
>   register, noticed with a failing 'perf test bpf' (Arnaldo Carvalho de Melo)
> 
> - Fix handling of mmap parameters in the 'perf trace' beautifier in
>   architectures that don't have the same mappings as x86_64 (Wang Nan)
> 
> - Handle hugetbl mappings in older systems running new kernels (Wang Nan)
> 
> - Resolve 'call' operands in 'annotate', that when using /proc/kcore
>   were appearing just as hexadecimal addresses, to function names
>   (Arnaldo Carvalho de Melo)
> 
> - Fix width computation for srcline sort entry (Jiri Olsa)
> 
> - Do not ignore call instruction with indirect target in 'annotate'
>   (Ravi Bangoria)
> 
> - Handle MADV_FREE in the madvise 'trace' beautifier (Wang Nan)
> 
> - Fix build of 'perf trace' mman beautifier in !x86_64 (Wang Nan)
> 
> Infrastructure:
> 
> - Add infrastructure for PMU specific configuration, allowing to pass
>   config variables directly to the kernel PMU driver, prefixing those
>   variables with a '@', part of a larger series to support Coresight (Mathieu Poirier)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Build stats at the end of this message.
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (5):
>       perf probe: Fix dwarf regs table for x86_64
>       perf trace beauty mmap: Fix defines for non !x86_64
>       perf tools: Do hugetlb handling in more systems
>       perf annotate: Pass the symbol's map/dso to the instruction parsers
>       perf annotate: Resolve 'call' operands to function names
> 
> Jiri Olsa (2):
>       perf hists: Fix width computation for srcline sort entry
>       perf symbols: Do not open device files
> 
> Mathieu Poirier (1):
>       perf tools: Add infrastructure for PMU specific configuration
> 
> Namhyung Kim (9):
>       perf hists browser: Fix event group display
>       perf hists: Introduce hists__match_hierarchy()
>       perf hists: Introduce hists__link_hierarchy()
>       perf hist: Initialize hierarchy tree explicitly
>       perf ui/stdio: Always reset output width for hierarchy
>       perf ui/stdio: Rename print_hierarchy_header()
>       perf report: Enable group view with hierarchy
>       perf ui/tui: Reset output width for hierarchy
>       perf hists: Factor out hists__reset_column_width()
> 
> Ravi Bangoria (1):
>       perf annotate: Do not ignore call instruction with indirect target
> 
> Wang Nan (4):
>       tools include: Add uapi mman.h for each architecture
>       perf build: Compare mman.h related headers against kernel originals
>       perf trace beauty mmap: Add missing MADV_FREE
>       tools include: Add mman macros needed by perf for all arch
> 
>  tools/arch/alpha/include/uapi/asm/mman.h       |  47 ++++++++
>  tools/arch/arc/include/uapi/asm/mman.h         |   6 +
>  tools/arch/arm/include/uapi/asm/mman.h         |   6 +
>  tools/arch/arm64/include/uapi/asm/mman.h       |   6 +
>  tools/arch/frv/include/uapi/asm/mman.h         |   6 +
>  tools/arch/h8300/include/uapi/asm/mman.h       |   6 +
>  tools/arch/hexagon/include/uapi/asm/mman.h     |   6 +
>  tools/arch/ia64/include/uapi/asm/mman.h        |   6 +
>  tools/arch/m32r/include/uapi/asm/mman.h        |   6 +
>  tools/arch/microblaze/include/uapi/asm/mman.h  |   6 +
>  tools/arch/mips/include/uapi/asm/mman.h        |  46 ++++++++
>  tools/arch/mn10300/include/uapi/asm/mman.h     |   6 +
>  tools/arch/parisc/include/uapi/asm/mman.h      |  47 ++++++++
>  tools/arch/powerpc/include/uapi/asm/mman.h     |  15 +++
>  tools/arch/s390/include/uapi/asm/mman.h        |   6 +
>  tools/arch/score/include/uapi/asm/mman.h       |   6 +
>  tools/arch/sh/include/uapi/asm/mman.h          |   6 +
>  tools/arch/sparc/include/uapi/asm/mman.h       |  15 +++
>  tools/arch/tile/include/uapi/asm/mman.h        |  15 +++
>  tools/arch/x86/include/uapi/asm/mman.h         |   5 +
>  tools/arch/xtensa/include/uapi/asm/mman.h      |  47 ++++++++
>  tools/include/uapi/asm-generic/mman-common.h   |  75 ++++++++++++
>  tools/include/uapi/asm-generic/mman.h          |  22 ++++
>  tools/include/uapi/linux/mman.h                |  13 +++
>  tools/perf/Documentation/perf-record.txt       |  12 ++
>  tools/perf/MANIFEST                            |   4 +
>  tools/perf/Makefile.perf                       |   9 ++
>  tools/perf/arch/x86/include/dwarf-regs-table.h |   2 +-
>  tools/perf/builtin-report.c                    |   1 -
>  tools/perf/trace/beauty/mmap.c                 |  72 +-----------
>  tools/perf/ui/browsers/hists.c                 |   7 +-
>  tools/perf/ui/hist.c                           |  15 +++
>  tools/perf/ui/stdio/hist.c                     |  25 +---
>  tools/perf/util/annotate.c                     |  37 +++---
>  tools/perf/util/annotate.h                     |   2 +-
>  tools/perf/util/dso.c                          |   3 +
>  tools/perf/util/event.c                        |   7 +-
>  tools/perf/util/evsel.h                        |   2 +
>  tools/perf/util/hist.c                         | 154 ++++++++++++++++++++++++-
>  tools/perf/util/hist.h                         |   1 +
>  tools/perf/util/map.c                          |   9 +-
>  tools/perf/util/parse-events.c                 |   7 +-
>  tools/perf/util/parse-events.h                 |   1 +
>  tools/perf/util/parse-events.l                 |  22 ++++
>  tools/perf/util/parse-events.y                 |  11 ++
>  tools/perf/util/sort.h                         |   1 +
>  46 files changed, 698 insertions(+), 131 deletions(-)
>  create mode 100644 tools/arch/alpha/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/arc/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/arm/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/arm64/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/frv/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/h8300/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/hexagon/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/ia64/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/m32r/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/microblaze/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/mips/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/mn10300/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/parisc/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/powerpc/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/s390/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/score/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/sh/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/sparc/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/tile/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/x86/include/uapi/asm/mman.h
>  create mode 100644 tools/arch/xtensa/include/uapi/asm/mman.h
>  create mode 100644 tools/include/uapi/asm-generic/mman-common.h
>  create mode 100644 tools/include/uapi/asm-generic/mman.h
>  create mode 100644 tools/include/uapi/linux/mman.h
> 
>   [root@jouet ~]# perf test
>    1: vmlinux symtab matches kallsyms                          : Ok
>    2: detect openat syscall event                              : Ok
>    3: detect openat syscall event on all cpus                  : Ok
>    4: read samples using the mmap interface                    : Ok
>    5: parse events tests                                       : Ok
>    6: Validate PERF_RECORD_* events & perf_sample fields       : Ok
>    7: Test perf pmu format parsing                             : Ok
>    8: Test dso data read                                       : Ok
>    9: Test dso data cache                                      : Ok
>   10: Test dso data reopen                                     : Ok
>   11: roundtrip evsel->name check                              : Ok
>   12: Check parsing of sched tracepoints fields                : Ok
>   13: Generate and check syscalls:sys_enter_openat event fields: Ok
>   14: struct perf_event_attr setup                             : Ok
>   15: Test matching and linking multiple hists                 : Ok
>   16: Try 'import perf' in python, checking link problems      : Ok
>   17: Test breakpoint overflow signal handler                  : Ok
>   18: Test breakpoint overflow sampling                        : Ok
>   19: Test number of exit event of a simple workload           : Ok
>   20: Test software clock events have valid period values      : Ok
>   21: Test object code reading                                 : Ok
>   22: Test sample parsing                                      : Ok
>   23: Test using a dummy software event to keep tracking       : Ok
>   24: Test parsing with no sample_id_all bit set               : Ok
>   25: Test filtering hist entries                              : Ok
>   26: Test mmap thread lookup                                  : Ok
>   27: Test thread mg sharing                                   : Ok
>   28: Test output sorting of hist entries                      : Ok
>   29: Test cumulation of child hist entries                    : Ok
>   30: Test tracking with sched_switch                          : Ok
>   31: Filter fds with revents mask in a fdarray                : Ok
>   32: Add fd to a fdarray, making it autogrow                  : Ok
>   33: Test kmod_path__parse function                           : Ok
>   34: Test thread map                                          : Ok
>   35: Test LLVM searching and compiling                        :
>   35.1: Basic BPF llvm compiling test                          : Ok
>   35.2: Test kbuild searching                                  : Ok
>   35.3: Compile source for BPF prologue generation test        : Ok
>   35.4: Compile source for BPF relocation test                 : Ok
>   36: Test topology in session                                 : Ok
>   37: Test BPF filter                                          :
>   37.1: Test basic BPF filtering                               : Ok
>   37.2: Test BPF prologue generation                           : Ok
>   37.3: Test BPF relocation checker                            : Ok
>   38: Test thread map synthesize                               : Ok
>   39: Test cpu map synthesize                                  : Ok
>   40: Test stat config synthesize                              : Ok
>   41: Test stat synthesize                                     : Ok
>   42: Test stat round synthesize                               : Ok
>   43: Test attr update synthesize                              : Ok
>   44: Test events times                                        : Ok
>   45: Test backward reading from ring buffer                   : Ok
>   46: Test cpu map print                                       : Ok
>   47: Test SDT event probing                                   : Ok
>   48: Test is_printable_array function                         : Ok
>   49: Test bitmap print                                        : Ok
>   50: x86 rdpmc test                                           : Ok
>   51: Test converting perf time to TSC                         : Ok
>   52: Test dwarf unwind                                        : Ok
>   53: Test x86 instruction decoder - new instructions          : Ok
>   54: Test intel cqm nmi context read                          : Skip
>   [root@jouet ~]# 
> 
> Build stats:
> 
>   # time dm
>    1 74.534 alpine:3.4: Ok
>    2 25.636 android-ndk:r12b-arm: Ok
>    3 78.066 archlinux:latest: Ok
>    4 41.189 centos:5: Ok
>    5 64.550 centos:6: Ok
>    6 74.689 centos:7: Ok
>    7 68.580 debian:7: Ok
>    8 75.115 debian:8: Ok
>    9 75.288 fedora:20: Ok
>   10 79.294 fedora:21: Ok
>   11 76.839 fedora:22: Ok
>   12 76.695 fedora:23: Ok
>   13 82.058 fedora:24: Ok
>   14 31.649 fedora:24-x-ARC-uClibc: Ok
>   15 85.826 fedora:rawhide: Ok
>   16 83.272 mageia:5: Ok
>   17 76.883 opensuse:13.2: Ok
>   18 78.530 opensuse:42.1: Ok
>   19 85.315 opensuse:tumbleweed: Ok
>   20 63.436 ubuntu:12.04.5: Ok
>   21 40.909 ubuntu:14.04: Ok
>   22 72.689 ubuntu:14.04.4: Ok
>   23 76.374 ubuntu:15.10: Ok
>   24 70.309 ubuntu:16.04: Ok
>   25 59.159 ubuntu:16.04-x-arm: Ok
>   26 56.011 ubuntu:16.04-x-arm64: Ok
>   27 56.913 ubuntu:16.04-x-powerpc64: Ok
>   28 57.442 ubuntu:16.04-x-powerpc64el: Ok
>   29 80.282 ubuntu:16.10: Ok
>   30 60.964 ubuntu:16.10-x-arm64: Ok
>   31 61.390 ubuntu:16.10-x-powerpc: Ok
>   32 63.167 ubuntu:16.10-x-s390: Ok
> 
>   real	35m54.027s
>   user	0m2.855s
>   sys	0m2.652s

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/22] perf/core improvements and fixes
@ 2016-09-20 20:03 Arnaldo Carvalho de Melo
  2016-09-20 21:34 ` Ingo Molnar
  0 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-09-20 20:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Chris Riyder, David Ahern,
	Don Zickus, Hemant Kumar, Jiri Olsa, Joe Mario, Kim Phillips,
	Markus Trippelsdorf, Masami Hiramatsu, Mathieu Poirier,
	Michael Ellerman, Milian Wolff, Namhyung Kim, Naveen N . Rao,
	Pawel Moll, Peter Zijlstra, pi3orama, Ravi Bangoria,
	Russell King, Taeung Song, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit cd34cd97b7b4336aa2c623c37daffab264c7c6ce:

  perf/x86/intel/uncore: Add Skylake server uncore support (2016-09-10 11:18:52 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-20160920

for you to fetch changes up to 3c028a0cb5b71f47d523bc8ad2c597cb257f41fb:

  perf symbols: Do not open device files (2016-09-20 16:20:21 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Support event group view with hierarchy mode in 'perf top' and 'perf report'
  (Namhyung Kim)

  e.g.:

  $ perf record -e '{cycles,instructions}' make
  $ perf report --hierarchy --stdio
  ...
  #               Overhead  Command / Shared Object / Symbol
  # ......................  ..................................
  ...
      25.74%  27.18%        sh
         19.96%  24.14%        libc-2.24.so
            9.55%  14.64%        [.] __strcmp_sse2
            1.54%   0.00%        [.] __tfind
            1.07%   1.13%        [.] _int_malloc
            0.95%   0.00%        [.] __strchr_sse2
            0.89%   1.39%        [.] __tsearch
            0.76%   0.00%        [.] strlen

- Fix the dwarf regs table for x86_64, adding a missing % to the "%di"
  register, noticed with a failing 'perf test bpf' (Arnaldo Carvalho de Melo)

- Fix handling of mmap parameters in the 'perf trace' beautifier in
  architectures that don't have the same mappings as x86_64 (Wang Nan)

- Handle hugetbl mappings in older systems running new kernels (Wang Nan)

- Resolve 'call' operands in 'annotate', that when using /proc/kcore
  were appearing just as hexadecimal addresses, to function names
  (Arnaldo Carvalho de Melo)

- Fix width computation for srcline sort entry (Jiri Olsa)

- Do not ignore call instruction with indirect target in 'annotate'
  (Ravi Bangoria)

- Handle MADV_FREE in the madvise 'trace' beautifier (Wang Nan)

- Fix build of 'perf trace' mman beautifier in !x86_64 (Wang Nan)

Infrastructure:

- Add infrastructure for PMU specific configuration, allowing to pass
  config variables directly to the kernel PMU driver, prefixing those
  variables with a '@', part of a larger series to support Coresight (Mathieu Poirier)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Build stats at the end of this message.

----------------------------------------------------------------
Arnaldo Carvalho de Melo (5):
      perf probe: Fix dwarf regs table for x86_64
      perf trace beauty mmap: Fix defines for non !x86_64
      perf tools: Do hugetlb handling in more systems
      perf annotate: Pass the symbol's map/dso to the instruction parsers
      perf annotate: Resolve 'call' operands to function names

Jiri Olsa (2):
      perf hists: Fix width computation for srcline sort entry
      perf symbols: Do not open device files

Mathieu Poirier (1):
      perf tools: Add infrastructure for PMU specific configuration

Namhyung Kim (9):
      perf hists browser: Fix event group display
      perf hists: Introduce hists__match_hierarchy()
      perf hists: Introduce hists__link_hierarchy()
      perf hist: Initialize hierarchy tree explicitly
      perf ui/stdio: Always reset output width for hierarchy
      perf ui/stdio: Rename print_hierarchy_header()
      perf report: Enable group view with hierarchy
      perf ui/tui: Reset output width for hierarchy
      perf hists: Factor out hists__reset_column_width()

Ravi Bangoria (1):
      perf annotate: Do not ignore call instruction with indirect target

Wang Nan (4):
      tools include: Add uapi mman.h for each architecture
      perf build: Compare mman.h related headers against kernel originals
      perf trace beauty mmap: Add missing MADV_FREE
      tools include: Add mman macros needed by perf for all arch

 tools/arch/alpha/include/uapi/asm/mman.h       |  47 ++++++++
 tools/arch/arc/include/uapi/asm/mman.h         |   6 +
 tools/arch/arm/include/uapi/asm/mman.h         |   6 +
 tools/arch/arm64/include/uapi/asm/mman.h       |   6 +
 tools/arch/frv/include/uapi/asm/mman.h         |   6 +
 tools/arch/h8300/include/uapi/asm/mman.h       |   6 +
 tools/arch/hexagon/include/uapi/asm/mman.h     |   6 +
 tools/arch/ia64/include/uapi/asm/mman.h        |   6 +
 tools/arch/m32r/include/uapi/asm/mman.h        |   6 +
 tools/arch/microblaze/include/uapi/asm/mman.h  |   6 +
 tools/arch/mips/include/uapi/asm/mman.h        |  46 ++++++++
 tools/arch/mn10300/include/uapi/asm/mman.h     |   6 +
 tools/arch/parisc/include/uapi/asm/mman.h      |  47 ++++++++
 tools/arch/powerpc/include/uapi/asm/mman.h     |  15 +++
 tools/arch/s390/include/uapi/asm/mman.h        |   6 +
 tools/arch/score/include/uapi/asm/mman.h       |   6 +
 tools/arch/sh/include/uapi/asm/mman.h          |   6 +
 tools/arch/sparc/include/uapi/asm/mman.h       |  15 +++
 tools/arch/tile/include/uapi/asm/mman.h        |  15 +++
 tools/arch/x86/include/uapi/asm/mman.h         |   5 +
 tools/arch/xtensa/include/uapi/asm/mman.h      |  47 ++++++++
 tools/include/uapi/asm-generic/mman-common.h   |  75 ++++++++++++
 tools/include/uapi/asm-generic/mman.h          |  22 ++++
 tools/include/uapi/linux/mman.h                |  13 +++
 tools/perf/Documentation/perf-record.txt       |  12 ++
 tools/perf/MANIFEST                            |   4 +
 tools/perf/Makefile.perf                       |   9 ++
 tools/perf/arch/x86/include/dwarf-regs-table.h |   2 +-
 tools/perf/builtin-report.c                    |   1 -
 tools/perf/trace/beauty/mmap.c                 |  72 +-----------
 tools/perf/ui/browsers/hists.c                 |   7 +-
 tools/perf/ui/hist.c                           |  15 +++
 tools/perf/ui/stdio/hist.c                     |  25 +---
 tools/perf/util/annotate.c                     |  37 +++---
 tools/perf/util/annotate.h                     |   2 +-
 tools/perf/util/dso.c                          |   3 +
 tools/perf/util/event.c                        |   7 +-
 tools/perf/util/evsel.h                        |   2 +
 tools/perf/util/hist.c                         | 154 ++++++++++++++++++++++++-
 tools/perf/util/hist.h                         |   1 +
 tools/perf/util/map.c                          |   9 +-
 tools/perf/util/parse-events.c                 |   7 +-
 tools/perf/util/parse-events.h                 |   1 +
 tools/perf/util/parse-events.l                 |  22 ++++
 tools/perf/util/parse-events.y                 |  11 ++
 tools/perf/util/sort.h                         |   1 +
 46 files changed, 698 insertions(+), 131 deletions(-)
 create mode 100644 tools/arch/alpha/include/uapi/asm/mman.h
 create mode 100644 tools/arch/arc/include/uapi/asm/mman.h
 create mode 100644 tools/arch/arm/include/uapi/asm/mman.h
 create mode 100644 tools/arch/arm64/include/uapi/asm/mman.h
 create mode 100644 tools/arch/frv/include/uapi/asm/mman.h
 create mode 100644 tools/arch/h8300/include/uapi/asm/mman.h
 create mode 100644 tools/arch/hexagon/include/uapi/asm/mman.h
 create mode 100644 tools/arch/ia64/include/uapi/asm/mman.h
 create mode 100644 tools/arch/m32r/include/uapi/asm/mman.h
 create mode 100644 tools/arch/microblaze/include/uapi/asm/mman.h
 create mode 100644 tools/arch/mips/include/uapi/asm/mman.h
 create mode 100644 tools/arch/mn10300/include/uapi/asm/mman.h
 create mode 100644 tools/arch/parisc/include/uapi/asm/mman.h
 create mode 100644 tools/arch/powerpc/include/uapi/asm/mman.h
 create mode 100644 tools/arch/s390/include/uapi/asm/mman.h
 create mode 100644 tools/arch/score/include/uapi/asm/mman.h
 create mode 100644 tools/arch/sh/include/uapi/asm/mman.h
 create mode 100644 tools/arch/sparc/include/uapi/asm/mman.h
 create mode 100644 tools/arch/tile/include/uapi/asm/mman.h
 create mode 100644 tools/arch/x86/include/uapi/asm/mman.h
 create mode 100644 tools/arch/xtensa/include/uapi/asm/mman.h
 create mode 100644 tools/include/uapi/asm-generic/mman-common.h
 create mode 100644 tools/include/uapi/asm-generic/mman.h
 create mode 100644 tools/include/uapi/linux/mman.h

  [root@jouet ~]# perf test
   1: vmlinux symtab matches kallsyms                          : Ok
   2: detect openat syscall event                              : Ok
   3: detect openat syscall event on all cpus                  : Ok
   4: read samples using the mmap interface                    : Ok
   5: parse events tests                                       : Ok
   6: Validate PERF_RECORD_* events & perf_sample fields       : Ok
   7: Test perf pmu format parsing                             : Ok
   8: Test dso data read                                       : Ok
   9: Test dso data cache                                      : Ok
  10: Test dso data reopen                                     : Ok
  11: roundtrip evsel->name check                              : Ok
  12: Check parsing of sched tracepoints fields                : Ok
  13: Generate and check syscalls:sys_enter_openat event fields: Ok
  14: struct perf_event_attr setup                             : Ok
  15: Test matching and linking multiple hists                 : Ok
  16: Try 'import perf' in python, checking link problems      : Ok
  17: Test breakpoint overflow signal handler                  : Ok
  18: Test breakpoint overflow sampling                        : Ok
  19: Test number of exit event of a simple workload           : Ok
  20: Test software clock events have valid period values      : Ok
  21: Test object code reading                                 : Ok
  22: Test sample parsing                                      : Ok
  23: Test using a dummy software event to keep tracking       : Ok
  24: Test parsing with no sample_id_all bit set               : Ok
  25: Test filtering hist entries                              : Ok
  26: Test mmap thread lookup                                  : Ok
  27: Test thread mg sharing                                   : Ok
  28: Test output sorting of hist entries                      : Ok
  29: Test cumulation of child hist entries                    : Ok
  30: Test tracking with sched_switch                          : Ok
  31: Filter fds with revents mask in a fdarray                : Ok
  32: Add fd to a fdarray, making it autogrow                  : Ok
  33: Test kmod_path__parse function                           : Ok
  34: Test thread map                                          : Ok
  35: Test LLVM searching and compiling                        :
  35.1: Basic BPF llvm compiling test                          : Ok
  35.2: Test kbuild searching                                  : Ok
  35.3: Compile source for BPF prologue generation test        : Ok
  35.4: Compile source for BPF relocation test                 : Ok
  36: Test topology in session                                 : Ok
  37: Test BPF filter                                          :
  37.1: Test basic BPF filtering                               : Ok
  37.2: Test BPF prologue generation                           : Ok
  37.3: Test BPF relocation checker                            : Ok
  38: Test thread map synthesize                               : Ok
  39: Test cpu map synthesize                                  : Ok
  40: Test stat config synthesize                              : Ok
  41: Test stat synthesize                                     : Ok
  42: Test stat round synthesize                               : Ok
  43: Test attr update synthesize                              : Ok
  44: Test events times                                        : Ok
  45: Test backward reading from ring buffer                   : Ok
  46: Test cpu map print                                       : Ok
  47: Test SDT event probing                                   : Ok
  48: Test is_printable_array function                         : Ok
  49: Test bitmap print                                        : Ok
  50: x86 rdpmc test                                           : Ok
  51: Test converting perf time to TSC                         : Ok
  52: Test dwarf unwind                                        : Ok
  53: Test x86 instruction decoder - new instructions          : Ok
  54: Test intel cqm nmi context read                          : Skip
  [root@jouet ~]# 

Build stats:

  # time dm
   1 74.534 alpine:3.4: Ok
   2 25.636 android-ndk:r12b-arm: Ok
   3 78.066 archlinux:latest: Ok
   4 41.189 centos:5: Ok
   5 64.550 centos:6: Ok
   6 74.689 centos:7: Ok
   7 68.580 debian:7: Ok
   8 75.115 debian:8: Ok
   9 75.288 fedora:20: Ok
  10 79.294 fedora:21: Ok
  11 76.839 fedora:22: Ok
  12 76.695 fedora:23: Ok
  13 82.058 fedora:24: Ok
  14 31.649 fedora:24-x-ARC-uClibc: Ok
  15 85.826 fedora:rawhide: Ok
  16 83.272 mageia:5: Ok
  17 76.883 opensuse:13.2: Ok
  18 78.530 opensuse:42.1: Ok
  19 85.315 opensuse:tumbleweed: Ok
  20 63.436 ubuntu:12.04.5: Ok
  21 40.909 ubuntu:14.04: Ok
  22 72.689 ubuntu:14.04.4: Ok
  23 76.374 ubuntu:15.10: Ok
  24 70.309 ubuntu:16.04: Ok
  25 59.159 ubuntu:16.04-x-arm: Ok
  26 56.011 ubuntu:16.04-x-arm64: Ok
  27 56.913 ubuntu:16.04-x-powerpc64: Ok
  28 57.442 ubuntu:16.04-x-powerpc64el: Ok
  29 80.282 ubuntu:16.10: Ok
  30 60.964 ubuntu:16.10-x-arm64: Ok
  31 61.390 ubuntu:16.10-x-powerpc: Ok
  32 63.167 ubuntu:16.10-x-s390: Ok

  real	35m54.027s
  user	0m2.855s
  sys	0m2.652s

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

* Re: [GIT PULL 00/22] perf/core improvements and fixes
  2016-02-19 22:41 Arnaldo Carvalho de Melo
@ 2016-02-20 10:56 ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2016-02-20 10:56 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Andi Kleen,
	Brendan Gregg, Cody P Schafer, David Ahern, Frederic Weisbecker,
	He Kuang, Jeremie Galarneau, Jiri Olsa, Kirill Smelkov, Li Zefan,
	Masami Hiramatsu, Namhyung Kim, Peter Zijlstra, pi3orama,
	Stephane Eranian, Steven Noonan, Wang Nan,
	Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 3b364d7b587db0f0eeafde0f271e0698187de776:
> 
>   perf/core: Remove unused arguments from a bunch of functions (2016-02-17 10:37:48 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to 5b2ea6f2f6ac81a230e6cc68e1473e796a583f00:
> 
>   perf report: Check error during report__collapse_hists() (2016-02-19 19:17:50 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Add 'perf record' --all-user/--all-kernel options, so that one can tell
>   that all the events in the command line should be restricted to the user
>   or kernel levels (Jiri Olsa), i.e.:
> 
> 	perf record -e cycles:u,instructions:u
> 
>   is equivalent to:
> 
>         perf record --all-user -e cycles,instructions
> 
> - Fix percentage update on key press, due to the buffering code
>   (that creates hist_entries that will later be consumed) touching
>   per hists state that is used by the display thread (Namhyung Kim)
> 
> - Bail out when event modifiers not supported by 'perf stat' are
>   specified, i.e.: (Wang Nan)
> 
>   # perf stat -e cycles/no-inherit/ usleep 1
>   event syntax error: 'cycles/no-inherit/'
>                        \___ 'no-inherit' is not usable in 'perf stat'
>   # perf stat -e cycles/foo/ usleep 1
>   event syntax error: 'cycles/foo/'
>                               \___ unknown term
> 
>   valid terms: config,config1,config2,name
>   #
> 
> - Enable setting names for legacy cache, raw and numeric events, e.g: (Wang Nan)
> 
>   # perf record -e cycles -e 4:0x6530160/name=evtx,call-graph=fp/ -a sleep 1
>   [ perf record: Woken up 1 times to write data ]
>   [ perf record: Captured and wrote 1.659 MB perf.data (844 samples) ]
>   # perf evlist
>   cycles
>   evtx
>   #
> 
> Miscelaneous/Infrastructure:
> 
> - Handled scaled == -1 case for counters in 'perf stat', fixing
>   recent, only in perf/core, regression (Andi Kleen)
> 
> - Reference count the cpu and thread maps at set_maps(), fixing the
>   'object code reading' 'perf test' entry when it was requesting a
>   perf_event_attr.sample_freq > /proc/sys/kernel/perf_event_max_sample_rate
>   (Arnaldo Carvalho de Melo)
> 
> - Improve perf_evlist__strerror_open() to provide hints for -EINVAL due
>   to perf_event_attr.sample_freq > /proc/sys/kernel/perf_event_max_sample_rate
>   (Arnaldo Carvalho de Melo)
> 
> - Add checks to various callchain and histogram routines (Namhyung Kim)
> 
> - Fix checking asprintf return value when parsing additional event config terms (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf stat: Handled scaled == -1 case for counters
> 
> Arnaldo Carvalho de Melo (5):
>       perf evlist: Reference count the cpu and thread maps at set_maps()
>       perf evlist: Handle -EINVAL for sample_freq > max_sample_rate in strerror_open()
>       perf tests: Use perf_evlist__strerror_open() to provide hints about max_freq
>       perf test: Reduce the sample_freq for the 'object code reading' test
>       perf tools: Introduce opt_event_config nonterminal
> 
> Jiri Olsa (1):
>       perf record: Add --all-user/--all-kernel options
> 
> Namhyung Kim (8):
>       perf hists browser: Fix percentage update on key press
>       perf callchain: Check return value of add_child()
>       perf callchain: Check return value of fill_node()
>       perf callchain: Add enum match_result for match_chain()
>       perf callchain: Check return value of split_add_child()
>       perf callchain: Check return value of append_chain_children()
>       perf hists: Return error from hists__collapse_resort()
>       perf report: Check error during report__collapse_hists()
> 
> Wang Nan (7):
>       perf bpf: Rename bpf_prog_priv__clear() to clear_prog_priv()
>       perf tools: Fix checking asprintf return value
>       perf tools: Create config_term_names array
>       perf stat: Bail out on unsupported event config modifiers
>       perf tools: Rename and move pmu_event_name to get_config_name
>       perf tools: Enable config raw and numeric events
>       perf tools: Enable config and setting names for legacy cache events
> 
>  tools/perf/Documentation/perf-record.txt |   6 ++
>  tools/perf/builtin-record.c              |   6 ++
>  tools/perf/builtin-report.c              |  14 ++-
>  tools/perf/builtin-stat.c                |   3 +-
>  tools/perf/perf.h                        |   2 +
>  tools/perf/tests/code-reading.c          |  10 +-
>  tools/perf/tests/parse-events.c          |  52 ++++++++++
>  tools/perf/util/bpf-loader.c             |   6 +-
>  tools/perf/util/callchain.c              | 102 +++++++++++++-----
>  tools/perf/util/evlist.c                 |  24 ++++-
>  tools/perf/util/evsel.c                  |  10 ++
>  tools/perf/util/hist.c                   |  55 +++++++---
>  tools/perf/util/hist.h                   |   6 +-
>  tools/perf/util/parse-events.c           | 173 ++++++++++++++++++++++++++-----
>  tools/perf/util/parse-events.h           |   8 +-
>  tools/perf/util/parse-events.l           |   3 +-
>  tools/perf/util/parse-events.y           |  75 +++++++-------
>  17 files changed, 426 insertions(+), 129 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/22] perf/core improvements and fixes
@ 2016-02-19 22:41 Arnaldo Carvalho de Melo
  2016-02-20 10:56 ` Ingo Molnar
  0 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-02-19 22:41 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Andi Kleen, Brendan Gregg, Cody P Schafer,
	David Ahern, Frederic Weisbecker, He Kuang, Jeremie Galarneau,
	Jiri Olsa, Kirill Smelkov, Li Zefan, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, pi3orama, Stephane Eranian,
	Steven Noonan, Wang Nan, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 3b364d7b587db0f0eeafde0f271e0698187de776:

  perf/core: Remove unused arguments from a bunch of functions (2016-02-17 10:37:48 +0100)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to 5b2ea6f2f6ac81a230e6cc68e1473e796a583f00:

  perf report: Check error during report__collapse_hists() (2016-02-19 19:17:50 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Add 'perf record' --all-user/--all-kernel options, so that one can tell
  that all the events in the command line should be restricted to the user
  or kernel levels (Jiri Olsa), i.e.:

	perf record -e cycles:u,instructions:u

  is equivalent to:

        perf record --all-user -e cycles,instructions

- Fix percentage update on key press, due to the buffering code
  (that creates hist_entries that will later be consumed) touching
  per hists state that is used by the display thread (Namhyung Kim)

- Bail out when event modifiers not supported by 'perf stat' are
  specified, i.e.: (Wang Nan)

  # perf stat -e cycles/no-inherit/ usleep 1
  event syntax error: 'cycles/no-inherit/'
                       \___ 'no-inherit' is not usable in 'perf stat'
  # perf stat -e cycles/foo/ usleep 1
  event syntax error: 'cycles/foo/'
                              \___ unknown term

  valid terms: config,config1,config2,name
  #

- Enable setting names for legacy cache, raw and numeric events, e.g: (Wang Nan)

  # perf record -e cycles -e 4:0x6530160/name=evtx,call-graph=fp/ -a sleep 1
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 1.659 MB perf.data (844 samples) ]
  # perf evlist
  cycles
  evtx
  #

Miscelaneous/Infrastructure:

- Handled scaled == -1 case for counters in 'perf stat', fixing
  recent, only in perf/core, regression (Andi Kleen)

- Reference count the cpu and thread maps at set_maps(), fixing the
  'object code reading' 'perf test' entry when it was requesting a
  perf_event_attr.sample_freq > /proc/sys/kernel/perf_event_max_sample_rate
  (Arnaldo Carvalho de Melo)

- Improve perf_evlist__strerror_open() to provide hints for -EINVAL due
  to perf_event_attr.sample_freq > /proc/sys/kernel/perf_event_max_sample_rate
  (Arnaldo Carvalho de Melo)

- Add checks to various callchain and histogram routines (Namhyung Kim)

- Fix checking asprintf return value when parsing additional event config terms (Wang Nan)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf stat: Handled scaled == -1 case for counters

Arnaldo Carvalho de Melo (5):
      perf evlist: Reference count the cpu and thread maps at set_maps()
      perf evlist: Handle -EINVAL for sample_freq > max_sample_rate in strerror_open()
      perf tests: Use perf_evlist__strerror_open() to provide hints about max_freq
      perf test: Reduce the sample_freq for the 'object code reading' test
      perf tools: Introduce opt_event_config nonterminal

Jiri Olsa (1):
      perf record: Add --all-user/--all-kernel options

Namhyung Kim (8):
      perf hists browser: Fix percentage update on key press
      perf callchain: Check return value of add_child()
      perf callchain: Check return value of fill_node()
      perf callchain: Add enum match_result for match_chain()
      perf callchain: Check return value of split_add_child()
      perf callchain: Check return value of append_chain_children()
      perf hists: Return error from hists__collapse_resort()
      perf report: Check error during report__collapse_hists()

Wang Nan (7):
      perf bpf: Rename bpf_prog_priv__clear() to clear_prog_priv()
      perf tools: Fix checking asprintf return value
      perf tools: Create config_term_names array
      perf stat: Bail out on unsupported event config modifiers
      perf tools: Rename and move pmu_event_name to get_config_name
      perf tools: Enable config raw and numeric events
      perf tools: Enable config and setting names for legacy cache events

 tools/perf/Documentation/perf-record.txt |   6 ++
 tools/perf/builtin-record.c              |   6 ++
 tools/perf/builtin-report.c              |  14 ++-
 tools/perf/builtin-stat.c                |   3 +-
 tools/perf/perf.h                        |   2 +
 tools/perf/tests/code-reading.c          |  10 +-
 tools/perf/tests/parse-events.c          |  52 ++++++++++
 tools/perf/util/bpf-loader.c             |   6 +-
 tools/perf/util/callchain.c              | 102 +++++++++++++-----
 tools/perf/util/evlist.c                 |  24 ++++-
 tools/perf/util/evsel.c                  |  10 ++
 tools/perf/util/hist.c                   |  55 +++++++---
 tools/perf/util/hist.h                   |   6 +-
 tools/perf/util/parse-events.c           | 173 ++++++++++++++++++++++++++-----
 tools/perf/util/parse-events.h           |   8 +-
 tools/perf/util/parse-events.l           |   3 +-
 tools/perf/util/parse-events.y           |  75 +++++++-------
 17 files changed, 426 insertions(+), 129 deletions(-)

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

* Re: [GIT PULL 00/22] perf/core improvements and fixes
  2015-08-26 15:57 Arnaldo Carvalho de Melo
@ 2015-08-28  6:24 ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2015-08-28  6:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Masami Hiramatsu, Namhyung Kim,
	pi3orama, Stephane Eranian, Steven Rostedt, Sukadev Bhattiprolu,
	Wang Nan, Zefan Li, Arnaldo Carvalho de Melo, Peter Zijlstra


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling, this replaces the previous perf-core-for-mingo
> pull req, replacing the last patch in that series and adding a few more fixes from
> Jiri and Wang,
> 
> Thanks,
> 
> - Arnaldo
> 
> The following changes since commit 0e53909a1cf0153736fb52c216558a65530d8c40:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-22 08:45:46 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to a2fb3382edbea83c6f2bf6ac15e3673b2e254aad:
> 
>   tracing/uprobes: Do not print '0x (null)' when offset is 0 (2015-08-26 10:43:01 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Add support for using several Intel PT features (CYC, MTC packets), the
>   relevant documentation was updated: tools/perf/Documentation/intel-pt.txt,
>   briefly describing those packets, its purposes, how to configure them in
>   the event config terms and relevant external documentation for further
>   reading. (Adrian Hunter)
> 
> - Introduce support for probing at an absolute address, for user and kernel
>   'perf probe's, useful when one have the symbol maps on a developer machine
>   but not on an embedded system (Wang Nan)
> 
> - Fix 'perf probe' list results when a symbol can't be found or the
>   address is zero and when an offset is provided without a function (Wang Nan)
> 
> - Do not print '0x (null)' in uprobes when offset is zero (Wang Nan)
> 
> - Clear the progress bar at the end of a ordered_events flush, fixing
>   an UI artifact when, after ordering the events the screen doesn't get
>   completely redraw, for instance, when an error window covers just the
>   center of the screen and waits for user input. (Arnaldo Carvalho de Melo)
> 
> - Fix 'annotate' segfault by resetting the dso find_symbol cache when removing
>   symbols (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Allow duplicate objects in the object list, just like it is possible to have
>   things like this, in the kernel: (Jiri Olsa)
> 
>   drivers/Makefile:obj-$(CONFIG_PCI)        += usb/
>   drivers/Makefile:obj-$(CONFIG_USB_GADGET) += usb/
> 
> - Fix Intel PT 'instructions' sample period (Adrian Hunter)
> 
> - Prevent segfault when reading probe point with absolute address (Wang Nan)
> 
> Build fixes:
> 
> - Fix tarball build broken by pt/bts (Adrian Hunter)
> 
> - Remove export.h from MANIFEST, fixing the perf tarball make target (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (11):
>       perf tools: Fix tarball build broken by pt/bts
>       perf tools: Fix Intel PT 'instructions' sample period
>       perf tools: Add Intel PT support for PSB periods
>       perf tools: Add new Intel PT packet definitions
>       perf tools: Pass Intel PT information for decoding MTC and CYC
>       perf tools: Add Intel PT support for decoding MTC packets
>       perf tools: Add Intel PT support for using MTC packets
>       perf tools: Add Intel PT support for decoding CYC packets
>       perf tools: Add Intel PT support for using CYC packets
>       perf tools: Add Intel PT support for decoding TRACESTOP packets
>       perf tools: Update Intel PT documentation
> 
> Arnaldo Carvalho de Melo (3):
>       perf annotate: Reset the dso find_symbol cache when removing symbols
>       perf ui tui progress: Implement the ui_progress_ops->finish() method
>       perf ordered_events: Clear the progress bar at the end of a flush
> 
> Jiri Olsa (2):
>       perf tools: Remove export.h from MANIFEST
>       tools build: Allow duplicate objects in the object list
> 
> Wang Nan (6):
>       perf probe: Prevent segfault when reading probe point with absolute address
>       perf probe: Fix list result when symbol can't be found
>       perf probe: Fix list result when address is zero
>       perf probe: Fix error reported when offset without function
>       perf probe: Support probing at absolute address
>       tracing/uprobes: Do not print '0x (null)' when offset is 0
> 
>  kernel/trace/trace_uprobe.c                        |  17 +-
>  tools/build/Documentation/Build.txt                |   1 +
>  tools/build/Makefile.build                         |   2 +-
>  tools/build/tests/ex/Build                         |   1 +
>  tools/perf/Documentation/intel-pt.txt              | 194 ++++++-
>  tools/perf/MANIFEST                                |   1 -
>  tools/perf/arch/x86/util/intel-pt.c                | 271 +++++++++-
>  tools/perf/builtin-annotate.c                      |   1 +
>  tools/perf/ui/tui/progress.c                       |  19 +-
>  tools/perf/util/dso.h                              |   2 +
>  tools/perf/util/intel-pt-decoder/inat.c            |   2 +-
>  tools/perf/util/intel-pt-decoder/inat.h            |   2 +-
>  tools/perf/util/intel-pt-decoder/inat_types.h      |  29 ++
>  tools/perf/util/intel-pt-decoder/insn.c            |   4 +-
>  tools/perf/util/intel-pt-decoder/insn.h            |   2 +-
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 555 ++++++++++++++++++++-
>  .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |   5 +
>  .../util/intel-pt-decoder/intel-pt-insn-decoder.c  |   2 +-
>  .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   | 142 +++++-
>  .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   6 +
>  tools/perf/util/intel-pt.c                         |  67 ++-
>  tools/perf/util/intel-pt.h                         |   5 +
>  tools/perf/util/ordered-events.c                   |   3 +
>  tools/perf/util/probe-event.c                      | 210 +++++++-
>  tools/perf/util/probe-event.h                      |   4 +
>  tools/perf/util/probe-finder.c                     |  21 +-
>  tools/perf/util/symbol.c                           |  10 +
>  27 files changed, 1481 insertions(+), 97 deletions(-)
>  create mode 100644 tools/perf/util/intel-pt-decoder/inat_types.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/22] perf/core improvements and fixes
@ 2015-08-26 15:57 Arnaldo Carvalho de Melo
  2015-08-28  6:24 ` Ingo Molnar
  0 siblings, 1 reply; 42+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-08-26 15:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Masami Hiramatsu, Namhyung Kim, pi3orama, Stephane Eranian,
	Steven Rostedt, Sukadev Bhattiprolu, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this replaces the previous perf-core-for-mingo
pull req, replacing the last patch in that series and adding a few more fixes from
Jiri and Wang,

Thanks,

- Arnaldo

The following changes since commit 0e53909a1cf0153736fb52c216558a65530d8c40:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-08-22 08:45:46 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to a2fb3382edbea83c6f2bf6ac15e3673b2e254aad:

  tracing/uprobes: Do not print '0x (null)' when offset is 0 (2015-08-26 10:43:01 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Add support for using several Intel PT features (CYC, MTC packets), the
  relevant documentation was updated: tools/perf/Documentation/intel-pt.txt,
  briefly describing those packets, its purposes, how to configure them in
  the event config terms and relevant external documentation for further
  reading. (Adrian Hunter)

- Introduce support for probing at an absolute address, for user and kernel
  'perf probe's, useful when one have the symbol maps on a developer machine
  but not on an embedded system (Wang Nan)

- Fix 'perf probe' list results when a symbol can't be found or the
  address is zero and when an offset is provided without a function (Wang Nan)

- Do not print '0x (null)' in uprobes when offset is zero (Wang Nan)

- Clear the progress bar at the end of a ordered_events flush, fixing
  an UI artifact when, after ordering the events the screen doesn't get
  completely redraw, for instance, when an error window covers just the
  center of the screen and waits for user input. (Arnaldo Carvalho de Melo)

- Fix 'annotate' segfault by resetting the dso find_symbol cache when removing
  symbols (Arnaldo Carvalho de Melo)

Infrastructure:

- Allow duplicate objects in the object list, just like it is possible to have
  things like this, in the kernel: (Jiri Olsa)

  drivers/Makefile:obj-$(CONFIG_PCI)        += usb/
  drivers/Makefile:obj-$(CONFIG_USB_GADGET) += usb/

- Fix Intel PT 'instructions' sample period (Adrian Hunter)

- Prevent segfault when reading probe point with absolute address (Wang Nan)

Build fixes:

- Fix tarball build broken by pt/bts (Adrian Hunter)

- Remove export.h from MANIFEST, fixing the perf tarball make target (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Adrian Hunter (11):
      perf tools: Fix tarball build broken by pt/bts
      perf tools: Fix Intel PT 'instructions' sample period
      perf tools: Add Intel PT support for PSB periods
      perf tools: Add new Intel PT packet definitions
      perf tools: Pass Intel PT information for decoding MTC and CYC
      perf tools: Add Intel PT support for decoding MTC packets
      perf tools: Add Intel PT support for using MTC packets
      perf tools: Add Intel PT support for decoding CYC packets
      perf tools: Add Intel PT support for using CYC packets
      perf tools: Add Intel PT support for decoding TRACESTOP packets
      perf tools: Update Intel PT documentation

Arnaldo Carvalho de Melo (3):
      perf annotate: Reset the dso find_symbol cache when removing symbols
      perf ui tui progress: Implement the ui_progress_ops->finish() method
      perf ordered_events: Clear the progress bar at the end of a flush

Jiri Olsa (2):
      perf tools: Remove export.h from MANIFEST
      tools build: Allow duplicate objects in the object list

Wang Nan (6):
      perf probe: Prevent segfault when reading probe point with absolute address
      perf probe: Fix list result when symbol can't be found
      perf probe: Fix list result when address is zero
      perf probe: Fix error reported when offset without function
      perf probe: Support probing at absolute address
      tracing/uprobes: Do not print '0x (null)' when offset is 0

 kernel/trace/trace_uprobe.c                        |  17 +-
 tools/build/Documentation/Build.txt                |   1 +
 tools/build/Makefile.build                         |   2 +-
 tools/build/tests/ex/Build                         |   1 +
 tools/perf/Documentation/intel-pt.txt              | 194 ++++++-
 tools/perf/MANIFEST                                |   1 -
 tools/perf/arch/x86/util/intel-pt.c                | 271 +++++++++-
 tools/perf/builtin-annotate.c                      |   1 +
 tools/perf/ui/tui/progress.c                       |  19 +-
 tools/perf/util/dso.h                              |   2 +
 tools/perf/util/intel-pt-decoder/inat.c            |   2 +-
 tools/perf/util/intel-pt-decoder/inat.h            |   2 +-
 tools/perf/util/intel-pt-decoder/inat_types.h      |  29 ++
 tools/perf/util/intel-pt-decoder/insn.c            |   4 +-
 tools/perf/util/intel-pt-decoder/insn.h            |   2 +-
 .../perf/util/intel-pt-decoder/intel-pt-decoder.c  | 555 ++++++++++++++++++++-
 .../perf/util/intel-pt-decoder/intel-pt-decoder.h  |   5 +
 .../util/intel-pt-decoder/intel-pt-insn-decoder.c  |   2 +-
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.c   | 142 +++++-
 .../util/intel-pt-decoder/intel-pt-pkt-decoder.h   |   6 +
 tools/perf/util/intel-pt.c                         |  67 ++-
 tools/perf/util/intel-pt.h                         |   5 +
 tools/perf/util/ordered-events.c                   |   3 +
 tools/perf/util/probe-event.c                      | 210 +++++++-
 tools/perf/util/probe-event.h                      |   4 +
 tools/perf/util/probe-finder.c                     |  21 +-
 tools/perf/util/symbol.c                           |  10 +
 27 files changed, 1481 insertions(+), 97 deletions(-)
 create mode 100644 tools/perf/util/intel-pt-decoder/inat_types.h

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

* Re: [GIT PULL 00/22] perf/core improvements and fixes
  2014-05-21 13:12 Jiri Olsa
@ 2014-05-22  9:38 ` Ingo Molnar
  0 siblings, 0 replies; 42+ messages in thread
From: Ingo Molnar @ 2014-05-22  9:38 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Michael Lentine, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian


* Jiri Olsa <jolsa@kernel.org> wrote:

> hi Ingo,
> please consider pulling
> 
> thanks,
> jirka
> 
> 
> The following changes since commit 6480c56130ba073df84d57d61062ec4118b10bbe:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-05-20 08:36:09 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to eca8183699964579ca8a0b8d116bd1f4da0136f7:
> 
>   perf tools: Add automatic remapping of Android libraries (2014-05-21 15:03:25 +0200)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Android related fixes for pager and map dso resolving (Michael Lentine)
> 
> . Add -F option for specifying output fields (Namhyung Kim)
> 
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> 
> ----------------------------------------------------------------
> Michael Lentine (2):
>       perf tools: Add cat as fallback pager
>       perf tools: Add automatic remapping of Android libraries
> 
> Namhyung Kim (20):
>       perf tools: Add ->cmp(), ->collapse() and ->sort() to perf_hpp_fmt
>       perf tools: Convert sort entries to hpp formats
>       perf tools: Use hpp formats to sort hist entries
>       perf tools: Support event grouping in hpp ->sort()
>       perf tools: Use hpp formats to sort final output
>       perf tools: Consolidate output field handling to hpp format routines
>       perf ui: Get rid of callback from __hpp__fmt()
>       perf tools: Allow hpp fields to be sort keys
>       perf tools: Consolidate management of default sort orders
>       perf tools: Call perf_hpp__init() before setting up GUI browsers
>       perf report: Add -F option to specify output fields
>       perf tools: Add ->sort() member to struct sort_entry
>       perf report/tui: Fix a bug when --fields/sort is given
>       perf top: Add --fields option to specify output fields
>       perf tools: Skip elided sort entries
>       perf hists: Reset width of output fields with header length
>       perf tools: Get rid of obsolete hist_entry__sort_list
>       perf tools: Introduce reset_output_field()
>       perf tests: Factor out print_hists_*()
>       perf tests: Add a testcase for histogram output sorting
> 
>  tools/perf/Documentation/perf-diff.txt   |   5 +-
>  tools/perf/Documentation/perf-report.txt |  19 +
>  tools/perf/Documentation/perf-top.txt    |  14 +-
>  tools/perf/Makefile.perf                 |   1 +
>  tools/perf/builtin-diff.c                |   7 +-
>  tools/perf/builtin-report.c              |  41 +-
>  tools/perf/builtin-top.c                 |  20 +-
>  tools/perf/tests/builtin-test.c          |   4 +
>  tools/perf/tests/hists_common.c          |  57 +++
>  tools/perf/tests/hists_common.h          |   3 +
>  tools/perf/tests/hists_filter.c          |  38 +-
>  tools/perf/tests/hists_link.c            |  30 +-
>  tools/perf/tests/hists_output.c          | 618 +++++++++++++++++++++++++++++++
>  tools/perf/tests/tests.h                 |   1 +
>  tools/perf/ui/browsers/hists.c           | 104 +++---
>  tools/perf/ui/gtk/hists.c                |  41 +-
>  tools/perf/ui/hist.c                     | 244 +++++++++---
>  tools/perf/ui/setup.c                    |   2 -
>  tools/perf/ui/stdio/hist.c               |  79 ++--
>  tools/perf/util/hist.c                   |  83 ++---
>  tools/perf/util/hist.h                   |  27 +-
>  tools/perf/util/map.c                    |  95 ++++-
>  tools/perf/util/pager.c                  |  12 +-
>  tools/perf/util/sort.c                   | 436 ++++++++++++++++++++--
>  tools/perf/util/sort.h                   |   6 +
>  25 files changed, 1601 insertions(+), 386 deletions(-)
>  create mode 100644 tools/perf/tests/hists_output.c

Pulled, thanks a lot Jiri!

	Ingo

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

* [GIT PULL 00/22] perf/core improvements and fixes
@ 2014-05-21 13:12 Jiri Olsa
  2014-05-22  9:38 ` Ingo Molnar
  0 siblings, 1 reply; 42+ messages in thread
From: Jiri Olsa @ 2014-05-21 13:12 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Michael Lentine, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian, Jiri Olsa

hi Ingo,
please consider pulling

thanks,
jirka


The following changes since commit 6480c56130ba073df84d57d61062ec4118b10bbe:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-05-20 08:36:09 +0200)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo

for you to fetch changes up to eca8183699964579ca8a0b8d116bd1f4da0136f7:

  perf tools: Add automatic remapping of Android libraries (2014-05-21 15:03:25 +0200)

----------------------------------------------------------------
perf/core improvements and fixes:

. Android related fixes for pager and map dso resolving (Michael Lentine)

. Add -F option for specifying output fields (Namhyung Kim)

Signed-off-by: Jiri Olsa <jolsa@kernel.org>

----------------------------------------------------------------
Michael Lentine (2):
      perf tools: Add cat as fallback pager
      perf tools: Add automatic remapping of Android libraries

Namhyung Kim (20):
      perf tools: Add ->cmp(), ->collapse() and ->sort() to perf_hpp_fmt
      perf tools: Convert sort entries to hpp formats
      perf tools: Use hpp formats to sort hist entries
      perf tools: Support event grouping in hpp ->sort()
      perf tools: Use hpp formats to sort final output
      perf tools: Consolidate output field handling to hpp format routines
      perf ui: Get rid of callback from __hpp__fmt()
      perf tools: Allow hpp fields to be sort keys
      perf tools: Consolidate management of default sort orders
      perf tools: Call perf_hpp__init() before setting up GUI browsers
      perf report: Add -F option to specify output fields
      perf tools: Add ->sort() member to struct sort_entry
      perf report/tui: Fix a bug when --fields/sort is given
      perf top: Add --fields option to specify output fields
      perf tools: Skip elided sort entries
      perf hists: Reset width of output fields with header length
      perf tools: Get rid of obsolete hist_entry__sort_list
      perf tools: Introduce reset_output_field()
      perf tests: Factor out print_hists_*()
      perf tests: Add a testcase for histogram output sorting

 tools/perf/Documentation/perf-diff.txt   |   5 +-
 tools/perf/Documentation/perf-report.txt |  19 +
 tools/perf/Documentation/perf-top.txt    |  14 +-
 tools/perf/Makefile.perf                 |   1 +
 tools/perf/builtin-diff.c                |   7 +-
 tools/perf/builtin-report.c              |  41 +-
 tools/perf/builtin-top.c                 |  20 +-
 tools/perf/tests/builtin-test.c          |   4 +
 tools/perf/tests/hists_common.c          |  57 +++
 tools/perf/tests/hists_common.h          |   3 +
 tools/perf/tests/hists_filter.c          |  38 +-
 tools/perf/tests/hists_link.c            |  30 +-
 tools/perf/tests/hists_output.c          | 618 +++++++++++++++++++++++++++++++
 tools/perf/tests/tests.h                 |   1 +
 tools/perf/ui/browsers/hists.c           | 104 +++---
 tools/perf/ui/gtk/hists.c                |  41 +-
 tools/perf/ui/hist.c                     | 244 +++++++++---
 tools/perf/ui/setup.c                    |   2 -
 tools/perf/ui/stdio/hist.c               |  79 ++--
 tools/perf/util/hist.c                   |  83 ++---
 tools/perf/util/hist.h                   |  27 +-
 tools/perf/util/map.c                    |  95 ++++-
 tools/perf/util/pager.c                  |  12 +-
 tools/perf/util/sort.c                   | 436 ++++++++++++++++++++--
 tools/perf/util/sort.h                   |   6 +
 25 files changed, 1601 insertions(+), 386 deletions(-)
 create mode 100644 tools/perf/tests/hists_output.c

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

end of thread, other threads:[~2018-11-30 18:27 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 19:54 [GIT PULL 00/22] perf/core improvements and fixes Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 01/22] perf unwind: Provide only forward declarations for pointer types Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 02/22] perf tools: Add signal.h to places using its definitions Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 03/22] perf tools: Move units conversion/formatting routines to separate object Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 04/22] perf tools: Move timestamp routines from util.h to time-utils.h Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 05/22] perf kvm: Make function only used by 'perf kvm' static Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 06/22] perf debug: Move dump_stack() and sighandler_dump_stack() to debug.h Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 07/22] perf mem: Fix display of data source snoop indication Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 08/22] perf tools: Add compress.h for the *_decompress_to_file() headers Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 09/22] perf callchain: Move callchain specific routines from util.[ch] Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 10/22] perf tools: Include sys/param.h where needed Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 11/22] perf tools: Remove a few more needless includes from util.h Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 12/22] perf tools: Remove sys/ioctl.h " Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 13/22] perf tools: Remove string.h " Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 14/22] perf tools: Remove stale prototypes from builtin.h Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 15/22] perf tools: Remove string.h, unistd.h and sys/stat.h from util.h Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 16/22] perf tools: Remove poll.h and wait.h " Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 17/22] perf tools: Add the right header to obtain PERF_ALIGN() Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 18/22] perf tools: Use just forward declarations for struct thread where possible Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 19/22] tools: Update asm-generic/mman-common.h copy from the kernel Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with " Arnaldo Carvalho de Melo
2017-04-24 20:36   ` Luck, Tony
2017-04-25  2:59     ` Joe Perches
2017-04-25 16:18       ` Luck, Tony
2017-04-25 16:28         ` Joe Perches
2017-04-25 14:13     ` Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 21/22] tools arch x86: Sync cpufeatures.h Arnaldo Carvalho de Melo
2017-04-24 19:54 ` [PATCH 22/22] perf tools: Fix the code to strip command name Arnaldo Carvalho de Melo
2017-04-24 20:08   ` David Ahern
2017-04-24 20:40 ` [GIT PULL 00/22] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2018-11-30 18:26 Arnaldo Carvalho de Melo
2016-12-13 15:09 Arnaldo Carvalho de Melo
2016-10-04  2:36 Arnaldo Carvalho de Melo
2016-10-04  8:07 ` Ingo Molnar
2016-09-20 20:03 Arnaldo Carvalho de Melo
2016-09-20 21:34 ` Ingo Molnar
2016-02-19 22:41 Arnaldo Carvalho de Melo
2016-02-20 10:56 ` Ingo Molnar
2015-08-26 15:57 Arnaldo Carvalho de Melo
2015-08-28  6:24 ` Ingo Molnar
2014-05-21 13:12 Jiri Olsa
2014-05-22  9:38 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).