All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/18] perf/core improvements and fixes
@ 2016-11-23 16:40 Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 01/18] perf annotate: Start supporting cross arch annotation Arnaldo Carvalho de Melo
                   ` (18 more replies)
  0 siblings, 19 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Andrew Morton, Chris Riyder,
	David Ahern, Don Zickus, Jiri Olsa, Joe Mario, Kim Phillips,
	Markus Trippelsdorf, Masami Hiramatsu, Namhyung Kim,
	Naveen N . Rao, Pawel Moll, Peter Zijlstra, Ravi Bangoria,
	Russell King, Stephane Eranian, Steven Rostedt, Taeung Song,
	Wang Nan

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

Test results at the end.

The following changes since commit 6a6b12e2125591e24891e6860410795ea53aed11:

  Merge tag 'perf-core-for-mingo-20161114' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-11-15 09:45:04 +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-20161123

for you to fetch changes up to a407b0678bc1c39d70af5fdbe6421c164b69a8c0:

  perf sched timehist: Add -V/--cpu-visual option (2016-11-23 10:44:09 -0300)

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

New tool:

- 'perf sched timehist' provides an analysis of scheduling events.

  Example usage:
      perf sched record -- sleep 1
      perf sched timehist

  By default it shows the individual schedule events, including the wait
  time (time between sched-out and next sched-in events for the task), the
  task scheduling delay (time between wakeup and actually running) and run
  time for the task:

        time    cpu  task name         wait time  sch delay  run time
                     [tid/pid]            (msec)     (msec)    (msec)
    -------- ------  ----------------  ---------  ---------  --------
    1.874569 [0011]  gcc[31949]            0.014      0.000     1.148
    1.874591 [0010]  gcc[31951]            0.000      0.000     0.024
    1.874603 [0010]  migration/10[59]      3.350      0.004     0.011
    1.874604 [0011]  <idle>                1.148      0.000     0.035
    1.874723 [0005]  <idle>                0.016      0.000     1.383
    1.874746 [0005]  gcc[31949]            0.153      0.078     0.022
  ...

  Times are in msec.usec. (David Ahern, Namhyung Kim)

Improvements:

- Make 'perf c2c report' support -f/--force, to allow skipping the
  ownership check for root users, for instance, just like the other
  tools (Jiri Olsa)

- Allow sorting cachelines by total number of HITMs, in addition to
  local and remote numbers (Jiri Olsa)

Fixes:

- Make sure errors aren't suppressed by the TUI reset at the end of
  a 'perf c2c report' session (Jiri Olsa)

Infrastructure:

- Initial work on having the annotate code better support multiple
  architectures, including the ability to cross-annotate, i.e. to
  annotate perf.data files collected on an ARM system on a x86_64
  workstation (Arnaldo Carvalho de Melo, Ravi Bangoria, Kim Phillips)

- Use USECS_PER_SEC instead of hard coded number in libtraceevent (Steven Rostedt)

- Add retrieval of preempt count and latency flags in libtraceevent (Steven Rostedt)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      perf annotate: Start supporting cross arch annotation
      perf annotate: Allow arches to specify functions to skip
      perf annotate: Add per arch instructions annotate handlers

David Ahern (5):
      perf sched timehist: Introduce timehist command
      perf sched timehist: Add summary options
      perf sched timehist: Add -w/--wakeups option
      perf sched timehist: Add call graph options
      perf sched timehist: Add -V/--cpu-visual option

Jiri Olsa (6):
      perf tools: Show event fd in debug output
      perf c2c report: Setup browser after opening perf.data
      perf c2c report: Add -f/--force option
      perf c2c report: Add struct c2c_stats::tot_hitm field
      perf c2c report: Display total HITMs on default
      perf c2c: Support cascading options

Namhyung Kim (2):
      perf symbols: Print symbol offsets conditionally
      perf evsel: Support printing callchains with arrows

Steven Rostedt (2):
      tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number
      tools lib traceevent: Add retrieval of preempt count and latency flags

 tools/lib/traceevent/event-parse.c          |  41 +-
 tools/lib/traceevent/event-parse.h          |   5 +-
 tools/perf/Documentation/perf-c2c.txt       |   8 +
 tools/perf/Documentation/perf-sched.txt     |  66 +-
 tools/perf/arch/arm/annotate/instructions.c |  90 +++
 tools/perf/arch/x86/annotate/instructions.c |  78 +++
 tools/perf/builtin-c2c.c                    |  80 ++-
 tools/perf/builtin-sched.c                  | 914 +++++++++++++++++++++++++++-
 tools/perf/builtin-top.c                    |   2 +-
 tools/perf/ui/browsers/annotate.c           |   2 +-
 tools/perf/ui/gtk/annotate.c                |   2 +-
 tools/perf/util/annotate.c                  | 251 ++++----
 tools/perf/util/annotate.h                  |   6 +-
 tools/perf/util/evsel.c                     |   6 +-
 tools/perf/util/evsel.h                     |   1 +
 tools/perf/util/evsel_fprintf.c             |  12 +-
 tools/perf/util/mem-events.c                |  12 +-
 tools/perf/util/mem-events.h                |   1 +
 tools/perf/util/symbol.h                    |   3 +-
 tools/perf/util/symbol_fprintf.c            |  11 +-
 20 files changed, 1406 insertions(+), 185 deletions(-)
 create mode 100644 tools/perf/arch/arm/annotate/instructions.c
 create mode 100644 tools/perf/arch/x86/annotate/instructions.c

  # uname -a
  Linux jouet 4.8.6-201.fc24.x86_64 #1 SMP Thu Nov 3 14:38:57 UTC 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 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
  # 

  # 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
  #

  $ 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_demangle_O: make NO_DEMANGLE=1
             make_no_libnuma_O: make NO_LIBNUMA=1
            make_install_bin_O: make install-bin
         make_install_prefix_O: make install prefix=/tmp/krava
             make_util_map_o_O: make util/map.o
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
              make_no_libbpf_O: make NO_LIBBPF=1
                    make_doc_O: make doc
       make_util_pmu_bison_o_O: make util/pmu-bison.o
        make_with_babeltrace_O: make LIBBABELTRACE=1
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
                  make_debug_O: make DEBUG=1
                 make_perf_o_O: make perf.o
               make_no_slang_O: make NO_SLANG=1
                make_no_newt_O: make NO_NEWT=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_install_O: make install
            make_no_auxtrace_O: make NO_AUXTRACE=1
           make_no_backtrace_O: make NO_BACKTRACE=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
              make_clean_all_O: make clean all
           make_no_libpython_O: make NO_LIBPYTHON=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
           make_no_libbionic_O: make NO_LIBBIONIC=1
                   make_help_O: make help
              make_no_libelf_O: make NO_LIBELF=1
                   make_tags_O: make tags
           make_no_libunwind_O: make NO_LIBUNWIND=1
                make_no_gtk2_O: make NO_GTK2=1
                   make_pure_O: make
                 make_static_O: make LDFLAGS=-static
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'

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

* [PATCH 01/18] perf annotate: Start supporting cross arch annotation
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 02/18] perf annotate: Allow arches to specify functions to skip Arnaldo Carvalho de Melo
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Chris Riyder, David Ahern, Jiri Olsa,
	Kim Phillips, Markus Trippelsdorf, Masami Hiramatsu,
	Namhyung Kim, Naveen N . Rao, Pawel Moll, Peter Zijlstra,
	Ravi Bangoria, Taeung Song, Wang Nan

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

Introduce a 'struct arch', where arch specific stuff will live, starting
with objdump's choice of comment delimitation character, that is '#' in
x86 while a ';' in arm.

This has some bits and pieces from a patch submitted by Ravi.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Chris Riyder <chris.ryder@arm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-f337tzjjcl8vtapgvjxmhrbx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-top.c          |   2 +-
 tools/perf/ui/browsers/annotate.c |   2 +-
 tools/perf/ui/gtk/annotate.c      |   2 +-
 tools/perf/util/annotate.c        | 114 ++++++++++++++++++++++++++++++++------
 tools/perf/util/annotate.h        |   6 +-
 5 files changed, 103 insertions(+), 23 deletions(-)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index fe3af9535e85..3df4178ba378 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -130,7 +130,7 @@ static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)
 		return err;
 	}
 
-	err = symbol__disassemble(sym, map, 0);
+	err = symbol__disassemble(sym, map, NULL, 0);
 	if (err == 0) {
 out_assign:
 		top->sym_filter_entry = he;
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 4c18271c71c9..e6e9f7d80dbd 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -1050,7 +1050,7 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
 		  (nr_pcnt - 1);
 	}
 
-	err = symbol__disassemble(sym, map, sizeof_bdl);
+	err = symbol__disassemble(sym, map, perf_evsel__env_arch(evsel), sizeof_bdl);
 	if (err) {
 		char msg[BUFSIZ];
 		symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg));
diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui/gtk/annotate.c
index 42d319927762..8c9308ac30b7 100644
--- a/tools/perf/ui/gtk/annotate.c
+++ b/tools/perf/ui/gtk/annotate.c
@@ -167,7 +167,7 @@ static int symbol__gtk_annotate(struct symbol *sym, struct map *map,
 	if (map->dso->annotate_warned)
 		return -1;
 
-	err = symbol__disassemble(sym, map, 0);
+	err = symbol__disassemble(sym, map, perf_evsel__env_arch(evsel), 0);
 	if (err) {
 		char msg[BUFSIZ];
 		symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg));
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index aeb5a441bd74..1ba41a27214d 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -18,9 +18,11 @@
 #include "annotate.h"
 #include "evsel.h"
 #include "block-range.h"
+#include "arch/common.h"
 #include <regex.h>
 #include <pthread.h>
 #include <linux/bitops.h>
+#include <sys/utsname.h>
 
 const char 	*disassembler_style;
 const char	*objdump_path;
@@ -29,6 +31,28 @@ static regex_t	 file_lineno;
 static struct ins *ins__find(const char *name);
 static int disasm_line__parse(char *line, char **namep, char **rawp);
 
+struct arch {
+	const char	*name;
+	struct		{
+		char comment_char;
+	} objdump;
+};
+
+static struct arch architectures[] = {
+	{
+		.name = "arm",
+		.objdump =  {
+			.comment_char = ';',
+		},
+	},
+	{
+		.name = "x86",
+		.objdump =  {
+			.comment_char = '#',
+		},
+	},
+};
+
 static void ins__delete(struct ins_operands *ops)
 {
 	if (ops == NULL)
@@ -54,7 +78,7 @@ int ins__scnprintf(struct ins *ins, char *bf, size_t size,
 	return ins__raw_scnprintf(ins, bf, size, ops);
 }
 
-static int call__parse(struct ins_operands *ops, struct map *map)
+static int call__parse(struct arch *arch __maybe_unused, struct ins_operands *ops, struct map *map)
 {
 	char *endptr, *tok, *name;
 
@@ -118,7 +142,7 @@ bool ins__is_call(const struct ins *ins)
 	return ins->ops == &call_ops;
 }
 
-static int jump__parse(struct ins_operands *ops, struct map *map __maybe_unused)
+static int jump__parse(struct arch *arch __maybe_unused, struct ins_operands *ops, struct map *map __maybe_unused)
 {
 	const char *s = strchr(ops->raw, '+');
 
@@ -173,7 +197,7 @@ static int comment__symbol(char *raw, char *comment, u64 *addrp, char **namep)
 	return 0;
 }
 
-static int lock__parse(struct ins_operands *ops, struct map *map)
+static int lock__parse(struct arch *arch, struct ins_operands *ops, struct map *map)
 {
 	char *name;
 
@@ -194,7 +218,7 @@ static int lock__parse(struct ins_operands *ops, struct map *map)
 		return 0;
 
 	if (ops->locked.ins->ops->parse &&
-	    ops->locked.ins->ops->parse(ops->locked.ops, map) < 0)
+	    ops->locked.ins->ops->parse(arch, ops->locked.ops, map) < 0)
 		goto out_free_ops;
 
 	return 0;
@@ -237,7 +261,7 @@ static struct ins_ops lock_ops = {
 	.scnprintf = lock__scnprintf,
 };
 
-static int mov__parse(struct ins_operands *ops, struct map *map __maybe_unused)
+static int mov__parse(struct arch *arch, struct ins_operands *ops, struct map *map __maybe_unused)
 {
 	char *s = strchr(ops->raw, ','), *target, *comment, prev;
 
@@ -252,11 +276,7 @@ static int mov__parse(struct ins_operands *ops, struct map *map __maybe_unused)
 		return -1;
 
 	target = ++s;
-#ifdef __arm__
-	comment = strchr(s, ';');
-#else
-	comment = strchr(s, '#');
-#endif
+	comment = strchr(s, arch->objdump.comment_char);
 
 	if (comment != NULL)
 		s = comment - 1;
@@ -304,7 +324,7 @@ static struct ins_ops mov_ops = {
 	.scnprintf = mov__scnprintf,
 };
 
-static int dec__parse(struct ins_operands *ops, struct map *map __maybe_unused)
+static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops, struct map *map __maybe_unused)
 {
 	char *target, *comment, *s, prev;
 
@@ -492,6 +512,41 @@ static struct ins *ins__find(const char *name)
 	return bsearch(name, instructions, nmemb, sizeof(struct ins), ins__key_cmp);
 }
 
+static int arch__key_cmp(const void *name, const void *archp)
+{
+	const struct arch *arch = archp;
+
+	return strcmp(name, arch->name);
+}
+
+static int arch__cmp(const void *a, const void *b)
+{
+	const struct arch *aa = a;
+	const struct arch *ab = b;
+
+	return strcmp(aa->name, ab->name);
+}
+
+static void arch__sort(void)
+{
+	const int nmemb = ARRAY_SIZE(architectures);
+
+	qsort(architectures, nmemb, sizeof(struct arch), arch__cmp);
+}
+
+static struct arch *arch__find(const char *name)
+{
+	const int nmemb = ARRAY_SIZE(architectures);
+	static bool sorted;
+
+	if (!sorted) {
+		arch__sort();
+		sorted = true;
+	}
+
+	return bsearch(name, architectures, nmemb, sizeof(struct arch), arch__key_cmp);
+}
+
 int symbol__alloc_hist(struct symbol *sym)
 {
 	struct annotation *notes = symbol__annotation(sym);
@@ -709,7 +764,7 @@ int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 ip)
 	return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evidx, ip);
 }
 
-static void disasm_line__init_ins(struct disasm_line *dl, struct map *map)
+static void disasm_line__init_ins(struct disasm_line *dl, struct arch *arch, struct map *map)
 {
 	dl->ins = ins__find(dl->name);
 
@@ -719,7 +774,7 @@ static void disasm_line__init_ins(struct disasm_line *dl, struct map *map)
 	if (!dl->ins->ops)
 		return;
 
-	if (dl->ins->ops->parse && dl->ins->ops->parse(&dl->ops, map) < 0)
+	if (dl->ins->ops->parse && dl->ins->ops->parse(arch, &dl->ops, map) < 0)
 		dl->ins = NULL;
 }
 
@@ -762,6 +817,7 @@ static int disasm_line__parse(char *line, char **namep, char **rawp)
 
 static struct disasm_line *disasm_line__new(s64 offset, char *line,
 					    size_t privsize, int line_nr,
+					    struct arch *arch,
 					    struct map *map)
 {
 	struct disasm_line *dl = zalloc(sizeof(*dl) + privsize);
@@ -777,7 +833,7 @@ static struct disasm_line *disasm_line__new(s64 offset, char *line,
 			if (disasm_line__parse(dl->line, &dl->name, &dl->ops.raw) < 0)
 				goto out_free_line;
 
-			disasm_line__init_ins(dl, map);
+			disasm_line__init_ins(dl, arch, map);
 		}
 	}
 
@@ -1087,6 +1143,7 @@ static int disasm_line__print(struct disasm_line *dl, struct symbol *sym, u64 st
  * The ops.raw part will be parsed further according to type of the instruction.
  */
 static int symbol__parse_objdump_line(struct symbol *sym, struct map *map,
+				      struct arch *arch,
 				      FILE *file, size_t privsize,
 				      int *line_nr)
 {
@@ -1149,7 +1206,7 @@ static int symbol__parse_objdump_line(struct symbol *sym, struct map *map,
 			parsed_line = tmp2 + 1;
 	}
 
-	dl = disasm_line__new(offset, parsed_line, privsize, *line_nr, map);
+	dl = disasm_line__new(offset, parsed_line, privsize, *line_nr, arch, map);
 	free(line);
 	(*line_nr)++;
 
@@ -1280,10 +1337,23 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
 	return 0;
 }
 
-int symbol__disassemble(struct symbol *sym, struct map *map, size_t privsize)
+static const char *annotate__norm_arch(const char *arch_name)
+{
+	struct utsname uts;
+
+	if (!arch_name) { /* Assume we are annotating locally. */
+		if (uname(&uts) < 0)
+			return NULL;
+		arch_name = uts.machine;
+	}
+	return normalize_arch((char *)arch_name);
+}
+
+int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_name, size_t privsize)
 {
 	struct dso *dso = map->dso;
 	char command[PATH_MAX * 2];
+	struct arch *arch = NULL;
 	FILE *file;
 	char symfs_filename[PATH_MAX];
 	struct kcore_extract kce;
@@ -1297,6 +1367,14 @@ int symbol__disassemble(struct symbol *sym, struct map *map, size_t privsize)
 	if (err)
 		return err;
 
+	arch_name = annotate__norm_arch(arch_name);
+	if (!arch_name)
+		return -1;
+
+	arch = arch__find(arch_name);
+	if (arch == NULL)
+		return -ENOTSUP;
+
 	pr_debug("%s: filename=%s, sym=%s, start=%#" PRIx64 ", end=%#" PRIx64 "\n", __func__,
 		 symfs_filename, sym->name, map->unmap_ip(map, sym->start),
 		 map->unmap_ip(map, sym->end));
@@ -1395,7 +1473,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map, size_t privsize)
 
 	nline = 0;
 	while (!feof(file)) {
-		if (symbol__parse_objdump_line(sym, map, file, privsize,
+		if (symbol__parse_objdump_line(sym, map, arch, file, privsize,
 			    &lineno) < 0)
 			break;
 		nline++;
@@ -1793,7 +1871,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,
 	struct rb_root source_line = RB_ROOT;
 	u64 len;
 
-	if (symbol__disassemble(sym, map, 0) < 0)
+	if (symbol__disassemble(sym, map, perf_evsel__env_arch(evsel), 0) < 0)
 		return -1;
 
 	len = symbol__size(sym);
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index 5bbcec173b82..8e490b5c91bc 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -34,9 +34,11 @@ struct ins_operands {
 	};
 };
 
+struct arch;
+
 struct ins_ops {
 	void (*free)(struct ins_operands *ops);
-	int (*parse)(struct ins_operands *ops, struct map *map);
+	int (*parse)(struct arch *arch, struct ins_operands *ops, struct map *map);
 	int (*scnprintf)(struct ins *ins, char *bf, size_t size,
 			 struct ins_operands *ops);
 };
@@ -156,7 +158,7 @@ int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 addr);
 int symbol__alloc_hist(struct symbol *sym);
 void symbol__annotate_zero_histograms(struct symbol *sym);
 
-int symbol__disassemble(struct symbol *sym, struct map *map, size_t privsize);
+int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_name, size_t privsize);
 
 enum symbol_disassemble_errno {
 	SYMBOL_ANNOTATE_ERRNO__SUCCESS		= 0,
-- 
2.7.4

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

* [PATCH 02/18] perf annotate: Allow arches to specify functions to skip
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 01/18] perf annotate: Start supporting cross arch annotation Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 03/18] perf annotate: Add per arch instructions annotate handlers Arnaldo Carvalho de Melo
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Chris Riyder, David Ahern, Jiri Olsa,
	Kim Phillips, Markus Trippelsdorf, Masami Hiramatsu,
	Namhyung Kim, Naveen N . Rao, Pawel Moll, Peter Zijlstra,
	Ravi Bangoria, Russell King, Taeung Song, Wang Nan

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

This is to cope with an ARM specific kludge introduced in the original
patch supporting ARM annotation, cfef25b8daf7 ("perf annotate: ARM
support") that made functions with a '+' in its name to be skipped when
processing call instructions.

With this patchkit it should be possible to collect a perf.data file on
a ARM machine and then annotate it on a x86 workstation and have those
ARM kludges used.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Chris Riyder <chris.ryder@arm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-2fi3sy7q3sssdi7m7cbe07gy@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/annotate.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 1ba41a27214d..72769762ece9 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -35,6 +35,7 @@ struct arch {
 	const char	*name;
 	struct		{
 		char comment_char;
+		char skip_functions_char;
 	} objdump;
 };
 
@@ -43,6 +44,7 @@ static struct arch architectures[] = {
 		.name = "arm",
 		.objdump =  {
 			.comment_char = ';',
+			.skip_functions_char = '+',
 		},
 	},
 	{
@@ -78,7 +80,7 @@ int ins__scnprintf(struct ins *ins, char *bf, size_t size,
 	return ins__raw_scnprintf(ins, bf, size, ops);
 }
 
-static int call__parse(struct arch *arch __maybe_unused, struct ins_operands *ops, struct map *map)
+static int call__parse(struct arch *arch, struct ins_operands *ops, struct map *map)
 {
 	char *endptr, *tok, *name;
 
@@ -90,10 +92,9 @@ static int call__parse(struct arch *arch __maybe_unused, struct ins_operands *op
 
 	name++;
 
-#ifdef __arm__
-	if (strchr(name, '+'))
+	if (arch->objdump.skip_functions_char &&
+	    strchr(name, arch->objdump.skip_functions_char))
 		return -1;
-#endif
 
 	tok = strchr(name, '>');
 	if (tok == NULL)
-- 
2.7.4

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

* [PATCH 03/18] perf annotate: Add per arch instructions annotate handlers
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 01/18] perf annotate: Start supporting cross arch annotation Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 02/18] perf annotate: Allow arches to specify functions to skip Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 04/18] tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number Arnaldo Carvalho de Melo
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Chris Riyder, David Ahern, Jiri Olsa,
	Kim Phillips, Markus Trippelsdorf, Masami Hiramatsu,
	Namhyung Kim, Naveen N . Rao, Pawel Moll, Peter Zijlstra,
	Ravi Bangoria, Russell King, Taeung Song, Wang Nan

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

Another step in supporting cross annotation.

The arch specific tables are put in:

   tools/perf/arch/$ARCH/annotation/instructions.c

which, so far, just plug instructions to a bunch of parsers/formatters,
but may have more as the need arises.

This is an alternative implementation to a previous attempt made by Ravi
Bangoria.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Chris Riyder <chris.ryder@arm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-g3wt282lfa51j4qd0813e3az@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/arm/annotate/instructions.c |  90 ++++++++++++++++++
 tools/perf/arch/x86/annotate/instructions.c |  78 ++++++++++++++++
 tools/perf/util/annotate.c                  | 136 ++++++----------------------
 3 files changed, 198 insertions(+), 106 deletions(-)
 create mode 100644 tools/perf/arch/arm/annotate/instructions.c
 create mode 100644 tools/perf/arch/x86/annotate/instructions.c

diff --git a/tools/perf/arch/arm/annotate/instructions.c b/tools/perf/arch/arm/annotate/instructions.c
new file mode 100644
index 000000000000..d67b8aa26274
--- /dev/null
+++ b/tools/perf/arch/arm/annotate/instructions.c
@@ -0,0 +1,90 @@
+static struct ins arm__instructions[] = {
+	{ .name = "add",	.ops = &mov_ops,  },
+	{ .name = "addl",	.ops = &mov_ops,  },
+	{ .name = "addq",	.ops = &mov_ops,  },
+	{ .name = "addw",	.ops = &mov_ops,  },
+	{ .name = "and",	.ops = &mov_ops,  },
+	{ .name = "b",		.ops = &jump_ops, }, // might also be a call
+	{ .name = "bcc",	.ops = &jump_ops, },
+	{ .name = "bcs",	.ops = &jump_ops, },
+	{ .name = "beq",	.ops = &jump_ops, },
+	{ .name = "bge",	.ops = &jump_ops, },
+	{ .name = "bgt",	.ops = &jump_ops, },
+	{ .name = "bhi",	.ops = &jump_ops, },
+	{ .name = "bl",		.ops = &call_ops, },
+	{ .name = "bls",	.ops = &jump_ops, },
+	{ .name = "blt",	.ops = &jump_ops, },
+	{ .name = "blx",	.ops = &call_ops, },
+	{ .name = "bne",	.ops = &jump_ops, },
+	{ .name = "bts",	.ops = &mov_ops,  },
+	{ .name = "call",	.ops = &call_ops, },
+	{ .name = "callq",	.ops = &call_ops, },
+	{ .name = "cmp",	.ops = &mov_ops,  },
+	{ .name = "cmpb",	.ops = &mov_ops,  },
+	{ .name = "cmpl",	.ops = &mov_ops,  },
+	{ .name = "cmpq",	.ops = &mov_ops,  },
+	{ .name = "cmpw",	.ops = &mov_ops,  },
+	{ .name = "cmpxch",	.ops = &mov_ops,  },
+	{ .name = "dec",	.ops = &dec_ops,  },
+	{ .name = "decl",	.ops = &dec_ops,  },
+	{ .name = "imul",	.ops = &mov_ops,  },
+	{ .name = "inc",	.ops = &dec_ops,  },
+	{ .name = "incl",	.ops = &dec_ops,  },
+	{ .name = "ja",		.ops = &jump_ops, },
+	{ .name = "jae",	.ops = &jump_ops, },
+	{ .name = "jb",		.ops = &jump_ops, },
+	{ .name = "jbe",	.ops = &jump_ops, },
+	{ .name = "jc",		.ops = &jump_ops, },
+	{ .name = "jcxz",	.ops = &jump_ops, },
+	{ .name = "je",		.ops = &jump_ops, },
+	{ .name = "jecxz",	.ops = &jump_ops, },
+	{ .name = "jg",		.ops = &jump_ops, },
+	{ .name = "jge",	.ops = &jump_ops, },
+	{ .name = "jl",		.ops = &jump_ops, },
+	{ .name = "jle",	.ops = &jump_ops, },
+	{ .name = "jmp",	.ops = &jump_ops, },
+	{ .name = "jmpq",	.ops = &jump_ops, },
+	{ .name = "jna",	.ops = &jump_ops, },
+	{ .name = "jnae",	.ops = &jump_ops, },
+	{ .name = "jnb",	.ops = &jump_ops, },
+	{ .name = "jnbe",	.ops = &jump_ops, },
+	{ .name = "jnc",	.ops = &jump_ops, },
+	{ .name = "jne",	.ops = &jump_ops, },
+	{ .name = "jng",	.ops = &jump_ops, },
+	{ .name = "jnge",	.ops = &jump_ops, },
+	{ .name = "jnl",	.ops = &jump_ops, },
+	{ .name = "jnle",	.ops = &jump_ops, },
+	{ .name = "jno",	.ops = &jump_ops, },
+	{ .name = "jnp",	.ops = &jump_ops, },
+	{ .name = "jns",	.ops = &jump_ops, },
+	{ .name = "jnz",	.ops = &jump_ops, },
+	{ .name = "jo",		.ops = &jump_ops, },
+	{ .name = "jp",		.ops = &jump_ops, },
+	{ .name = "jpe",	.ops = &jump_ops, },
+	{ .name = "jpo",	.ops = &jump_ops, },
+	{ .name = "jrcxz",	.ops = &jump_ops, },
+	{ .name = "js",		.ops = &jump_ops, },
+	{ .name = "jz",		.ops = &jump_ops, },
+	{ .name = "lea",	.ops = &mov_ops,  },
+	{ .name = "lock",	.ops = &lock_ops, },
+	{ .name = "mov",	.ops = &mov_ops,  },
+	{ .name = "movb",	.ops = &mov_ops,  },
+	{ .name = "movdqa",	.ops = &mov_ops,  },
+	{ .name = "movl",	.ops = &mov_ops,  },
+	{ .name = "movq",	.ops = &mov_ops,  },
+	{ .name = "movslq",	.ops = &mov_ops,  },
+	{ .name = "movzbl",	.ops = &mov_ops,  },
+	{ .name = "movzwl",	.ops = &mov_ops,  },
+	{ .name = "nop",	.ops = &nop_ops,  },
+	{ .name = "nopl",	.ops = &nop_ops,  },
+	{ .name = "nopw",	.ops = &nop_ops,  },
+	{ .name = "or",		.ops = &mov_ops,  },
+	{ .name = "orl",	.ops = &mov_ops,  },
+	{ .name = "test",	.ops = &mov_ops,  },
+	{ .name = "testb",	.ops = &mov_ops,  },
+	{ .name = "testl",	.ops = &mov_ops,  },
+	{ .name = "xadd",	.ops = &mov_ops,  },
+	{ .name = "xbeginl",	.ops = &jump_ops, },
+	{ .name = "xbeginq",	.ops = &jump_ops, },
+	{ .name = "retq",	.ops = &ret_ops,  },
+};
diff --git a/tools/perf/arch/x86/annotate/instructions.c b/tools/perf/arch/x86/annotate/instructions.c
new file mode 100644
index 000000000000..c1625f256df3
--- /dev/null
+++ b/tools/perf/arch/x86/annotate/instructions.c
@@ -0,0 +1,78 @@
+static struct ins x86__instructions[] = {
+	{ .name = "add",	.ops = &mov_ops,  },
+	{ .name = "addl",	.ops = &mov_ops,  },
+	{ .name = "addq",	.ops = &mov_ops,  },
+	{ .name = "addw",	.ops = &mov_ops,  },
+	{ .name = "and",	.ops = &mov_ops,  },
+	{ .name = "bts",	.ops = &mov_ops,  },
+	{ .name = "call",	.ops = &call_ops, },
+	{ .name = "callq",	.ops = &call_ops, },
+	{ .name = "cmp",	.ops = &mov_ops,  },
+	{ .name = "cmpb",	.ops = &mov_ops,  },
+	{ .name = "cmpl",	.ops = &mov_ops,  },
+	{ .name = "cmpq",	.ops = &mov_ops,  },
+	{ .name = "cmpw",	.ops = &mov_ops,  },
+	{ .name = "cmpxch",	.ops = &mov_ops,  },
+	{ .name = "dec",	.ops = &dec_ops,  },
+	{ .name = "decl",	.ops = &dec_ops,  },
+	{ .name = "imul",	.ops = &mov_ops,  },
+	{ .name = "inc",	.ops = &dec_ops,  },
+	{ .name = "incl",	.ops = &dec_ops,  },
+	{ .name = "ja",		.ops = &jump_ops, },
+	{ .name = "jae",	.ops = &jump_ops, },
+	{ .name = "jb",		.ops = &jump_ops, },
+	{ .name = "jbe",	.ops = &jump_ops, },
+	{ .name = "jc",		.ops = &jump_ops, },
+	{ .name = "jcxz",	.ops = &jump_ops, },
+	{ .name = "je",		.ops = &jump_ops, },
+	{ .name = "jecxz",	.ops = &jump_ops, },
+	{ .name = "jg",		.ops = &jump_ops, },
+	{ .name = "jge",	.ops = &jump_ops, },
+	{ .name = "jl",		.ops = &jump_ops, },
+	{ .name = "jle",	.ops = &jump_ops, },
+	{ .name = "jmp",	.ops = &jump_ops, },
+	{ .name = "jmpq",	.ops = &jump_ops, },
+	{ .name = "jna",	.ops = &jump_ops, },
+	{ .name = "jnae",	.ops = &jump_ops, },
+	{ .name = "jnb",	.ops = &jump_ops, },
+	{ .name = "jnbe",	.ops = &jump_ops, },
+	{ .name = "jnc",	.ops = &jump_ops, },
+	{ .name = "jne",	.ops = &jump_ops, },
+	{ .name = "jng",	.ops = &jump_ops, },
+	{ .name = "jnge",	.ops = &jump_ops, },
+	{ .name = "jnl",	.ops = &jump_ops, },
+	{ .name = "jnle",	.ops = &jump_ops, },
+	{ .name = "jno",	.ops = &jump_ops, },
+	{ .name = "jnp",	.ops = &jump_ops, },
+	{ .name = "jns",	.ops = &jump_ops, },
+	{ .name = "jnz",	.ops = &jump_ops, },
+	{ .name = "jo",		.ops = &jump_ops, },
+	{ .name = "jp",		.ops = &jump_ops, },
+	{ .name = "jpe",	.ops = &jump_ops, },
+	{ .name = "jpo",	.ops = &jump_ops, },
+	{ .name = "jrcxz",	.ops = &jump_ops, },
+	{ .name = "js",		.ops = &jump_ops, },
+	{ .name = "jz",		.ops = &jump_ops, },
+	{ .name = "lea",	.ops = &mov_ops,  },
+	{ .name = "lock",	.ops = &lock_ops, },
+	{ .name = "mov",	.ops = &mov_ops,  },
+	{ .name = "movb",	.ops = &mov_ops,  },
+	{ .name = "movdqa",	.ops = &mov_ops,  },
+	{ .name = "movl",	.ops = &mov_ops,  },
+	{ .name = "movq",	.ops = &mov_ops,  },
+	{ .name = "movslq",	.ops = &mov_ops,  },
+	{ .name = "movzbl",	.ops = &mov_ops,  },
+	{ .name = "movzwl",	.ops = &mov_ops,  },
+	{ .name = "nop",	.ops = &nop_ops,  },
+	{ .name = "nopl",	.ops = &nop_ops,  },
+	{ .name = "nopw",	.ops = &nop_ops,  },
+	{ .name = "or",		.ops = &mov_ops,  },
+	{ .name = "orl",	.ops = &mov_ops,  },
+	{ .name = "test",	.ops = &mov_ops,  },
+	{ .name = "testb",	.ops = &mov_ops,  },
+	{ .name = "testl",	.ops = &mov_ops,  },
+	{ .name = "xadd",	.ops = &mov_ops,  },
+	{ .name = "xbeginl",	.ops = &jump_ops, },
+	{ .name = "xbeginq",	.ops = &jump_ops, },
+	{ .name = "retq",	.ops = &ret_ops,  },
+};
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 72769762ece9..095d90a9077f 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -28,20 +28,36 @@ const char 	*disassembler_style;
 const char	*objdump_path;
 static regex_t	 file_lineno;
 
-static struct ins *ins__find(const char *name);
+static struct ins *ins__find(struct arch *arch, const char *name);
 static int disasm_line__parse(char *line, char **namep, char **rawp);
 
 struct arch {
 	const char	*name;
+	struct ins	*instructions;
+	size_t		nr_instructions;
+	bool		sorted_instructions;
 	struct		{
 		char comment_char;
 		char skip_functions_char;
 	} objdump;
 };
 
+static struct ins_ops call_ops;
+static struct ins_ops dec_ops;
+static struct ins_ops jump_ops;
+static struct ins_ops mov_ops;
+static struct ins_ops nop_ops;
+static struct ins_ops lock_ops;
+static struct ins_ops ret_ops;
+
+#include "arch/arm/annotate/instructions.c"
+#include "arch/x86/annotate/instructions.c"
+
 static struct arch architectures[] = {
 	{
 		.name = "arm",
+		.instructions = arm__instructions,
+		.nr_instructions = ARRAY_SIZE(arm__instructions),
 		.objdump =  {
 			.comment_char = ';',
 			.skip_functions_char = '+',
@@ -49,6 +65,8 @@ static struct arch architectures[] = {
 	},
 	{
 		.name = "x86",
+		.instructions = x86__instructions,
+		.nr_instructions = ARRAY_SIZE(x86__instructions),
 		.objdump =  {
 			.comment_char = '#',
 		},
@@ -209,7 +227,7 @@ static int lock__parse(struct arch *arch, struct ins_operands *ops, struct map *
 	if (disasm_line__parse(ops->raw, &name, &ops->locked.ops->raw) < 0)
 		goto out_free_ops;
 
-	ops->locked.ins = ins__find(name);
+	ops->locked.ins = ins__find(arch, name);
 	free(name);
 
 	if (ops->locked.ins == NULL)
@@ -385,99 +403,6 @@ bool ins__is_ret(const struct ins *ins)
 	return ins->ops == &ret_ops;
 }
 
-static struct ins instructions[] = {
-	{ .name = "add",   .ops  = &mov_ops, },
-	{ .name = "addl",  .ops  = &mov_ops, },
-	{ .name = "addq",  .ops  = &mov_ops, },
-	{ .name = "addw",  .ops  = &mov_ops, },
-	{ .name = "and",   .ops  = &mov_ops, },
-#ifdef __arm__
-	{ .name = "b",     .ops  = &jump_ops, }, // might also be a call
-	{ .name = "bcc",   .ops  = &jump_ops, },
-	{ .name = "bcs",   .ops  = &jump_ops, },
-	{ .name = "beq",   .ops  = &jump_ops, },
-	{ .name = "bge",   .ops  = &jump_ops, },
-	{ .name = "bgt",   .ops  = &jump_ops, },
-	{ .name = "bhi",   .ops  = &jump_ops, },
-	{ .name = "bl",    .ops  = &call_ops, },
-	{ .name = "bls",   .ops  = &jump_ops, },
-	{ .name = "blt",   .ops  = &jump_ops, },
-	{ .name = "blx",   .ops  = &call_ops, },
-	{ .name = "bne",   .ops  = &jump_ops, },
-#endif
-	{ .name = "bts",   .ops  = &mov_ops, },
-	{ .name = "call",  .ops  = &call_ops, },
-	{ .name = "callq", .ops  = &call_ops, },
-	{ .name = "cmp",   .ops  = &mov_ops, },
-	{ .name = "cmpb",  .ops  = &mov_ops, },
-	{ .name = "cmpl",  .ops  = &mov_ops, },
-	{ .name = "cmpq",  .ops  = &mov_ops, },
-	{ .name = "cmpw",  .ops  = &mov_ops, },
-	{ .name = "cmpxch", .ops  = &mov_ops, },
-	{ .name = "dec",   .ops  = &dec_ops, },
-	{ .name = "decl",  .ops  = &dec_ops, },
-	{ .name = "imul",  .ops  = &mov_ops, },
-	{ .name = "inc",   .ops  = &dec_ops, },
-	{ .name = "incl",  .ops  = &dec_ops, },
-	{ .name = "ja",	   .ops  = &jump_ops, },
-	{ .name = "jae",   .ops  = &jump_ops, },
-	{ .name = "jb",	   .ops  = &jump_ops, },
-	{ .name = "jbe",   .ops  = &jump_ops, },
-	{ .name = "jc",	   .ops  = &jump_ops, },
-	{ .name = "jcxz",  .ops  = &jump_ops, },
-	{ .name = "je",	   .ops  = &jump_ops, },
-	{ .name = "jecxz", .ops  = &jump_ops, },
-	{ .name = "jg",	   .ops  = &jump_ops, },
-	{ .name = "jge",   .ops  = &jump_ops, },
-	{ .name = "jl",    .ops  = &jump_ops, },
-	{ .name = "jle",   .ops  = &jump_ops, },
-	{ .name = "jmp",   .ops  = &jump_ops, },
-	{ .name = "jmpq",  .ops  = &jump_ops, },
-	{ .name = "jna",   .ops  = &jump_ops, },
-	{ .name = "jnae",  .ops  = &jump_ops, },
-	{ .name = "jnb",   .ops  = &jump_ops, },
-	{ .name = "jnbe",  .ops  = &jump_ops, },
-	{ .name = "jnc",   .ops  = &jump_ops, },
-	{ .name = "jne",   .ops  = &jump_ops, },
-	{ .name = "jng",   .ops  = &jump_ops, },
-	{ .name = "jnge",  .ops  = &jump_ops, },
-	{ .name = "jnl",   .ops  = &jump_ops, },
-	{ .name = "jnle",  .ops  = &jump_ops, },
-	{ .name = "jno",   .ops  = &jump_ops, },
-	{ .name = "jnp",   .ops  = &jump_ops, },
-	{ .name = "jns",   .ops  = &jump_ops, },
-	{ .name = "jnz",   .ops  = &jump_ops, },
-	{ .name = "jo",	   .ops  = &jump_ops, },
-	{ .name = "jp",	   .ops  = &jump_ops, },
-	{ .name = "jpe",   .ops  = &jump_ops, },
-	{ .name = "jpo",   .ops  = &jump_ops, },
-	{ .name = "jrcxz", .ops  = &jump_ops, },
-	{ .name = "js",	   .ops  = &jump_ops, },
-	{ .name = "jz",	   .ops  = &jump_ops, },
-	{ .name = "lea",   .ops  = &mov_ops, },
-	{ .name = "lock",  .ops  = &lock_ops, },
-	{ .name = "mov",   .ops  = &mov_ops, },
-	{ .name = "movb",  .ops  = &mov_ops, },
-	{ .name = "movdqa",.ops  = &mov_ops, },
-	{ .name = "movl",  .ops  = &mov_ops, },
-	{ .name = "movq",  .ops  = &mov_ops, },
-	{ .name = "movslq", .ops  = &mov_ops, },
-	{ .name = "movzbl", .ops  = &mov_ops, },
-	{ .name = "movzwl", .ops  = &mov_ops, },
-	{ .name = "nop",   .ops  = &nop_ops, },
-	{ .name = "nopl",  .ops  = &nop_ops, },
-	{ .name = "nopw",  .ops  = &nop_ops, },
-	{ .name = "or",    .ops  = &mov_ops, },
-	{ .name = "orl",   .ops  = &mov_ops, },
-	{ .name = "test",  .ops  = &mov_ops, },
-	{ .name = "testb", .ops  = &mov_ops, },
-	{ .name = "testl", .ops  = &mov_ops, },
-	{ .name = "xadd",  .ops  = &mov_ops, },
-	{ .name = "xbeginl", .ops  = &jump_ops, },
-	{ .name = "xbeginq", .ops  = &jump_ops, },
-	{ .name = "retq",  .ops  = &ret_ops, },
-};
-
 static int ins__key_cmp(const void *name, const void *insp)
 {
 	const struct ins *ins = insp;
@@ -493,24 +418,23 @@ static int ins__cmp(const void *a, const void *b)
 	return strcmp(ia->name, ib->name);
 }
 
-static void ins__sort(void)
+static void ins__sort(struct arch *arch)
 {
-	const int nmemb = ARRAY_SIZE(instructions);
+	const int nmemb = arch->nr_instructions;
 
-	qsort(instructions, nmemb, sizeof(struct ins), ins__cmp);
+	qsort(arch->instructions, nmemb, sizeof(struct ins), ins__cmp);
 }
 
-static struct ins *ins__find(const char *name)
+static struct ins *ins__find(struct arch *arch, const char *name)
 {
-	const int nmemb = ARRAY_SIZE(instructions);
-	static bool sorted;
+	const int nmemb = arch->nr_instructions;
 
-	if (!sorted) {
-		ins__sort();
-		sorted = true;
+	if (!arch->sorted_instructions) {
+		ins__sort(arch);
+		arch->sorted_instructions = true;
 	}
 
-	return bsearch(name, instructions, nmemb, sizeof(struct ins), ins__key_cmp);
+	return bsearch(name, arch->instructions, nmemb, sizeof(struct ins), ins__key_cmp);
 }
 
 static int arch__key_cmp(const void *name, const void *archp)
@@ -767,7 +691,7 @@ int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 ip)
 
 static void disasm_line__init_ins(struct disasm_line *dl, struct arch *arch, struct map *map)
 {
-	dl->ins = ins__find(dl->name);
+	dl->ins = ins__find(arch, dl->name);
 
 	if (dl->ins == NULL)
 		return;
-- 
2.7.4

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

* [PATCH 04/18] tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 03/18] perf annotate: Add per arch instructions annotate handlers Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 05/18] tools lib traceevent: Add retrieval of preempt count and latency flags Arnaldo Carvalho de Melo
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Steven Rostedt, Andrew Morton, Jiri Olsa,
	Arnaldo Carvalho de Melo

From: Steven Rostedt <rostedt@goodmis.org>

Instead of using 1000000, use the define in time64.h instead.

Also remove the the duplicate defines for NSECS_PER_SEC.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/20161121114149.67111981@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c | 11 ++++++-----
 tools/lib/traceevent/event-parse.h |  3 ---
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 664c90c8e22b..c1ad1ffa7335 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -33,6 +33,7 @@
 #include <stdint.h>
 #include <limits.h>
 #include <linux/string.h>
+#include <linux/time64.h>
 
 #include <netinet/in.h>
 #include "event-parse.h"
@@ -5424,8 +5425,8 @@ void pevent_print_event_time(struct pevent *pevent, struct trace_seq *s,
 	use_usec_format = is_timestamp_in_us(pevent->trace_clock,
 							use_trace_clock);
 	if (use_usec_format) {
-		secs = record->ts / NSECS_PER_SEC;
-		nsecs = record->ts - secs * NSECS_PER_SEC;
+		secs = record->ts / NSEC_PER_SEC;
+		nsecs = record->ts - secs * NSEC_PER_SEC;
 	}
 
 	if (pevent->latency_format) {
@@ -5437,10 +5438,10 @@ void pevent_print_event_time(struct pevent *pevent, struct trace_seq *s,
 			usecs = nsecs;
 			p = 9;
 		} else {
-			usecs = (nsecs + 500) / NSECS_PER_USEC;
+			usecs = (nsecs + 500) / NSEC_PER_USEC;
 			/* To avoid usecs larger than 1 sec */
-			if (usecs >= 1000000) {
-				usecs -= 1000000;
+			if (usecs >= USEC_PER_SEC) {
+				usecs -= USEC_PER_SEC;
 				secs++;
 			}
 			p = 6;
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 9ffde377e89d..783c842d6517 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -172,9 +172,6 @@ struct pevent_plugin_option {
 #define PEVENT_PLUGIN_OPTIONS_NAME MAKE_STR(PEVENT_PLUGIN_OPTIONS)
 #define PEVENT_PLUGIN_ALIAS_NAME MAKE_STR(PEVENT_PLUGIN_ALIAS)
 
-#define NSECS_PER_SEC		1000000000ULL
-#define NSECS_PER_USEC		1000ULL
-
 enum format_flags {
 	FIELD_IS_ARRAY		= 1,
 	FIELD_IS_POINTER	= 2,
-- 
2.7.4

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

* [PATCH 05/18] tools lib traceevent: Add retrieval of preempt count and latency flags
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 04/18] tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 06/18] perf tools: Show event fd in debug output Arnaldo Carvalho de Melo
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Steven Rostedt, Andrew Morton, Jiri Olsa,
	Arnaldo Carvalho de Melo

From: Steven Rostedt <rostedt@goodmis.org>

Add a way to retrieve the preempt count as well as the latency flags from a
pevent_record.

  int pevent_data_preempt_count(pevent, record);

returns the preempt count of a record.

  int pevent_data_flags(pevent, record);

returns the latency flags for a record.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20161122113158.03a010a8@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c | 30 ++++++++++++++++++++++++++++--
 tools/lib/traceevent/event-parse.h |  2 ++
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index c1ad1ffa7335..14a4f623c1a5 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -5192,11 +5192,11 @@ struct event_format *pevent_data_event_from_type(struct pevent *pevent, int type
 }
 
 /**
- * pevent_data_pid - parse the PID from raw data
+ * pevent_data_pid - parse the PID from record
  * @pevent: a handle to the pevent
  * @rec: the record to parse
  *
- * This returns the PID from a raw data.
+ * This returns the PID from a record.
  */
 int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec)
 {
@@ -5204,6 +5204,32 @@ int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec)
 }
 
 /**
+ * pevent_data_prempt_count - parse the preempt count from the record
+ * @pevent: a handle to the pevent
+ * @rec: the record to parse
+ *
+ * This returns the preempt count from a record.
+ */
+int pevent_data_prempt_count(struct pevent *pevent, struct pevent_record *rec)
+{
+	return parse_common_pc(pevent, rec->data);
+}
+
+/**
+ * pevent_data_flags - parse the latency flags from the record
+ * @pevent: a handle to the pevent
+ * @rec: the record to parse
+ *
+ * This returns the latency flags from a record.
+ *
+ *  Use trace_flag_type enum for the flags (see event-parse.h).
+ */
+int pevent_data_flags(struct pevent *pevent, struct pevent_record *rec)
+{
+	return parse_common_flags(pevent, rec->data);
+}
+
+/**
  * pevent_data_comm_from_pid - return the command line from PID
  * @pevent: a handle to the pevent
  * @pid: the PID of the task to search for
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 783c842d6517..7aae746ec2fe 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -709,6 +709,8 @@ void pevent_data_lat_fmt(struct pevent *pevent,
 int pevent_data_type(struct pevent *pevent, struct pevent_record *rec);
 struct event_format *pevent_data_event_from_type(struct pevent *pevent, int type);
 int pevent_data_pid(struct pevent *pevent, struct pevent_record *rec);
+int pevent_data_prempt_count(struct pevent *pevent, struct pevent_record *rec);
+int pevent_data_flags(struct pevent *pevent, struct pevent_record *rec);
 const char *pevent_data_comm_from_pid(struct pevent *pevent, int pid);
 struct cmdline;
 struct cmdline *pevent_data_pid_from_comm(struct pevent *pevent, const char *comm,
-- 
2.7.4

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

* [PATCH 06/18] perf tools: Show event fd in debug output
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 05/18] tools lib traceevent: Add retrieval of preempt count and latency flags Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 07/18] perf c2c report: Setup browser after opening perf.data Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Jiri Olsa, Andi Kleen, David Ahern,
	Don Zickus, Joe Mario, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

It is useful for debug to see file descriptors for each event.

Before:

  $ perf stat -vvv -e cycles,cache-misses ls
  ...
  sys_perf_event_open: pid 12146  cpu -1  group_fd -1  flags 0x8
  ...
  sys_perf_event_open: pid 12146  cpu -1  group_fd 3  flags 0x8
  sys_perf_event_open failed, error -13

Now:

  $ perf stat -vvv -e cycles,cache-misses ls
  ...
  sys_perf_event_open: pid 12858  cpu -1  group_fd -1  flags 0x8 = 3
  ...
  sys_perf_event_open: pid 12858  cpu -1  group_fd 3  flags 0x8
  sys_perf_event_open failed, error -13

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1479764011-10732-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index e58a2fbf3b16..b2365a63db45 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1481,7 +1481,7 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
 
 			group_fd = get_group_fd(evsel, cpu, thread);
 retry_open:
-			pr_debug2("sys_perf_event_open: pid %d  cpu %d  group_fd %d  flags %#lx\n",
+			pr_debug2("sys_perf_event_open: pid %d  cpu %d  group_fd %d  flags %#lx",
 				  pid, cpus->map[cpu], group_fd, flags);
 
 			FD(evsel, cpu, thread) = sys_perf_event_open(&evsel->attr,
@@ -1490,11 +1490,13 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
 								     group_fd, flags);
 			if (FD(evsel, cpu, thread) < 0) {
 				err = -errno;
-				pr_debug2("sys_perf_event_open failed, error %d\n",
+				pr_debug2("\nsys_perf_event_open failed, error %d\n",
 					  err);
 				goto try_fallback;
 			}
 
+			pr_debug2(" = %d\n", FD(evsel, cpu, thread));
+
 			if (evsel->bpf_fd >= 0) {
 				int evt_fd = FD(evsel, cpu, thread);
 				int bpf_fd = evsel->bpf_fd;
-- 
2.7.4

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

* [PATCH 07/18] perf c2c report: Setup browser after opening perf.data
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 06/18] perf tools: Show event fd in debug output Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 08/18] perf c2c report: Add -f/--force option Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Jiri Olsa, Andi Kleen, David Ahern,
	Don Zickus, Joe Mario, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

Because of the early browser switch we won't get possible error
messages, as it will clear the screen right after showing the message,
e.g.:

Before:

   $ sudo perf c2c report -d lcl
   $

After:
   $ sudo perf c2c report -d lcl
   File perf.data not owned by current user or root (use -f to override)
   $
   $ ls -la perf.data
   -rw-------. 1 acme acme 26648 Nov 22 15:11 perf.data
   $

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1479764011-10732-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-c2c.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index c6d0dda594d9..15addb06d611 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2535,13 +2535,6 @@ static int perf_c2c__report(int argc, const char **argv)
 	if (c2c.stats_only)
 		c2c.use_stdio = true;
 
-	if (c2c.use_stdio)
-		use_browser = 0;
-	else
-		use_browser = 1;
-
-	setup_browser(false);
-
 	if (!input_name || !strlen(input_name))
 		input_name = "perf.data";
 
@@ -2568,6 +2561,7 @@ static int perf_c2c__report(int argc, const char **argv)
 		pr_debug("No memory for session\n");
 		goto out;
 	}
+
 	err = setup_nodes(session);
 	if (err) {
 		pr_err("Failed setup nodes\n");
@@ -2587,6 +2581,13 @@ static int perf_c2c__report(int argc, const char **argv)
 		goto out_session;
 	}
 
+	if (c2c.use_stdio)
+		use_browser = 0;
+	else
+		use_browser = 1;
+
+	setup_browser(false);
+
 	err = perf_session__process_events(session);
 	if (err) {
 		pr_err("failed to process sample\n");
-- 
2.7.4

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

* [PATCH 08/18] perf c2c report: Add -f/--force option
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 07/18] perf c2c report: Setup browser after opening perf.data Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 09/18] perf c2c report: Add struct c2c_stats::tot_hitm field Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Jiri Olsa, Andi Kleen, David Ahern,
	Don Zickus, Joe Mario, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

Adding -f/--force option to go through ownership validation:

  $ sudo perf c2c report
  File perf.data not owned by current user or root (use -f to override)
  $
  $ sudo perf c2c report -f
  < c2c report output >
  $

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1479764011-10732-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-c2c.txt | 4 ++++
 tools/perf/builtin-c2c.c              | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Documentation/perf-c2c.txt b/tools/perf/Documentation/perf-c2c.txt
index 21810d711f5f..5eda9336267e 100644
--- a/tools/perf/Documentation/perf-c2c.txt
+++ b/tools/perf/Documentation/perf-c2c.txt
@@ -100,6 +100,10 @@ REPORT OPTIONS
 --show-all::
 	Show all captured HITM lines, with no regard to HITM % 0.0005 limit.
 
+-f::
+--force::
+	Don't do ownership validation.
+
 C2C RECORD
 ----------
 The perf c2c record command setup options related to HITM cacheline analysis
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 15addb06d611..d873977b8fb6 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2523,6 +2523,7 @@ static int perf_c2c__report(int argc, const char **argv)
 	OPT_STRING('d', "display", &display, NULL, "lcl,rmt"),
 	OPT_STRING('c', "coalesce", &coalesce, "coalesce fields",
 		   "coalesce fields: pid,tid,iaddr,dso"),
+	OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"),
 	OPT_END()
 	};
 	int err = 0;
@@ -2538,7 +2539,8 @@ static int perf_c2c__report(int argc, const char **argv)
 	if (!input_name || !strlen(input_name))
 		input_name = "perf.data";
 
-	file.path = input_name;
+	file.path  = input_name;
+	file.force = symbol_conf.force;
 
 	err = setup_display(display);
 	if (err)
-- 
2.7.4

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

* [PATCH 09/18] perf c2c report: Add struct c2c_stats::tot_hitm field
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 08/18] perf c2c report: Add -f/--force option Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 10/18] perf c2c report: Display total HITMs on default Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Jiri Olsa, Andi Kleen, David Ahern,
	Don Zickus, Joe Mario, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

Count total number of HITMs in a special field. This will ease up
addition of total HITM sorting into c2c report in the following patch.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1479764011-10732-5-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/mem-events.c | 12 ++++++++++--
 tools/perf/util/mem-events.h |  1 +
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
index e50773286ef6..1d4ab53c60ca 100644
--- a/tools/perf/util/mem-events.c
+++ b/tools/perf/util/mem-events.c
@@ -280,6 +280,12 @@ int c2c_decode_stats(struct c2c_stats *stats, struct mem_info *mi)
 	u64 lock   = data_src->mem_lock;
 	int err = 0;
 
+#define HITM_INC(__f)		\
+do {				\
+	stats->__f++;		\
+	stats->tot_hitm++;	\
+} while (0)
+
 #define P(a, b) PERF_MEM_##a##_##b
 
 	stats->nr_entries++;
@@ -303,7 +309,7 @@ int c2c_decode_stats(struct c2c_stats *stats, struct mem_info *mi)
 			if (lvl & P(LVL, L2 )) stats->ld_l2hit++;
 			if (lvl & P(LVL, L3 )) {
 				if (snoop & P(SNOOP, HITM))
-					stats->lcl_hitm++;
+					HITM_INC(lcl_hitm);
 				else
 					stats->ld_llchit++;
 			}
@@ -331,7 +337,7 @@ int c2c_decode_stats(struct c2c_stats *stats, struct mem_info *mi)
 			if (snoop & P(SNOOP, HIT))
 				stats->rmt_hit++;
 			else if (snoop & P(SNOOP, HITM))
-				stats->rmt_hitm++;
+				HITM_INC(rmt_hitm);
 		}
 
 		if ((lvl & P(LVL, MISS)))
@@ -364,6 +370,7 @@ int c2c_decode_stats(struct c2c_stats *stats, struct mem_info *mi)
 	}
 
 #undef P
+#undef HITM_INC
 	return err;
 }
 
@@ -390,6 +397,7 @@ void c2c_add_stats(struct c2c_stats *stats, struct c2c_stats *add)
 	stats->ld_llchit	+= add->ld_llchit;
 	stats->lcl_hitm		+= add->lcl_hitm;
 	stats->rmt_hitm		+= add->rmt_hitm;
+	stats->tot_hitm		+= add->tot_hitm;
 	stats->rmt_hit		+= add->rmt_hit;
 	stats->lcl_dram		+= add->lcl_dram;
 	stats->rmt_dram		+= add->rmt_dram;
diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h
index faf80403b519..40f72ee4f42a 100644
--- a/tools/perf/util/mem-events.h
+++ b/tools/perf/util/mem-events.h
@@ -59,6 +59,7 @@ struct c2c_stats {
 	u32	ld_llchit;           /* count of loads that hit LLC */
 	u32	lcl_hitm;            /* count of loads with local HITM  */
 	u32	rmt_hitm;            /* count of loads with remote HITM */
+	u32	tot_hitm;            /* count of loads with local and remote HITM */
 	u32	rmt_hit;             /* count of loads with remote hit clean; */
 	u32	lcl_dram;            /* count of loads miss to local DRAM */
 	u32	rmt_dram;            /* count of loads miss to remote DRAM */
-- 
2.7.4

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

* [PATCH 10/18] perf c2c report: Display total HITMs on default
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 09/18] perf c2c report: Add struct c2c_stats::tot_hitm field Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 11/18] perf c2c: Support cascading options Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Jiri Olsa, Andi Kleen, David Ahern,
	Don Zickus, Joe Mario, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

Currently we display the cacheline list sorted on remote HITMs by
default.

The problem is that they might not be always counted and 'perf c2c
report' displays an empty output. Thus it's more convenient to display
and sort the cacheline list based on the total of HITMs and have the
best change to see data in the default report run.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1479764011-10732-6-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-c2c.txt |  4 ++++
 tools/perf/builtin-c2c.c              | 39 ++++++++++++++++++++++++++++-------
 2 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/tools/perf/Documentation/perf-c2c.txt b/tools/perf/Documentation/perf-c2c.txt
index 5eda9336267e..3f06730c7f47 100644
--- a/tools/perf/Documentation/perf-c2c.txt
+++ b/tools/perf/Documentation/perf-c2c.txt
@@ -104,6 +104,10 @@ REPORT OPTIONS
 --force::
 	Don't do ownership validation.
 
+-d::
+--display::
+	Siwtch to HITM type (rmt, lcl) to display and sort on. Total HITMs as default.
+
 C2C RECORD
 ----------
 The perf c2c record command setup options related to HITM cacheline analysis
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index d873977b8fb6..54924717ae8e 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -91,6 +91,14 @@ struct perf_c2c {
 enum {
 	DISPLAY_LCL,
 	DISPLAY_RMT,
+	DISPLAY_TOT,
+	DISPLAY_MAX,
+};
+
+static const char *display_str[DISPLAY_MAX] = {
+	[DISPLAY_LCL] = "Local",
+	[DISPLAY_RMT] = "Remote",
+	[DISPLAY_TOT] = "Total",
 };
 
 static struct perf_c2c c2c;
@@ -745,6 +753,10 @@ static double percent_hitm(struct c2c_hist_entry *c2c_he)
 	case DISPLAY_LCL:
 		st  = stats->lcl_hitm;
 		tot = total->lcl_hitm;
+		break;
+	case DISPLAY_TOT:
+		st  = stats->tot_hitm;
+		tot = total->tot_hitm;
 	default:
 		break;
 	}
@@ -1044,6 +1056,9 @@ node_entry(struct perf_hpp_fmt *fmt __maybe_unused, struct perf_hpp *hpp,
 				break;
 			case DISPLAY_LCL:
 				DISPLAY_HITM(lcl_hitm);
+				break;
+			case DISPLAY_TOT:
+				DISPLAY_HITM(tot_hitm);
 			default:
 				break;
 			}
@@ -1351,6 +1366,7 @@ static struct c2c_dimension dim_tot_loads = {
 static struct c2c_header percent_hitm_header[] = {
 	[DISPLAY_LCL] = HEADER_BOTH("Lcl", "Hitm"),
 	[DISPLAY_RMT] = HEADER_BOTH("Rmt", "Hitm"),
+	[DISPLAY_TOT] = HEADER_BOTH("Tot", "Hitm"),
 };
 
 static struct c2c_dimension dim_percent_hitm = {
@@ -1794,6 +1810,9 @@ static bool he__display(struct hist_entry *he, struct c2c_stats *stats)
 		break;
 	case DISPLAY_RMT:
 		FILTER_HITM(rmt_hitm);
+		break;
+	case DISPLAY_TOT:
+		FILTER_HITM(tot_hitm);
 	default:
 		break;
 	};
@@ -1809,8 +1828,9 @@ static inline int valid_hitm_or_store(struct hist_entry *he)
 	bool has_hitm;
 
 	c2c_he = container_of(he, struct c2c_hist_entry, he);
-	has_hitm = c2c.display == DISPLAY_LCL ?
-		   c2c_he->stats.lcl_hitm : c2c_he->stats.rmt_hitm;
+	has_hitm = c2c.display == DISPLAY_TOT ? c2c_he->stats.tot_hitm :
+		   c2c.display == DISPLAY_LCL ? c2c_he->stats.lcl_hitm :
+						c2c_he->stats.rmt_hitm;
 	return has_hitm || c2c_he->stats.store;
 }
 
@@ -2095,7 +2115,7 @@ static void print_c2c_info(FILE *out, struct perf_session *session)
 		first = false;
 	}
 	fprintf(out, "  Cachelines sort on                : %s HITMs\n",
-		c2c.display == DISPLAY_LCL ? "Local" : "Remote");
+		display_str[c2c.display]);
 	fprintf(out, "  Cacheline data grouping           : %s\n", c2c.cl_sort);
 }
 
@@ -2250,7 +2270,7 @@ static int perf_c2c_browser__title(struct hist_browser *browser,
 		  "Shared Data Cache Line Table     "
 		  "(%lu entries, sorted on %s HITMs)",
 		  browser->nr_non_filtered_entries,
-		  c2c.display == DISPLAY_LCL ? "local" : "remote");
+		  display_str[c2c.display]);
 	return 0;
 }
 
@@ -2387,9 +2407,11 @@ static int setup_callchain(struct perf_evlist *evlist)
 
 static int setup_display(const char *str)
 {
-	const char *display = str ?: "rmt";
+	const char *display = str ?: "tot";
 
-	if (!strcmp(display, "rmt"))
+	if (!strcmp(display, "tot"))
+		c2c.display = DISPLAY_TOT;
+	else if (!strcmp(display, "rmt"))
 		c2c.display = DISPLAY_RMT;
 	else if (!strcmp(display, "lcl"))
 		c2c.display = DISPLAY_LCL;
@@ -2474,6 +2496,8 @@ static int setup_coalesce(const char *coalesce, bool no_source)
 		return -1;
 
 	if (asprintf(&c2c.cl_resort, "offset,%s",
+		     c2c.display == DISPLAY_TOT ?
+		     "tot_hitm" :
 		     c2c.display == DISPLAY_RMT ?
 		     "rmt_hitm,lcl_hitm" :
 		     "lcl_hitm,rmt_hitm") < 0)
@@ -2520,7 +2544,7 @@ static int perf_c2c__report(int argc, const char **argv)
 			     "print_type,threshold[,print_limit],order,sort_key[,branch],value",
 			     callchain_help, &parse_callchain_opt,
 			     callchain_default_opt),
-	OPT_STRING('d', "display", &display, NULL, "lcl,rmt"),
+	OPT_STRING('d', "display", &display, "Switch HITM output type", "lcl,rmt"),
 	OPT_STRING('c', "coalesce", &coalesce, "coalesce fields",
 		   "coalesce fields: pid,tid,iaddr,dso"),
 	OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"),
@@ -2608,6 +2632,7 @@ static int perf_c2c__report(int argc, const char **argv)
 			"tot_loads,"
 			"ld_fbhit,ld_l1hit,ld_l2hit,"
 			"ld_lclhit,ld_rmthit",
+			c2c.display == DISPLAY_TOT ? "tot_hitm" :
 			c2c.display == DISPLAY_LCL ? "lcl_hitm" : "rmt_hitm"
 			);
 
-- 
2.7.4

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

* [PATCH 11/18] perf c2c: Support cascading options
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 10/18] perf c2c report: Display total HITMs on default Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 12/18] perf symbols: Print symbol offsets conditionally Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Jiri Olsa, Andi Kleen, David Ahern,
	Don Zickus, Joe Mario, Namhyung Kim, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Jiri Olsa <jolsa@kernel.org>

Adding support for cascading options added by Namhyung in:

  commit 369a2478973a ("tools lib subcmd: Support cascading options")

This way the report and record command share options with with c2c
command and can save some option duplicates. For now it's the 'v'
option.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1479764011-10732-7-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-c2c.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 54924717ae8e..4b419631753d 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -101,6 +101,11 @@ static const char *display_str[DISPLAY_MAX] = {
 	[DISPLAY_TOT] = "Total",
 };
 
+static const struct option c2c_options[] = {
+	OPT_INCR('v', "verbose", &verbose, "be more verbose (show counter open errors, etc)"),
+	OPT_END()
+};
+
 static struct perf_c2c c2c;
 
 static void *c2c_he_zalloc(size_t size)
@@ -2520,11 +2525,9 @@ static int perf_c2c__report(int argc, const char **argv)
 	const char *display = NULL;
 	const char *coalesce = NULL;
 	bool no_source = false;
-	const struct option c2c_options[] = {
+	const struct option options[] = {
 	OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
 		   "file", "vmlinux pathname"),
-	OPT_INCR('v', "verbose", &verbose,
-		 "be more verbose (show counter open errors, etc)"),
 	OPT_STRING('i', "input", &input_name, "file",
 		   "the input file to process"),
 	OPT_INCR('N', "node-info", &c2c.node_info,
@@ -2548,14 +2551,15 @@ static int perf_c2c__report(int argc, const char **argv)
 	OPT_STRING('c', "coalesce", &coalesce, "coalesce fields",
 		   "coalesce fields: pid,tid,iaddr,dso"),
 	OPT_BOOLEAN('f', "force", &symbol_conf.force, "don't complain, do it"),
+	OPT_PARENT(c2c_options),
 	OPT_END()
 	};
 	int err = 0;
 
-	argc = parse_options(argc, argv, c2c_options, report_c2c_usage,
+	argc = parse_options(argc, argv, options, report_c2c_usage,
 			     PARSE_OPT_STOP_AT_NON_OPTION);
 	if (argc)
-		usage_with_options(report_c2c_usage, c2c_options);
+		usage_with_options(report_c2c_usage, options);
 
 	if (c2c.stats_only)
 		c2c.use_stdio = true;
@@ -2683,11 +2687,10 @@ static int perf_c2c__record(int argc, const char **argv)
 	OPT_CALLBACK('e', "event", &event_set, "event",
 		     "event selector. Use 'perf mem record -e list' to list available events",
 		     parse_record_events),
-	OPT_INCR('v', "verbose", &verbose,
-		 "be more verbose (show counter open errors, etc)"),
 	OPT_BOOLEAN('u', "all-user", &all_user, "collect only user level data"),
 	OPT_BOOLEAN('k', "all-kernel", &all_kernel, "collect only kernel level data"),
 	OPT_UINTEGER('l', "ldlat", &perf_mem_events__loads_ldlat, "setup mem-loads latency"),
+	OPT_PARENT(c2c_options),
 	OPT_END()
 	};
 
@@ -2759,11 +2762,6 @@ static int perf_c2c__record(int argc, const char **argv)
 
 int cmd_c2c(int argc, const char **argv, const char *prefix __maybe_unused)
 {
-	const struct option c2c_options[] = {
-	OPT_INCR('v', "verbose", &verbose, "be more verbose"),
-	OPT_END()
-	};
-
 	argc = parse_options(argc, argv, c2c_options, c2c_usage,
 			     PARSE_OPT_STOP_AT_NON_OPTION);
 
-- 
2.7.4

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

* [PATCH 12/18] perf symbols: Print symbol offsets conditionally
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 11/18] perf c2c: Support cascading options Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 13/18] perf evsel: Support printing callchains with arrows Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Andi Kleen, David Ahern,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

The __symbol__fprintf_symname_offs() always shows symbol offsets.  So
there's no difference between 'perf script -F ip,sym' and 'perf script
-F ip,sym,symoff'.  I don't think it's a desired behavior..

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20161116060634.28477-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel_fprintf.c  |  6 ++++--
 tools/perf/util/symbol.h         |  3 ++-
 tools/perf/util/symbol_fprintf.c | 11 ++++++-----
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c
index 662a0a6182e7..ccb602397b60 100644
--- a/tools/perf/util/evsel_fprintf.c
+++ b/tools/perf/util/evsel_fprintf.c
@@ -137,7 +137,8 @@ int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
 
 				if (print_symoffset) {
 					printed += __symbol__fprintf_symname_offs(node->sym, &node_al,
-										  print_unknown_as_addr, fp);
+										  print_unknown_as_addr,
+										  true, fp);
 				} else {
 					printed += __symbol__fprintf_symname(node->sym, &node_al,
 									     print_unknown_as_addr, fp);
@@ -188,7 +189,8 @@ int sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al,
 			printed += fprintf(fp, " ");
 			if (print_symoffset) {
 				printed += __symbol__fprintf_symname_offs(al->sym, al,
-									  print_unknown_as_addr, fp);
+									  print_unknown_as_addr,
+									  true, fp);
 			} else {
 				printed += __symbol__fprintf_symname(al->sym, al,
 								     print_unknown_as_addr, fp);
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 2d0a905c879a..dec7e2d44885 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -282,7 +282,8 @@ int symbol__annotation_init(void);
 struct symbol *symbol__new(u64 start, u64 len, u8 binding, const char *name);
 size_t __symbol__fprintf_symname_offs(const struct symbol *sym,
 				      const struct addr_location *al,
-				      bool unknown_as_addr, FILE *fp);
+				      bool unknown_as_addr,
+				      bool print_offsets, FILE *fp);
 size_t symbol__fprintf_symname_offs(const struct symbol *sym,
 				    const struct addr_location *al, FILE *fp);
 size_t __symbol__fprintf_symname(const struct symbol *sym,
diff --git a/tools/perf/util/symbol_fprintf.c b/tools/perf/util/symbol_fprintf.c
index a680bdaa65dc..7c6b33e8e2d2 100644
--- a/tools/perf/util/symbol_fprintf.c
+++ b/tools/perf/util/symbol_fprintf.c
@@ -15,14 +15,15 @@ size_t symbol__fprintf(struct symbol *sym, FILE *fp)
 
 size_t __symbol__fprintf_symname_offs(const struct symbol *sym,
 				      const struct addr_location *al,
-				      bool unknown_as_addr, FILE *fp)
+				      bool unknown_as_addr,
+				      bool print_offsets, FILE *fp)
 {
 	unsigned long offset;
 	size_t length;
 
 	if (sym && sym->name) {
 		length = fprintf(fp, "%s", sym->name);
-		if (al) {
+		if (al && print_offsets) {
 			if (al->addr < sym->end)
 				offset = al->addr - sym->start;
 			else
@@ -40,19 +41,19 @@ size_t symbol__fprintf_symname_offs(const struct symbol *sym,
 				    const struct addr_location *al,
 				    FILE *fp)
 {
-	return __symbol__fprintf_symname_offs(sym, al, false, fp);
+	return __symbol__fprintf_symname_offs(sym, al, false, true, fp);
 }
 
 size_t __symbol__fprintf_symname(const struct symbol *sym,
 				 const struct addr_location *al,
 				 bool unknown_as_addr, FILE *fp)
 {
-	return __symbol__fprintf_symname_offs(sym, al, unknown_as_addr, fp);
+	return __symbol__fprintf_symname_offs(sym, al, unknown_as_addr, false, fp);
 }
 
 size_t symbol__fprintf_symname(const struct symbol *sym, FILE *fp)
 {
-	return __symbol__fprintf_symname_offs(sym, NULL, false, fp);
+	return __symbol__fprintf_symname_offs(sym, NULL, false, false, fp);
 }
 
 size_t dso__fprintf_symbols_by_name(struct dso *dso,
-- 
2.7.4

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

* [PATCH 13/18] perf evsel: Support printing callchains with arrows
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 12/18] perf symbols: Print symbol offsets conditionally Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 14/18] perf sched timehist: Introduce timehist command Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Andi Kleen, David Ahern,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

The EVSEL__PRINT_CALLCHAIN_ARROW options can be used to print callchains
with arrows for readability.  It will be used 'sched timehist' command
like below:

    __schedule <- schedule <- schedule_timeout <- rcu_gp_kthread <- kthread <- ret_from_fork
    __schedule <- schedule <- schedule_timeout <- rcu_gp_kthread <- kthread <- ret_from_fork
    __schedule <- schedule <- worker_thread <- kthread <- ret_from_fork

Suggested-and-Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20161116060634.28477-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.h         | 1 +
 tools/perf/util/evsel_fprintf.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 8cd7cd227483..27fa3a343577 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -391,6 +391,7 @@ int perf_evsel__fprintf(struct perf_evsel *evsel,
 #define EVSEL__PRINT_ONELINE		(1<<4)
 #define EVSEL__PRINT_SRCLINE		(1<<5)
 #define EVSEL__PRINT_UNKNOWN_AS_ADDR	(1<<6)
+#define EVSEL__PRINT_CALLCHAIN_ARROW	(1<<7)
 
 struct callchain_cursor;
 
diff --git a/tools/perf/util/evsel_fprintf.c b/tools/perf/util/evsel_fprintf.c
index ccb602397b60..53bb614feafb 100644
--- a/tools/perf/util/evsel_fprintf.c
+++ b/tools/perf/util/evsel_fprintf.c
@@ -108,7 +108,9 @@ int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
 	int print_oneline = print_opts & EVSEL__PRINT_ONELINE;
 	int print_srcline = print_opts & EVSEL__PRINT_SRCLINE;
 	int print_unknown_as_addr = print_opts & EVSEL__PRINT_UNKNOWN_AS_ADDR;
+	int print_arrow = print_opts & EVSEL__PRINT_CALLCHAIN_ARROW;
 	char s = print_oneline ? ' ' : '\t';
+	bool first = true;
 
 	if (sample->callchain) {
 		struct addr_location node_al;
@@ -124,6 +126,9 @@ int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
 
 			printed += fprintf(fp, "%-*.*s", left_alignment, left_alignment, " ");
 
+			if (print_arrow && !first)
+				printed += fprintf(fp, " <-");
+
 			if (print_ip)
 				printed += fprintf(fp, "%c%16" PRIx64, s, node->ip);
 
@@ -158,6 +163,7 @@ int sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,
 				printed += fprintf(fp, "\n");
 
 			callchain_cursor_advance(cursor);
+			first = false;
 		}
 	}
 
-- 
2.7.4

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

* [PATCH 14/18] perf sched timehist: Introduce timehist command
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 13/18] perf evsel: Support printing callchains with arrows Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 15/18] perf sched timehist: Add summary options Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Namhyung Kim, Andi Kleen,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

From: David Ahern <dsahern@gmail.com>

'perf sched timehist' provides an analysis of scheduling events.

Example usage:
    perf sched record -- sleep 1
    perf sched timehist

By default it shows the individual schedule events, including the wait
time (time between sched-out and next sched-in events for the task), the
task scheduling delay (time between wakeup and actually running) and run
time for the task:

            time    cpu  task name             wait time  sch delay   run time
                         [tid/pid]                (msec)     (msec)     (msec)
  -------------- ------  --------------------  ---------  ---------  ---------
    79371.874569 [0011]  gcc[31949]                0.014      0.000      1.148
    79371.874591 [0010]  gcc[31951]                0.000      0.000      0.024
    79371.874603 [0010]  migration/10[59]          3.350      0.004      0.011
    79371.874604 [0011]  <idle>                    1.148      0.000      0.035
    79371.874723 [0005]  <idle>                    0.016      0.000      1.383
    79371.874746 [0005]  gcc[31949]                0.153      0.078      0.022
...

Times are in msec.usec.

Committer note:

Add above explanation as the 'perf sched timehist' entry for 'man
perf-sched'.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20161116060634.28477-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-sched.txt |  50 ++-
 tools/perf/builtin-sched.c              | 594 +++++++++++++++++++++++++++++++-
 2 files changed, 637 insertions(+), 7 deletions(-)

diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt
index 1cc08cc47ac5..72730da307b9 100644
--- a/tools/perf/Documentation/perf-sched.txt
+++ b/tools/perf/Documentation/perf-sched.txt
@@ -8,11 +8,11 @@ perf-sched - Tool to trace/measure scheduler properties (latencies)
 SYNOPSIS
 --------
 [verse]
-'perf sched' {record|latency|map|replay|script}
+'perf sched' {record|latency|map|replay|script|timehist}
 
 DESCRIPTION
 -----------
-There are five variants of perf sched:
+There are several variants of 'perf sched':
 
   'perf sched record <command>' to record the scheduling events
   of an arbitrary workload.
@@ -36,6 +36,30 @@ There are five variants of perf sched:
   are running on a CPU. A '*' denotes the CPU that had the event, and
   a dot signals an idle CPU.
 
+  'perf sched timehist' provides an analysis of scheduling events.
+    
+    Example usage:
+        perf sched record -- sleep 1
+        perf sched timehist
+    
+   By default it shows the individual schedule events, including the wait
+   time (time between sched-out and next sched-in events for the task), the
+   task scheduling delay (time between wakeup and actually running) and run
+   time for the task:
+    
+                time    cpu  task name             wait time  sch delay   run time
+                             [tid/pid]                (msec)     (msec)     (msec)
+      -------------- ------  --------------------  ---------  ---------  ---------
+        79371.874569 [0011]  gcc[31949]                0.014      0.000      1.148
+        79371.874591 [0010]  gcc[31951]                0.000      0.000      0.024
+        79371.874603 [0010]  migration/10[59]          3.350      0.004      0.011
+        79371.874604 [0011]  <idle>                    1.148      0.000      0.035
+        79371.874723 [0005]  <idle>                    0.016      0.000      1.383
+        79371.874746 [0005]  gcc[31949]                0.153      0.078      0.022
+    ...
+    
+   Times are in msec.usec.
+
 OPTIONS
 -------
 -i::
@@ -66,6 +90,28 @@ OPTIONS for 'perf sched map'
 --color-pids::
 	Highlight the given pids.
 
+OPTIONS for 'perf sched timehist'
+---------------------------------
+-k::
+--vmlinux=<file>::
+    vmlinux pathname
+
+--kallsyms=<file>::
+    kallsyms pathname
+
+-s::
+--summary::
+    Show only a summary of scheduling by thread with min, max, and average
+    run times (in sec) and relative stddev.
+
+-S::
+--with-summary::
+    Show all scheduling events followed by a summary by thread with min,
+    max, and average run times (in sec) and relative stddev.
+
+--symfs=<directory>::
+    Look for files with symbols relative to this directory.
+
 SEE ALSO
 --------
 linkperf:perf-record[1]
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index fb3441211e4b..c0ac0c9557e8 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -13,12 +13,14 @@
 #include "util/cloexec.h"
 #include "util/thread_map.h"
 #include "util/color.h"
+#include "util/stat.h"
 
 #include <subcmd/parse-options.h>
 #include "util/trace-event.h"
 
 #include "util/debug.h"
 
+#include <linux/log2.h>
 #include <sys/prctl.h>
 #include <sys/resource.h>
 
@@ -194,6 +196,29 @@ struct perf_sched {
 	struct perf_sched_map map;
 };
 
+/* per thread run time data */
+struct thread_runtime {
+	u64 last_time;      /* time of previous sched in/out event */
+	u64 dt_run;         /* run time */
+	u64 dt_wait;        /* time between CPU access (off cpu) */
+	u64 dt_delay;       /* time between wakeup and sched-in */
+	u64 ready_to_run;   /* time of wakeup */
+
+	struct stats run_stats;
+	u64 total_run_time;
+};
+
+/* per event run time data */
+struct evsel_runtime {
+	u64 *last_time; /* time this event was last seen per cpu */
+	u32 ncpu;       /* highest cpu slot allocated */
+};
+
+/* track idle times per cpu */
+static struct thread **idle_threads;
+static int idle_max_cpu;
+static char idle_comm[] = "<idle>";
+
 static u64 get_nsecs(void)
 {
 	struct timespec ts;
@@ -1654,6 +1679,546 @@ static int perf_sched__read_events(struct perf_sched *sched)
 	return rc;
 }
 
+/*
+ * scheduling times are printed as msec.usec
+ */
+static inline void print_sched_time(unsigned long long nsecs, int width)
+{
+	unsigned long msecs;
+	unsigned long usecs;
+
+	msecs  = nsecs / NSEC_PER_MSEC;
+	nsecs -= msecs * NSEC_PER_MSEC;
+	usecs  = nsecs / NSEC_PER_USEC;
+	printf("%*lu.%03lu ", width, msecs, usecs);
+}
+
+/*
+ * returns runtime data for event, allocating memory for it the
+ * first time it is used.
+ */
+static struct evsel_runtime *perf_evsel__get_runtime(struct perf_evsel *evsel)
+{
+	struct evsel_runtime *r = evsel->priv;
+
+	if (r == NULL) {
+		r = zalloc(sizeof(struct evsel_runtime));
+		evsel->priv = r;
+	}
+
+	return r;
+}
+
+/*
+ * save last time event was seen per cpu
+ */
+static void perf_evsel__save_time(struct perf_evsel *evsel,
+				  u64 timestamp, u32 cpu)
+{
+	struct evsel_runtime *r = perf_evsel__get_runtime(evsel);
+
+	if (r == NULL)
+		return;
+
+	if ((cpu >= r->ncpu) || (r->last_time == NULL)) {
+		int i, n = __roundup_pow_of_two(cpu+1);
+		void *p = r->last_time;
+
+		p = realloc(r->last_time, n * sizeof(u64));
+		if (!p)
+			return;
+
+		r->last_time = p;
+		for (i = r->ncpu; i < n; ++i)
+			r->last_time[i] = (u64) 0;
+
+		r->ncpu = n;
+	}
+
+	r->last_time[cpu] = timestamp;
+}
+
+/* returns last time this event was seen on the given cpu */
+static u64 perf_evsel__get_time(struct perf_evsel *evsel, u32 cpu)
+{
+	struct evsel_runtime *r = perf_evsel__get_runtime(evsel);
+
+	if ((r == NULL) || (r->last_time == NULL) || (cpu >= r->ncpu))
+		return 0;
+
+	return r->last_time[cpu];
+}
+
+static int comm_width = 20;
+
+static char *timehist_get_commstr(struct thread *thread)
+{
+	static char str[32];
+	const char *comm = thread__comm_str(thread);
+	pid_t tid = thread->tid;
+	pid_t pid = thread->pid_;
+	int n;
+
+	if (pid == 0)
+		n = scnprintf(str, sizeof(str), "%s", comm);
+
+	else if (tid != pid)
+		n = scnprintf(str, sizeof(str), "%s[%d/%d]", comm, tid, pid);
+
+	else
+		n = scnprintf(str, sizeof(str), "%s[%d]", comm, tid);
+
+	if (n > comm_width)
+		comm_width = n;
+
+	return str;
+}
+
+static void timehist_header(void)
+{
+	printf("%15s %6s ", "time", "cpu");
+
+	printf(" %-20s  %9s  %9s  %9s",
+		"task name", "wait time", "sch delay", "run time");
+
+	printf("\n");
+
+	/*
+	 * units row
+	 */
+	printf("%15s %-6s ", "", "");
+
+	printf(" %-20s  %9s  %9s  %9s\n", "[tid/pid]", "(msec)", "(msec)", "(msec)");
+
+	/*
+	 * separator
+	 */
+	printf("%.15s %.6s ", graph_dotted_line, graph_dotted_line);
+
+	printf(" %.20s  %.9s  %.9s  %.9s",
+		graph_dotted_line, graph_dotted_line, graph_dotted_line,
+		graph_dotted_line);
+
+	printf("\n");
+}
+
+static void timehist_print_sample(struct perf_sample *sample,
+				  struct thread *thread)
+{
+	struct thread_runtime *tr = thread__priv(thread);
+	char tstr[64];
+
+	timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr));
+	printf("%15s [%04d] ", tstr, sample->cpu);
+
+	printf(" %-*s ", comm_width, timehist_get_commstr(thread));
+
+	print_sched_time(tr->dt_wait, 6);
+	print_sched_time(tr->dt_delay, 6);
+	print_sched_time(tr->dt_run, 6);
+	printf("\n");
+}
+
+/*
+ * Explanation of delta-time stats:
+ *
+ *            t = time of current schedule out event
+ *        tprev = time of previous sched out event
+ *                also time of schedule-in event for current task
+ *    last_time = time of last sched change event for current task
+ *                (i.e, time process was last scheduled out)
+ * ready_to_run = time of wakeup for current task
+ *
+ * -----|------------|------------|------------|------
+ *    last         ready        tprev          t
+ *    time         to run
+ *
+ *      |-------- dt_wait --------|
+ *                   |- dt_delay -|-- dt_run --|
+ *
+ *   dt_run = run time of current task
+ *  dt_wait = time between last schedule out event for task and tprev
+ *            represents time spent off the cpu
+ * dt_delay = time between wakeup and schedule-in of task
+ */
+
+static void timehist_update_runtime_stats(struct thread_runtime *r,
+					 u64 t, u64 tprev)
+{
+	r->dt_delay   = 0;
+	r->dt_wait    = 0;
+	r->dt_run     = 0;
+	if (tprev) {
+		r->dt_run = t - tprev;
+		if (r->ready_to_run) {
+			if (r->ready_to_run > tprev)
+				pr_debug("time travel: wakeup time for task > previous sched_switch event\n");
+			else
+				r->dt_delay = tprev - r->ready_to_run;
+		}
+
+		if (r->last_time > tprev)
+			pr_debug("time travel: last sched out time for task > previous sched_switch event\n");
+		else if (r->last_time)
+			r->dt_wait = tprev - r->last_time;
+	}
+
+	update_stats(&r->run_stats, r->dt_run);
+	r->total_run_time += r->dt_run;
+}
+
+static bool is_idle_sample(struct perf_sample *sample,
+			   struct perf_evsel *evsel)
+{
+	/* pid 0 == swapper == idle task */
+	if (sample->pid == 0)
+		return true;
+
+	if (strcmp(perf_evsel__name(evsel), "sched:sched_switch") == 0) {
+		if (perf_evsel__intval(evsel, sample, "prev_pid") == 0)
+			return true;
+	}
+	return false;
+}
+
+/*
+ * Track idle stats per cpu by maintaining a local thread
+ * struct for the idle task on each cpu.
+ */
+static int init_idle_threads(int ncpu)
+{
+	int i;
+
+	idle_threads = zalloc(ncpu * sizeof(struct thread *));
+	if (!idle_threads)
+		return -ENOMEM;
+
+	idle_max_cpu = ncpu - 1;
+
+	/* allocate the actual thread struct if needed */
+	for (i = 0; i < ncpu; ++i) {
+		idle_threads[i] = thread__new(0, 0);
+		if (idle_threads[i] == NULL)
+			return -ENOMEM;
+
+		thread__set_comm(idle_threads[i], idle_comm, 0);
+	}
+
+	return 0;
+}
+
+static void free_idle_threads(void)
+{
+	int i;
+
+	if (idle_threads == NULL)
+		return;
+
+	for (i = 0; i <= idle_max_cpu; ++i) {
+		if ((idle_threads[i]))
+			thread__delete(idle_threads[i]);
+	}
+
+	free(idle_threads);
+}
+
+static struct thread *get_idle_thread(int cpu)
+{
+	/*
+	 * expand/allocate array of pointers to local thread
+	 * structs if needed
+	 */
+	if ((cpu >= idle_max_cpu) || (idle_threads == NULL)) {
+		int i, j = __roundup_pow_of_two(cpu+1);
+		void *p;
+
+		p = realloc(idle_threads, j * sizeof(struct thread *));
+		if (!p)
+			return NULL;
+
+		idle_threads = (struct thread **) p;
+		i = idle_max_cpu ? idle_max_cpu + 1 : 0;
+		for (; i < j; ++i)
+			idle_threads[i] = NULL;
+
+		idle_max_cpu = j;
+	}
+
+	/* allocate a new thread struct if needed */
+	if (idle_threads[cpu] == NULL) {
+		idle_threads[cpu] = thread__new(0, 0);
+
+		if (idle_threads[cpu]) {
+			idle_threads[cpu]->tid = 0;
+			thread__set_comm(idle_threads[cpu], idle_comm, 0);
+		}
+	}
+
+	return idle_threads[cpu];
+}
+
+/*
+ * handle runtime stats saved per thread
+ */
+static struct thread_runtime *thread__init_runtime(struct thread *thread)
+{
+	struct thread_runtime *r;
+
+	r = zalloc(sizeof(struct thread_runtime));
+	if (!r)
+		return NULL;
+
+	init_stats(&r->run_stats);
+	thread__set_priv(thread, r);
+
+	return r;
+}
+
+static struct thread_runtime *thread__get_runtime(struct thread *thread)
+{
+	struct thread_runtime *tr;
+
+	tr = thread__priv(thread);
+	if (tr == NULL) {
+		tr = thread__init_runtime(thread);
+		if (tr == NULL)
+			pr_debug("Failed to malloc memory for runtime data.\n");
+	}
+
+	return tr;
+}
+
+static struct thread *timehist_get_thread(struct perf_sample *sample,
+					  struct machine *machine,
+					  struct perf_evsel *evsel)
+{
+	struct thread *thread;
+
+	if (is_idle_sample(sample, evsel)) {
+		thread = get_idle_thread(sample->cpu);
+		if (thread == NULL)
+			pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu);
+
+	} else {
+		thread = machine__findnew_thread(machine, sample->pid, sample->tid);
+		if (thread == NULL) {
+			pr_debug("Failed to get thread for tid %d. skipping sample.\n",
+				 sample->tid);
+		}
+	}
+
+	return thread;
+}
+
+static bool timehist_skip_sample(struct thread *thread)
+{
+	bool rc = false;
+
+	if (thread__is_filtered(thread))
+		rc = true;
+
+	return rc;
+}
+
+static int timehist_sched_wakeup_event(struct perf_tool *tool __maybe_unused,
+				       union perf_event *event __maybe_unused,
+				       struct perf_evsel *evsel,
+				       struct perf_sample *sample,
+				       struct machine *machine)
+{
+	struct thread *thread;
+	struct thread_runtime *tr = NULL;
+	/* want pid of awakened task not pid in sample */
+	const u32 pid = perf_evsel__intval(evsel, sample, "pid");
+
+	thread = machine__findnew_thread(machine, 0, pid);
+	if (thread == NULL)
+		return -1;
+
+	tr = thread__get_runtime(thread);
+	if (tr == NULL)
+		return -1;
+
+	if (tr->ready_to_run == 0)
+		tr->ready_to_run = sample->time;
+
+	return 0;
+}
+
+static int timehist_sched_change_event(struct perf_tool *tool __maybe_unused,
+				       union perf_event *event,
+				       struct perf_evsel *evsel,
+				       struct perf_sample *sample,
+				       struct machine *machine)
+{
+	struct addr_location al;
+	struct thread *thread;
+	struct thread_runtime *tr = NULL;
+	u64 tprev;
+	int rc = 0;
+
+	if (machine__resolve(machine, &al, sample) < 0) {
+		pr_err("problem processing %d event. skipping it\n",
+		       event->header.type);
+		rc = -1;
+		goto out;
+	}
+
+	thread = timehist_get_thread(sample, machine, evsel);
+	if (thread == NULL) {
+		rc = -1;
+		goto out;
+	}
+
+	if (timehist_skip_sample(thread))
+		goto out;
+
+	tr = thread__get_runtime(thread);
+	if (tr == NULL) {
+		rc = -1;
+		goto out;
+	}
+
+	tprev = perf_evsel__get_time(evsel, sample->cpu);
+
+	timehist_update_runtime_stats(tr, sample->time, tprev);
+	timehist_print_sample(sample, thread);
+
+out:
+	if (tr) {
+		/* time of this sched_switch event becomes last time task seen */
+		tr->last_time = sample->time;
+
+		/* sched out event for task so reset ready to run time */
+		tr->ready_to_run = 0;
+	}
+
+	perf_evsel__save_time(evsel, sample->time, sample->cpu);
+
+	return rc;
+}
+
+static int timehist_sched_switch_event(struct perf_tool *tool,
+			     union perf_event *event,
+			     struct perf_evsel *evsel,
+			     struct perf_sample *sample,
+			     struct machine *machine __maybe_unused)
+{
+	return timehist_sched_change_event(tool, event, evsel, sample, machine);
+}
+
+static int process_lost(struct perf_tool *tool __maybe_unused,
+			union perf_event *event,
+			struct perf_sample *sample,
+			struct machine *machine __maybe_unused)
+{
+	char tstr[64];
+
+	timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr));
+	printf("%15s ", tstr);
+	printf("lost %" PRIu64 " events on cpu %d\n", event->lost.lost, sample->cpu);
+
+	return 0;
+}
+
+
+typedef int (*sched_handler)(struct perf_tool *tool,
+			  union perf_event *event,
+			  struct perf_evsel *evsel,
+			  struct perf_sample *sample,
+			  struct machine *machine);
+
+static int perf_timehist__process_sample(struct perf_tool *tool,
+					 union perf_event *event,
+					 struct perf_sample *sample,
+					 struct perf_evsel *evsel,
+					 struct machine *machine)
+{
+	struct perf_sched *sched = container_of(tool, struct perf_sched, tool);
+	int err = 0;
+	int this_cpu = sample->cpu;
+
+	if (this_cpu > sched->max_cpu)
+		sched->max_cpu = this_cpu;
+
+	if (evsel->handler != NULL) {
+		sched_handler f = evsel->handler;
+
+		err = f(tool, event, evsel, sample, machine);
+	}
+
+	return err;
+}
+
+static int perf_sched__timehist(struct perf_sched *sched)
+{
+	const struct perf_evsel_str_handler handlers[] = {
+		{ "sched:sched_switch",       timehist_sched_switch_event, },
+		{ "sched:sched_wakeup",	      timehist_sched_wakeup_event, },
+		{ "sched:sched_wakeup_new",   timehist_sched_wakeup_event, },
+	};
+	struct perf_data_file file = {
+		.path = input_name,
+		.mode = PERF_DATA_MODE_READ,
+	};
+
+	struct perf_session *session;
+	int err = -1;
+
+	/*
+	 * event handlers for timehist option
+	 */
+	sched->tool.sample	 = perf_timehist__process_sample;
+	sched->tool.mmap	 = perf_event__process_mmap;
+	sched->tool.comm	 = perf_event__process_comm;
+	sched->tool.exit	 = perf_event__process_exit;
+	sched->tool.fork	 = perf_event__process_fork;
+	sched->tool.lost	 = process_lost;
+	sched->tool.attr	 = perf_event__process_attr;
+	sched->tool.tracing_data = perf_event__process_tracing_data;
+	sched->tool.build_id	 = perf_event__process_build_id;
+
+	sched->tool.ordered_events = true;
+	sched->tool.ordering_requires_timestamps = true;
+
+	session = perf_session__new(&file, false, &sched->tool);
+	if (session == NULL)
+		return -ENOMEM;
+
+	symbol__init(&session->header.env);
+
+	setup_pager();
+
+	/* setup per-evsel handlers */
+	if (perf_session__set_tracepoints_handlers(session, handlers))
+		goto out;
+
+	if (!perf_session__has_traces(session, "record -R"))
+		goto out;
+
+	/* pre-allocate struct for per-CPU idle stats */
+	sched->max_cpu = session->header.env.nr_cpus_online;
+	if (sched->max_cpu == 0)
+		sched->max_cpu = 4;
+	if (init_idle_threads(sched->max_cpu))
+		goto out;
+
+	timehist_header();
+
+	err = perf_session__process_events(session);
+	if (err) {
+		pr_err("Failed to process events, error %d", err);
+		goto out;
+	}
+
+out:
+	free_idle_threads();
+	perf_session__delete(session);
+
+	return err;
+}
+
+
 static void print_bad_events(struct perf_sched *sched)
 {
 	if (sched->nr_unordered_timestamps && sched->nr_timestamps) {
@@ -1970,8 +2535,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 	const struct option latency_options[] = {
 	OPT_STRING('s', "sort", &sched.sort_order, "key[,key2...]",
 		   "sort by key(s): runtime, switch, avg, max"),
-	OPT_INCR('v', "verbose", &verbose,
-		    "be more verbose (show symbol address, etc)"),
 	OPT_INTEGER('C', "CPU", &sched.profile_cpu,
 		    "CPU to profile on"),
 	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
@@ -1983,8 +2546,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 	const struct option replay_options[] = {
 	OPT_UINTEGER('r', "repeat", &sched.replay_repeat,
 		     "repeat the workload replay N times (-1: infinite)"),
-	OPT_INCR('v', "verbose", &verbose,
-		    "be more verbose (show symbol address, etc)"),
 	OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
 		    "dump raw trace in ASCII"),
 	OPT_BOOLEAN('f', "force", &sched.force, "don't complain, do it"),
@@ -2001,6 +2562,16 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
                     "display given CPUs in map"),
 	OPT_PARENT(sched_options)
 	};
+	const struct option timehist_options[] = {
+	OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
+		   "file", "vmlinux pathname"),
+	OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name,
+		   "file", "kallsyms pathname"),
+	OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
+		    "Look for files with symbols relative to this directory"),
+	OPT_PARENT(sched_options)
+	};
+
 	const char * const latency_usage[] = {
 		"perf sched latency [<options>]",
 		NULL
@@ -2013,8 +2584,13 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		"perf sched map [<options>]",
 		NULL
 	};
+	const char * const timehist_usage[] = {
+		"perf sched timehist [<options>]",
+		NULL
+	};
 	const char *const sched_subcommands[] = { "record", "latency", "map",
-						  "replay", "script", NULL };
+						  "replay", "script",
+						  "timehist", NULL };
 	const char *sched_usage[] = {
 		NULL,
 		NULL
@@ -2077,6 +2653,14 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 				usage_with_options(replay_usage, replay_options);
 		}
 		return perf_sched__replay(&sched);
+	} else if (!strcmp(argv[0], "timehist")) {
+		if (argc) {
+			argc = parse_options(argc, argv, timehist_options,
+					     timehist_usage, 0);
+			if (argc)
+				usage_with_options(timehist_usage, timehist_options);
+		}
+		return perf_sched__timehist(&sched);
 	} else {
 		usage_with_options(sched_usage, sched_options);
 	}
-- 
2.7.4

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

* [PATCH 15/18] perf sched timehist: Add summary options
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (13 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 14/18] perf sched timehist: Introduce timehist command Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 16/18] perf sched timehist: Add -w/--wakeups option Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Namhyung Kim, Andi Kleen,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

From: David Ahern <dsahern@gmail.com>

The -s/--summary option is to show process runtime statistics.  And the
 -S/--with-summary option is to show the stats with the normal output.

  $ perf sched timehist -s

  Runtime summary
                            comm  parent   sched-in     run-time    min-run     avg-run     max-run  stddev
                                            (count)       (msec)     (msec)      (msec)      (msec)       %
  ---------------------------------------------------------------------------------------------------------
                  ksoftirqd/0[3]       2          2        0.011      0.004       0.005       0.006   14.87
                  rcu_preempt[7]       2         11        0.071      0.002       0.006       0.017   20.23
                  watchdog/0[11]       2          1        0.002      0.002       0.002       0.002    0.00
                  watchdog/1[12]       2          1        0.004      0.004       0.004       0.004    0.00
  ...

  Terminated tasks:
                     sleep[7220]    7219          3        0.770      0.087       0.256       0.576   62.28

  Idle stats:
      CPU  0 idle for   2352.006  msec
      CPU  1 idle for   2764.497  msec
      CPU  2 idle for   2998.229  msec
      CPU  3 idle for   2967.800  msec

      Total number of unique tasks: 52
  Total number of context switches: 2532
             Total run time (msec): 218.036

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20161116060634.28477-5-namhyung@kernel.org
[ Add documentation from last commit, so that docs comes with the cset that introduces the feature ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c | 166 +++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 160 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index c0ac0c9557e8..1e7d81ad5ec6 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -194,6 +194,11 @@ struct perf_sched {
 	bool force;
 	bool skip_merge;
 	struct perf_sched_map map;
+
+	/* options for timehist command */
+	bool		summary;
+	bool		summary_only;
+	u64		skipped_samples;
 };
 
 /* per thread run time data */
@@ -2010,12 +2015,15 @@ static struct thread *timehist_get_thread(struct perf_sample *sample,
 	return thread;
 }
 
-static bool timehist_skip_sample(struct thread *thread)
+static bool timehist_skip_sample(struct perf_sched *sched,
+				 struct thread *thread)
 {
 	bool rc = false;
 
-	if (thread__is_filtered(thread))
+	if (thread__is_filtered(thread)) {
 		rc = true;
+		sched->skipped_samples++;
+	}
 
 	return rc;
 }
@@ -2045,7 +2053,7 @@ static int timehist_sched_wakeup_event(struct perf_tool *tool __maybe_unused,
 	return 0;
 }
 
-static int timehist_sched_change_event(struct perf_tool *tool __maybe_unused,
+static int timehist_sched_change_event(struct perf_tool *tool,
 				       union perf_event *event,
 				       struct perf_evsel *evsel,
 				       struct perf_sample *sample,
@@ -2056,6 +2064,7 @@ static int timehist_sched_change_event(struct perf_tool *tool __maybe_unused,
 	struct thread_runtime *tr = NULL;
 	u64 tprev;
 	int rc = 0;
+	struct perf_sched *sched = container_of(tool, struct perf_sched, tool);
 
 	if (machine__resolve(machine, &al, sample) < 0) {
 		pr_err("problem processing %d event. skipping it\n",
@@ -2070,7 +2079,7 @@ static int timehist_sched_change_event(struct perf_tool *tool __maybe_unused,
 		goto out;
 	}
 
-	if (timehist_skip_sample(thread))
+	if (timehist_skip_sample(sched, thread))
 		goto out;
 
 	tr = thread__get_runtime(thread);
@@ -2082,7 +2091,8 @@ static int timehist_sched_change_event(struct perf_tool *tool __maybe_unused,
 	tprev = perf_evsel__get_time(evsel, sample->cpu);
 
 	timehist_update_runtime_stats(tr, sample->time, tprev);
-	timehist_print_sample(sample, thread);
+	if (!sched->summary_only)
+		timehist_print_sample(sample, thread);
 
 out:
 	if (tr) {
@@ -2122,6 +2132,131 @@ static int process_lost(struct perf_tool *tool __maybe_unused,
 }
 
 
+static void print_thread_runtime(struct thread *t,
+				 struct thread_runtime *r)
+{
+	double mean = avg_stats(&r->run_stats);
+	float stddev;
+
+	printf("%*s   %5d  %9" PRIu64 " ",
+	       comm_width, timehist_get_commstr(t), t->ppid,
+	       (u64) r->run_stats.n);
+
+	print_sched_time(r->total_run_time, 8);
+	stddev = rel_stddev_stats(stddev_stats(&r->run_stats), mean);
+	print_sched_time(r->run_stats.min, 6);
+	printf(" ");
+	print_sched_time((u64) mean, 6);
+	printf(" ");
+	print_sched_time(r->run_stats.max, 6);
+	printf("  ");
+	printf("%5.2f", stddev);
+	printf("\n");
+}
+
+struct total_run_stats {
+	u64  sched_count;
+	u64  task_count;
+	u64  total_run_time;
+};
+
+static int __show_thread_runtime(struct thread *t, void *priv)
+{
+	struct total_run_stats *stats = priv;
+	struct thread_runtime *r;
+
+	if (thread__is_filtered(t))
+		return 0;
+
+	r = thread__priv(t);
+	if (r && r->run_stats.n) {
+		stats->task_count++;
+		stats->sched_count += r->run_stats.n;
+		stats->total_run_time += r->total_run_time;
+		print_thread_runtime(t, r);
+	}
+
+	return 0;
+}
+
+static int show_thread_runtime(struct thread *t, void *priv)
+{
+	if (t->dead)
+		return 0;
+
+	return __show_thread_runtime(t, priv);
+}
+
+static int show_deadthread_runtime(struct thread *t, void *priv)
+{
+	if (!t->dead)
+		return 0;
+
+	return __show_thread_runtime(t, priv);
+}
+
+static void timehist_print_summary(struct perf_sched *sched,
+				   struct perf_session *session)
+{
+	struct machine *m = &session->machines.host;
+	struct total_run_stats totals;
+	u64 task_count;
+	struct thread *t;
+	struct thread_runtime *r;
+	int i;
+
+	memset(&totals, 0, sizeof(totals));
+
+	if (comm_width < 30)
+		comm_width = 30;
+
+	printf("\nRuntime summary\n");
+	printf("%*s  parent   sched-in  ", comm_width, "comm");
+	printf("   run-time    min-run     avg-run     max-run  stddev\n");
+	printf("%*s            (count)  ", comm_width, "");
+	printf("     (msec)     (msec)      (msec)      (msec)       %%\n");
+	printf("%.105s\n", graph_dotted_line);
+
+	machine__for_each_thread(m, show_thread_runtime, &totals);
+	task_count = totals.task_count;
+	if (!task_count)
+		printf("<no still running tasks>\n");
+
+	printf("\nTerminated tasks:\n");
+	machine__for_each_thread(m, show_deadthread_runtime, &totals);
+	if (task_count == totals.task_count)
+		printf("<no terminated tasks>\n");
+
+	/* CPU idle stats not tracked when samples were skipped */
+	if (sched->skipped_samples)
+		return;
+
+	printf("\nIdle stats:\n");
+	for (i = 0; i <= idle_max_cpu; ++i) {
+		t = idle_threads[i];
+		if (!t)
+			continue;
+
+		r = thread__priv(t);
+		if (r && r->run_stats.n) {
+			totals.sched_count += r->run_stats.n;
+			printf("    CPU %2d idle for ", i);
+			print_sched_time(r->total_run_time, 6);
+			printf(" msec\n");
+		} else
+			printf("    CPU %2d idle entire time window\n", i);
+	}
+
+	printf("\n"
+	       "    Total number of unique tasks: %" PRIu64 "\n"
+	       "Total number of context switches: %" PRIu64 "\n"
+	       "           Total run time (msec): ",
+	       totals.task_count, totals.sched_count);
+
+	print_sched_time(totals.total_run_time, 2);
+	printf("\n");
+}
+
 typedef int (*sched_handler)(struct perf_tool *tool,
 			  union perf_event *event,
 			  struct perf_evsel *evsel,
@@ -2163,6 +2298,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
 	};
 
 	struct perf_session *session;
+	struct perf_evlist *evlist;
 	int err = -1;
 
 	/*
@@ -2185,6 +2321,8 @@ static int perf_sched__timehist(struct perf_sched *sched)
 	if (session == NULL)
 		return -ENOMEM;
 
+	evlist = session->evlist;
+
 	symbol__init(&session->header.env);
 
 	setup_pager();
@@ -2203,7 +2341,12 @@ static int perf_sched__timehist(struct perf_sched *sched)
 	if (init_idle_threads(sched->max_cpu))
 		goto out;
 
-	timehist_header();
+	/* summary_only implies summary option, but don't overwrite summary if set */
+	if (sched->summary_only)
+		sched->summary = sched->summary_only;
+
+	if (!sched->summary_only)
+		timehist_header();
 
 	err = perf_session__process_events(session);
 	if (err) {
@@ -2211,6 +2354,13 @@ static int perf_sched__timehist(struct perf_sched *sched)
 		goto out;
 	}
 
+	sched->nr_events      = evlist->stats.nr_events[0];
+	sched->nr_lost_events = evlist->stats.total_lost;
+	sched->nr_lost_chunks = evlist->stats.nr_events[PERF_RECORD_LOST];
+
+	if (sched->summary)
+		timehist_print_summary(sched, session);
+
 out:
 	free_idle_threads();
 	perf_session__delete(session);
@@ -2569,6 +2719,10 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		   "file", "kallsyms pathname"),
 	OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
 		    "Look for files with symbols relative to this directory"),
+	OPT_BOOLEAN('s', "summary", &sched.summary_only,
+		    "Show only syscall summary with statistics"),
+	OPT_BOOLEAN('S', "with-summary", &sched.summary,
+		    "Show all syscalls and summary with statistics"),
 	OPT_PARENT(sched_options)
 	};
 
-- 
2.7.4

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

* [PATCH 16/18] perf sched timehist: Add -w/--wakeups option
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (14 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 15/18] perf sched timehist: Add summary options Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 17/18] perf sched timehist: Add call graph options Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Namhyung Kim, Andi Kleen,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

From: David Ahern <dsahern@gmail.com>

The -w option is to show wakeup events with timehist.

  $ perf sched timehist -w
             time    cpu  task name              b/n time  sch delay   run time
                          [tid/pid]                (msec)     (msec)     (msec)
  --------------- ------  --------------------  ---------  ---------  ---------
   2412598.429689 [0002]  perf[7219]                                             awakened: perf[7220]
   2412598.429696 [0009]  <idle>                    0.000      0.000      0.000
   2412598.429767 [0002]  perf[7219]                0.000      0.000      0.000
   2412598.429780 [0009]  perf[7220]                                             awakened: migration/9[53]
  ...

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20161116060634.28477-6-namhyung@kernel.org
[ Add documentation based on above commit message ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-sched.txt |  4 +++
 tools/perf/builtin-sched.c              | 58 ++++++++++++++++++++++++++++++---
 2 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt
index 72730da307b9..9a77bc73e8a3 100644
--- a/tools/perf/Documentation/perf-sched.txt
+++ b/tools/perf/Documentation/perf-sched.txt
@@ -112,6 +112,10 @@ OPTIONS for 'perf sched timehist'
 --symfs=<directory>::
     Look for files with symbols relative to this directory.
 
+-w::
+--wakeups::
+	Show wakeup events.
+
 SEE ALSO
 --------
 linkperf:perf-record[1]
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 1e7d81ad5ec6..8fb7bcc2cb76 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -198,6 +198,7 @@ struct perf_sched {
 	/* options for timehist command */
 	bool		summary;
 	bool		summary_only;
+	bool		show_wakeups;
 	u64		skipped_samples;
 };
 
@@ -1807,7 +1808,8 @@ static void timehist_header(void)
 	printf("\n");
 }
 
-static void timehist_print_sample(struct perf_sample *sample,
+static void timehist_print_sample(struct perf_sched *sched,
+				  struct perf_sample *sample,
 				  struct thread *thread)
 {
 	struct thread_runtime *tr = thread__priv(thread);
@@ -1821,6 +1823,10 @@ static void timehist_print_sample(struct perf_sample *sample,
 	print_sched_time(tr->dt_wait, 6);
 	print_sched_time(tr->dt_delay, 6);
 	print_sched_time(tr->dt_run, 6);
+
+	if (sched->show_wakeups)
+		printf("  %-*s", comm_width, "");
+
 	printf("\n");
 }
 
@@ -2028,12 +2034,44 @@ static bool timehist_skip_sample(struct perf_sched *sched,
 	return rc;
 }
 
-static int timehist_sched_wakeup_event(struct perf_tool *tool __maybe_unused,
+static void timehist_print_wakeup_event(struct perf_sched *sched,
+					struct perf_sample *sample,
+					struct machine *machine,
+					struct thread *awakened)
+{
+	struct thread *thread;
+	char tstr[64];
+
+	thread = machine__findnew_thread(machine, sample->pid, sample->tid);
+	if (thread == NULL)
+		return;
+
+	/* show wakeup unless both awakee and awaker are filtered */
+	if (timehist_skip_sample(sched, thread) &&
+	    timehist_skip_sample(sched, awakened)) {
+		return;
+	}
+
+	timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr));
+	printf("%15s [%04d] ", tstr, sample->cpu);
+
+	printf(" %-*s ", comm_width, timehist_get_commstr(thread));
+
+	/* dt spacer */
+	printf("  %9s  %9s  %9s ", "", "", "");
+
+	printf("awakened: %s", timehist_get_commstr(awakened));
+
+	printf("\n");
+}
+
+static int timehist_sched_wakeup_event(struct perf_tool *tool,
 				       union perf_event *event __maybe_unused,
 				       struct perf_evsel *evsel,
 				       struct perf_sample *sample,
 				       struct machine *machine)
 {
+	struct perf_sched *sched = container_of(tool, struct perf_sched, tool);
 	struct thread *thread;
 	struct thread_runtime *tr = NULL;
 	/* want pid of awakened task not pid in sample */
@@ -2050,6 +2088,10 @@ static int timehist_sched_wakeup_event(struct perf_tool *tool __maybe_unused,
 	if (tr->ready_to_run == 0)
 		tr->ready_to_run = sample->time;
 
+	/* show wakeups if requested */
+	if (sched->show_wakeups)
+		timehist_print_wakeup_event(sched, sample, machine, thread);
+
 	return 0;
 }
 
@@ -2059,12 +2101,12 @@ static int timehist_sched_change_event(struct perf_tool *tool,
 				       struct perf_sample *sample,
 				       struct machine *machine)
 {
+	struct perf_sched *sched = container_of(tool, struct perf_sched, tool);
 	struct addr_location al;
 	struct thread *thread;
 	struct thread_runtime *tr = NULL;
 	u64 tprev;
 	int rc = 0;
-	struct perf_sched *sched = container_of(tool, struct perf_sched, tool);
 
 	if (machine__resolve(machine, &al, sample) < 0) {
 		pr_err("problem processing %d event. skipping it\n",
@@ -2092,7 +2134,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
 
 	timehist_update_runtime_stats(tr, sample->time, tprev);
 	if (!sched->summary_only)
-		timehist_print_sample(sample, thread);
+		timehist_print_sample(sched, sample, thread);
 
 out:
 	if (tr) {
@@ -2723,6 +2765,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		    "Show only syscall summary with statistics"),
 	OPT_BOOLEAN('S', "with-summary", &sched.summary,
 		    "Show all syscalls and summary with statistics"),
+	OPT_BOOLEAN('w', "wakeups", &sched.show_wakeups, "Show wakeup events"),
 	OPT_PARENT(sched_options)
 	};
 
@@ -2814,6 +2857,13 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 			if (argc)
 				usage_with_options(timehist_usage, timehist_options);
 		}
+		if (sched.show_wakeups && sched.summary_only) {
+			pr_err(" Error: -s and -w are mutually exclusive.\n");
+			parse_options_usage(timehist_usage, timehist_options, "s", true);
+			parse_options_usage(NULL, timehist_options, "w", true);
+			return -EINVAL;
+		}
+
 		return perf_sched__timehist(&sched);
 	} else {
 		usage_with_options(sched_usage, sched_options);
-- 
2.7.4

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

* [PATCH 17/18] perf sched timehist: Add call graph options
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (15 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 16/18] perf sched timehist: Add -w/--wakeups option Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-23 16:40 ` [PATCH 18/18] perf sched timehist: Add -V/--cpu-visual option Arnaldo Carvalho de Melo
  2016-11-24  4:10 ` [GIT PULL 00/18] perf/core improvements and fixes Ingo Molnar
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Namhyung Kim, Andi Kleen,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

From: David Ahern <dsahern@gmail.com>

If callchains were recorded they are appended to the line with a default stack depth of 5:

  1.874569 [0011] gcc[31949]       0.014 0.000 1.148 wait_for_completion_killable <- do_fork <- sys_vfork <- stub_vfork <- __vfork
  1.874591 [0010] gcc[31951]       0.000 0.000 0.024 __cond_resched <- _cond_resched <- wait_for_completion <- stop_one_cpu <- sched_exec
  1.874603 [0010] migration/10[59] 3.350 0.004 0.011 smpboot_thread_fn <- kthread <- ret_from_fork
  1.874604 [0011] <idle>           1.148 0.000 0.035 cpu_startup_entry <- start_secondary
  1.874723 [0005] <idle>           0.016 0.000 1.383 cpu_startup_entry <- start_secondary
  1.874746 [0005] gcc[31949]       0.153 0.078 0.022 do_wait sys_wait4 <- system_call_fastpath <- __GI___waitpid

 --no-call-graph can be used to not show the callchains. --max-stack is used
to control the number of frames shown (default of 5). -x/--excl options can
be used to collapse redundant callchains to get more relevant data on screen.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20161116060634.28477-7-namhyung@kernel.org
[ Add documentation based on above commit message ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-sched.txt |  7 +++
 tools/perf/builtin-sched.c              | 88 ++++++++++++++++++++++++++++++---
 2 files changed, 89 insertions(+), 6 deletions(-)

diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt
index 9a77bc73e8a3..83452088727d 100644
--- a/tools/perf/Documentation/perf-sched.txt
+++ b/tools/perf/Documentation/perf-sched.txt
@@ -99,6 +99,13 @@ OPTIONS for 'perf sched timehist'
 --kallsyms=<file>::
     kallsyms pathname
 
+-g::
+--no-call-graph::
+	Do not display call chains if present.
+
+--max-stack::
+	Maximum number of functions to display in backtrace, default 5.
+
 -s::
 --summary::
     Show only a summary of scheduling by thread with min, max, and average
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 8fb7bcc2cb76..1f8731640809 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -14,6 +14,7 @@
 #include "util/thread_map.h"
 #include "util/color.h"
 #include "util/stat.h"
+#include "util/callchain.h"
 
 #include <subcmd/parse-options.h>
 #include "util/trace-event.h"
@@ -198,6 +199,8 @@ struct perf_sched {
 	/* options for timehist command */
 	bool		summary;
 	bool		summary_only;
+	bool		show_callchain;
+	unsigned int	max_stack;
 	bool		show_wakeups;
 	u64		skipped_samples;
 };
@@ -1810,6 +1813,7 @@ static void timehist_header(void)
 
 static void timehist_print_sample(struct perf_sched *sched,
 				  struct perf_sample *sample,
+				  struct addr_location *al,
 				  struct thread *thread)
 {
 	struct thread_runtime *tr = thread__priv(thread);
@@ -1827,6 +1831,18 @@ static void timehist_print_sample(struct perf_sched *sched,
 	if (sched->show_wakeups)
 		printf("  %-*s", comm_width, "");
 
+	if (thread->tid == 0)
+		goto out;
+
+	if (sched->show_callchain)
+		printf("  ");
+
+	sample__fprintf_sym(sample, al, 0,
+			    EVSEL__PRINT_SYM | EVSEL__PRINT_ONELINE |
+			    EVSEL__PRINT_CALLCHAIN_ARROW,
+			    &callchain_cursor, stdout);
+
+out:
 	printf("\n");
 }
 
@@ -1878,9 +1894,14 @@ static void timehist_update_runtime_stats(struct thread_runtime *r,
 	r->total_run_time += r->dt_run;
 }
 
-static bool is_idle_sample(struct perf_sample *sample,
-			   struct perf_evsel *evsel)
+static bool is_idle_sample(struct perf_sched *sched,
+			   struct perf_sample *sample,
+			   struct perf_evsel *evsel,
+			   struct machine *machine)
 {
+	struct thread *thread;
+	struct callchain_cursor *cursor = &callchain_cursor;
+
 	/* pid 0 == swapper == idle task */
 	if (sample->pid == 0)
 		return true;
@@ -1889,6 +1910,25 @@ static bool is_idle_sample(struct perf_sample *sample,
 		if (perf_evsel__intval(evsel, sample, "prev_pid") == 0)
 			return true;
 	}
+
+	/* want main thread for process - has maps */
+	thread = machine__findnew_thread(machine, sample->pid, sample->pid);
+	if (thread == NULL) {
+		pr_debug("Failed to get thread for pid %d.\n", sample->pid);
+		return false;
+	}
+
+	if (!symbol_conf.use_callchain || sample->callchain == NULL)
+		return false;
+
+	if (thread__resolve_callchain(thread, cursor, evsel, sample,
+				      NULL, NULL, sched->max_stack) != 0) {
+		if (verbose)
+			error("Failed to resolve callchain. Skipping\n");
+
+		return false;
+	}
+	callchain_cursor_commit(cursor);
 	return false;
 }
 
@@ -1999,13 +2039,14 @@ static struct thread_runtime *thread__get_runtime(struct thread *thread)
 	return tr;
 }
 
-static struct thread *timehist_get_thread(struct perf_sample *sample,
+static struct thread *timehist_get_thread(struct perf_sched *sched,
+					  struct perf_sample *sample,
 					  struct machine *machine,
 					  struct perf_evsel *evsel)
 {
 	struct thread *thread;
 
-	if (is_idle_sample(sample, evsel)) {
+	if (is_idle_sample(sched, sample, evsel, machine)) {
 		thread = get_idle_thread(sample->cpu);
 		if (thread == NULL)
 			pr_err("Failed to get idle thread for cpu %d.\n", sample->cpu);
@@ -2115,7 +2156,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
 		goto out;
 	}
 
-	thread = timehist_get_thread(sample, machine, evsel);
+	thread = timehist_get_thread(sched, sample, machine, evsel);
 	if (thread == NULL) {
 		rc = -1;
 		goto out;
@@ -2134,7 +2175,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
 
 	timehist_update_runtime_stats(tr, sample->time, tprev);
 	if (!sched->summary_only)
-		timehist_print_sample(sched, sample, thread);
+		timehist_print_sample(sched, sample, &al, thread);
 
 out:
 	if (tr) {
@@ -2327,6 +2368,30 @@ static int perf_timehist__process_sample(struct perf_tool *tool,
 	return err;
 }
 
+static int timehist_check_attr(struct perf_sched *sched,
+			       struct perf_evlist *evlist)
+{
+	struct perf_evsel *evsel;
+	struct evsel_runtime *er;
+
+	list_for_each_entry(evsel, &evlist->entries, node) {
+		er = perf_evsel__get_runtime(evsel);
+		if (er == NULL) {
+			pr_err("Failed to allocate memory for evsel runtime data\n");
+			return -1;
+		}
+
+		if (sched->show_callchain &&
+		    !(evsel->attr.sample_type & PERF_SAMPLE_CALLCHAIN)) {
+			pr_info("Samples do not have callchains.\n");
+			sched->show_callchain = 0;
+			symbol_conf.use_callchain = 0;
+		}
+	}
+
+	return 0;
+}
+
 static int perf_sched__timehist(struct perf_sched *sched)
 {
 	const struct perf_evsel_str_handler handlers[] = {
@@ -2359,6 +2424,8 @@ static int perf_sched__timehist(struct perf_sched *sched)
 	sched->tool.ordered_events = true;
 	sched->tool.ordering_requires_timestamps = true;
 
+	symbol_conf.use_callchain = sched->show_callchain;
+
 	session = perf_session__new(&file, false, &sched->tool);
 	if (session == NULL)
 		return -ENOMEM;
@@ -2367,6 +2434,9 @@ static int perf_sched__timehist(struct perf_sched *sched)
 
 	symbol__init(&session->header.env);
 
+	if (timehist_check_attr(sched, evlist) != 0)
+		goto out;
+
 	setup_pager();
 
 	/* setup per-evsel handlers */
@@ -2714,6 +2784,8 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		.next_shortname1      = 'A',
 		.next_shortname2      = '0',
 		.skip_merge           = 0,
+		.show_callchain	      = 1,
+		.max_stack            = 5,
 	};
 	const struct option sched_options[] = {
 	OPT_STRING('i', "input", &input_name, "file",
@@ -2759,6 +2831,10 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 		   "file", "vmlinux pathname"),
 	OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name,
 		   "file", "kallsyms pathname"),
+	OPT_BOOLEAN('g', "call-graph", &sched.show_callchain,
+		    "Display call chains if present (default on)"),
+	OPT_UINTEGER(0, "max-stack", &sched.max_stack,
+		   "Maximum number of functions to display backtrace."),
 	OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
 		    "Look for files with symbols relative to this directory"),
 	OPT_BOOLEAN('s', "summary", &sched.summary_only,
-- 
2.7.4

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

* [PATCH 18/18] perf sched timehist: Add -V/--cpu-visual option
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (16 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 17/18] perf sched timehist: Add call graph options Arnaldo Carvalho de Melo
@ 2016-11-23 16:40 ` Arnaldo Carvalho de Melo
  2016-11-24  4:10 ` [GIT PULL 00/18] perf/core improvements and fixes Ingo Molnar
  18 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-11-23 16:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Namhyung Kim, Andi Kleen,
	Peter Zijlstra, Stephane Eranian, Arnaldo Carvalho de Melo

From: David Ahern <dsahern@gmail.com>

The -V option provides a visual aid for sched switches by cpu:

  $ perf sched timehist -V
             time    cpu  0123456789abc  task name              b/n time  sch delay   run time
                                         [tid/pid]                (msec)     (msec)     (msec)
  --------------- ------  -------------  --------------------  ---------  ---------  ---------
  ...
   2412598.429696 [0009]           i     <idle>                    0.000      0.000      0.000
   2412598.429767 [0002]    s            perf[7219]                0.000      0.000      0.000
   2412598.429783 [0009]           s     perf[7220]                0.000      0.006      0.087
   2412598.429794 [0010]            i    <idle>                    0.000      0.000      0.000
   2412598.429795 [0009]           s     migration/9[53]           0.000      0.003      0.011
   2412598.430370 [0010]            s    sleep[7220]               0.011      0.000      0.576
   2412598.432584 [0003]     i           <idle>                    0.000      0.000      0.000
  ...

Committer notes:

'i' marks idle time, 's' are scheduler events.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20161116060634.28477-8-namhyung@kernel.org
[ Add documentation based on above commit message ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-sched.txt |  5 ++++
 tools/perf/builtin-sched.c              | 44 +++++++++++++++++++++++++++++++--
 2 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Documentation/perf-sched.txt b/tools/perf/Documentation/perf-sched.txt
index 83452088727d..fb9e52d65fca 100644
--- a/tools/perf/Documentation/perf-sched.txt
+++ b/tools/perf/Documentation/perf-sched.txt
@@ -119,6 +119,11 @@ OPTIONS for 'perf sched timehist'
 --symfs=<directory>::
     Look for files with symbols relative to this directory.
 
+-V::
+--cpu-visual::
+	Show visual aid for sched switches by CPU: 'i' marks idle time,
+	's' are scheduler events.
+
 -w::
 --wakeups::
 	Show wakeup events.
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 1f8731640809..829468defa07 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -201,6 +201,7 @@ struct perf_sched {
 	bool		summary_only;
 	bool		show_callchain;
 	unsigned int	max_stack;
+	bool		show_cpu_visual;
 	bool		show_wakeups;
 	u64		skipped_samples;
 };
@@ -1783,10 +1784,23 @@ static char *timehist_get_commstr(struct thread *thread)
 	return str;
 }
 
-static void timehist_header(void)
+static void timehist_header(struct perf_sched *sched)
 {
+	u32 ncpus = sched->max_cpu + 1;
+	u32 i, j;
+
 	printf("%15s %6s ", "time", "cpu");
 
+	if (sched->show_cpu_visual) {
+		printf(" ");
+		for (i = 0, j = 0; i < ncpus; ++i) {
+			printf("%x", j++);
+			if (j > 15)
+				j = 0;
+		}
+		printf(" ");
+	}
+
 	printf(" %-20s  %9s  %9s  %9s",
 		"task name", "wait time", "sch delay", "run time");
 
@@ -1797,6 +1811,9 @@ static void timehist_header(void)
 	 */
 	printf("%15s %-6s ", "", "");
 
+	if (sched->show_cpu_visual)
+		printf(" %*s ", ncpus, "");
+
 	printf(" %-20s  %9s  %9s  %9s\n", "[tid/pid]", "(msec)", "(msec)", "(msec)");
 
 	/*
@@ -1804,6 +1821,9 @@ static void timehist_header(void)
 	 */
 	printf("%.15s %.6s ", graph_dotted_line, graph_dotted_line);
 
+	if (sched->show_cpu_visual)
+		printf(" %.*s ", ncpus, graph_dotted_line);
+
 	printf(" %.20s  %.9s  %.9s  %.9s",
 		graph_dotted_line, graph_dotted_line, graph_dotted_line,
 		graph_dotted_line);
@@ -1817,11 +1837,28 @@ static void timehist_print_sample(struct perf_sched *sched,
 				  struct thread *thread)
 {
 	struct thread_runtime *tr = thread__priv(thread);
+	u32 max_cpus = sched->max_cpu + 1;
 	char tstr[64];
 
 	timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr));
 	printf("%15s [%04d] ", tstr, sample->cpu);
 
+	if (sched->show_cpu_visual) {
+		u32 i;
+		char c;
+
+		printf(" ");
+		for (i = 0; i < max_cpus; ++i) {
+			/* flag idle times with 'i'; others are sched events */
+			if (i == sample->cpu)
+				c = (thread->tid == 0) ? 'i' : 's';
+			else
+				c = ' ';
+			printf("%c", c);
+		}
+		printf(" ");
+	}
+
 	printf(" %-*s ", comm_width, timehist_get_commstr(thread));
 
 	print_sched_time(tr->dt_wait, 6);
@@ -2095,6 +2132,8 @@ static void timehist_print_wakeup_event(struct perf_sched *sched,
 
 	timestamp__scnprintf_usec(sample->time, tstr, sizeof(tstr));
 	printf("%15s [%04d] ", tstr, sample->cpu);
+	if (sched->show_cpu_visual)
+		printf(" %*s ", sched->max_cpu + 1, "");
 
 	printf(" %-*s ", comm_width, timehist_get_commstr(thread));
 
@@ -2458,7 +2497,7 @@ static int perf_sched__timehist(struct perf_sched *sched)
 		sched->summary = sched->summary_only;
 
 	if (!sched->summary_only)
-		timehist_header();
+		timehist_header(sched);
 
 	err = perf_session__process_events(session);
 	if (err) {
@@ -2842,6 +2881,7 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
 	OPT_BOOLEAN('S', "with-summary", &sched.summary,
 		    "Show all syscalls and summary with statistics"),
 	OPT_BOOLEAN('w', "wakeups", &sched.show_wakeups, "Show wakeup events"),
+	OPT_BOOLEAN('V', "cpu-visual", &sched.show_cpu_visual, "Add CPU visual"),
 	OPT_PARENT(sched_options)
 	};
 
-- 
2.7.4

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (17 preceding siblings ...)
  2016-11-23 16:40 ` [PATCH 18/18] perf sched timehist: Add -V/--cpu-visual option Arnaldo Carvalho de Melo
@ 2016-11-24  4:10 ` Ingo Molnar
  18 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2016-11-24  4:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Andrew Morton, Chris Riyder,
	David Ahern, Don Zickus, Jiri Olsa, Joe Mario, Kim Phillips,
	Markus Trippelsdorf, Masami Hiramatsu, Namhyung Kim,
	Naveen N . Rao, Pawel Moll, Peter Zijlstra, Ravi Bangoria,
	Russell King, Stephane Eranian, Steven Rostedt, Taeung Song,
	Wang Nan


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end.
> 
> The following changes since commit 6a6b12e2125591e24891e6860410795ea53aed11:
> 
>   Merge tag 'perf-core-for-mingo-20161114' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-11-15 09:45:04 +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-20161123
> 
> for you to fetch changes up to a407b0678bc1c39d70af5fdbe6421c164b69a8c0:
> 
>   perf sched timehist: Add -V/--cpu-visual option (2016-11-23 10:44:09 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New tool:
> 
> - 'perf sched timehist' provides an analysis of scheduling events.
> 
>   Example usage:
>       perf sched record -- sleep 1
>       perf sched timehist
> 
>   By default it shows the individual schedule events, including the wait
>   time (time between sched-out and next sched-in events for the task), the
>   task scheduling delay (time between wakeup and actually running) and run
>   time for the task:
> 
>         time    cpu  task name         wait time  sch delay  run time
>                      [tid/pid]            (msec)     (msec)    (msec)
>     -------- ------  ----------------  ---------  ---------  --------
>     1.874569 [0011]  gcc[31949]            0.014      0.000     1.148
>     1.874591 [0010]  gcc[31951]            0.000      0.000     0.024
>     1.874603 [0010]  migration/10[59]      3.350      0.004     0.011
>     1.874604 [0011]  <idle>                1.148      0.000     0.035
>     1.874723 [0005]  <idle>                0.016      0.000     1.383
>     1.874746 [0005]  gcc[31949]            0.153      0.078     0.022
>   ...
> 
>   Times are in msec.usec. (David Ahern, Namhyung Kim)
> 
> Improvements:
> 
> - Make 'perf c2c report' support -f/--force, to allow skipping the
>   ownership check for root users, for instance, just like the other
>   tools (Jiri Olsa)
> 
> - Allow sorting cachelines by total number of HITMs, in addition to
>   local and remote numbers (Jiri Olsa)
> 
> Fixes:
> 
> - Make sure errors aren't suppressed by the TUI reset at the end of
>   a 'perf c2c report' session (Jiri Olsa)
> 
> Infrastructure:
> 
> - Initial work on having the annotate code better support multiple
>   architectures, including the ability to cross-annotate, i.e. to
>   annotate perf.data files collected on an ARM system on a x86_64
>   workstation (Arnaldo Carvalho de Melo, Ravi Bangoria, Kim Phillips)
> 
> - Use USECS_PER_SEC instead of hard coded number in libtraceevent (Steven Rostedt)
> 
> - Add retrieval of preempt count and latency flags in libtraceevent (Steven Rostedt)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       perf annotate: Start supporting cross arch annotation
>       perf annotate: Allow arches to specify functions to skip
>       perf annotate: Add per arch instructions annotate handlers
> 
> David Ahern (5):
>       perf sched timehist: Introduce timehist command
>       perf sched timehist: Add summary options
>       perf sched timehist: Add -w/--wakeups option
>       perf sched timehist: Add call graph options
>       perf sched timehist: Add -V/--cpu-visual option
> 
> Jiri Olsa (6):
>       perf tools: Show event fd in debug output
>       perf c2c report: Setup browser after opening perf.data
>       perf c2c report: Add -f/--force option
>       perf c2c report: Add struct c2c_stats::tot_hitm field
>       perf c2c report: Display total HITMs on default
>       perf c2c: Support cascading options
> 
> Namhyung Kim (2):
>       perf symbols: Print symbol offsets conditionally
>       perf evsel: Support printing callchains with arrows
> 
> Steven Rostedt (2):
>       tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number
>       tools lib traceevent: Add retrieval of preempt count and latency flags
> 
>  tools/lib/traceevent/event-parse.c          |  41 +-
>  tools/lib/traceevent/event-parse.h          |   5 +-
>  tools/perf/Documentation/perf-c2c.txt       |   8 +
>  tools/perf/Documentation/perf-sched.txt     |  66 +-
>  tools/perf/arch/arm/annotate/instructions.c |  90 +++
>  tools/perf/arch/x86/annotate/instructions.c |  78 +++
>  tools/perf/builtin-c2c.c                    |  80 ++-
>  tools/perf/builtin-sched.c                  | 914 +++++++++++++++++++++++++++-
>  tools/perf/builtin-top.c                    |   2 +-
>  tools/perf/ui/browsers/annotate.c           |   2 +-
>  tools/perf/ui/gtk/annotate.c                |   2 +-
>  tools/perf/util/annotate.c                  | 251 ++++----
>  tools/perf/util/annotate.h                  |   6 +-
>  tools/perf/util/evsel.c                     |   6 +-
>  tools/perf/util/evsel.h                     |   1 +
>  tools/perf/util/evsel_fprintf.c             |  12 +-
>  tools/perf/util/mem-events.c                |  12 +-
>  tools/perf/util/mem-events.h                |   1 +
>  tools/perf/util/symbol.h                    |   3 +-
>  tools/perf/util/symbol_fprintf.c            |  11 +-
>  20 files changed, 1406 insertions(+), 185 deletions(-)
>  create mode 100644 tools/perf/arch/arm/annotate/instructions.c
>  create mode 100644 tools/perf/arch/x86/annotate/instructions.c
> 
>   # uname -a
>   Linux jouet 4.8.6-201.fc24.x86_64 #1 SMP Thu Nov 3 14:38:57 UTC 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 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
>   # 
> 
>   # 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
>   #
> 
>   $ 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_demangle_O: make NO_DEMANGLE=1
>              make_no_libnuma_O: make NO_LIBNUMA=1
>             make_install_bin_O: make install-bin
>          make_install_prefix_O: make install prefix=/tmp/krava
>              make_util_map_o_O: make util/map.o
>   make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
>               make_no_libbpf_O: make NO_LIBBPF=1
>                     make_doc_O: make doc
>        make_util_pmu_bison_o_O: make util/pmu-bison.o
>         make_with_babeltrace_O: make LIBBABELTRACE=1
>                   make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
>              make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
>                   make_debug_O: make DEBUG=1
>                  make_perf_o_O: make perf.o
>                make_no_slang_O: make NO_SLANG=1
>                 make_no_newt_O: make NO_NEWT=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_install_O: make install
>             make_no_auxtrace_O: make NO_AUXTRACE=1
>            make_no_backtrace_O: make NO_BACKTRACE=1
>    make_install_prefix_slash_O: make install prefix=/tmp/krava/
>               make_clean_all_O: make clean all
>            make_no_libpython_O: make NO_LIBPYTHON=1
>             make_no_libaudit_O: make NO_LIBAUDIT=1
>            make_no_libbionic_O: make NO_LIBBIONIC=1
>                    make_help_O: make help
>               make_no_libelf_O: make NO_LIBELF=1
>                    make_tags_O: make tags
>            make_no_libunwind_O: make NO_LIBUNWIND=1
>                 make_no_gtk2_O: make NO_GTK2=1
>                    make_pure_O: make
>                  make_static_O: make LDFLAGS=-static
>   OK
>   make: Leaving directory '/home/acme/git/linux/tools/perf'

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2018-05-19 10:54 ` Arnaldo Carvalho de Melo
@ 2018-05-19 11:33   ` Ingo Molnar
  -1 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2018-05-19 11:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Andy Lutomirski, Dave Hansen,
	David Ahern, H . Peter Anvin, Jin Yao, Jiri Olsa, Joerg Roedel,
	Kan Liang, Namhyung Kim, Naveen N . Rao, Peter Zijlstra,
	Ravi Bangoria, Sandipan Das, Taeung Song, Thomas Gleixner,
	Wang Nan, x86, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 5aafae8d097e2161ee5c6a12ad532100f8885d2b:
> 
>   Merge tag 'perf-core-for-mingo-4.18-20180516' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2018-05-16 17:56:43 +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.18-20180519
> 
> for you to fetch changes up to 19422a9f2a3be7f3a046285ffae4cbb571aa853a:
> 
>   perf tools: Fix kernel_start for PTI on x86 (2018-05-19 06:42:51 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Record min/max LBR cycles (>= skylake) and add 'perf annotate' TUI
>   hotkey to show it (c) (Jin Yao)
> 
> - Fix machine->kernel_start for PTI on x86 (Adrian Hunter)
> 
> - Make machine->env->arch always available, e.g. in 'perf top', not
>   just when reading that info from perf.data files (Adrian Hunter)
> 
> - Reduce the number of files read at 'perf' start, leaving information such as
>   cacheline size, tracefs mount point determination, max_stack, etc, to be
>   lazily read as tools needs then (Arnaldo Carvalho de Melo)
> 
> - Fixup BPF include and examples install messages (Arnaldo Carvalho de Melo)
> 
> - Fixup callchain addresses and symbol offsets in 'perf script', to help
>   correlating with objdump output (Sandipan Das)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (2):
>       perf machine: Add machine__is() to identify machine arch
>       perf tools: Fix kernel_start for PTI on x86
> 
> Arnaldo Carvalho de Melo (12):
>       perf config: Call perf_config__init() lazily
>       tools lib api: The tracing_mnt variable doesn't need to be global
>       tools lib api: Unexport 'tracing_path' variable
>       tools lib api fs tracing_path: Introduce get/put_events_file() helpers
>       perf tools: Reuse the path to the tracepoint /events/ directory
>       perf parse-events: Use get/put_events_file()
>       tools lib api fs tracing_path: Introduce opendir() method
>       tools lib api fs tracing_path: Make tracing_events_path private
>       tools include compiler-gcc: Add __pure attribute helper
>       perf tools: Read the cache line size lazily
>       perf tools: No need to unconditionally read the max_stack sysctls
>       perf bpf: Fixup include and examples install messages
> 
> Jin Yao (2):
>       perf annotate: Record the min/max cycles
>       perf annotate: Create hotkey 'c' to show min/max cycles
> 
> Sandipan Das (2):
>       perf script: Show virtual addresses instead of offsets
>       perf script: Show symbol offsets by default
> 
>  tools/include/linux/compiler-gcc.h                 |  3 +
>  tools/lib/api/fs/tracing_path.c                    | 40 +++++++++---
>  tools/lib/api/fs/tracing_path.h                    |  9 ++-
>  tools/perf/Makefile.perf                           |  2 +
>  tools/perf/builtin-script.c                        | 26 ++++----
>  tools/perf/builtin-top.c                           |  2 +-
>  tools/perf/builtin-trace.c                         |  2 +-
>  tools/perf/perf.c                                  | 24 +------
>  tools/perf/tests/parse-events.c                    |  9 +--
>  .../tests/shell/record+probe_libc_inet_pton.sh     | 12 ++--
>  tools/perf/ui/browsers/annotate.c                  |  8 +++
>  tools/perf/util/annotate.c                         | 51 ++++++++++++---
>  tools/perf/util/annotate.h                         | 11 +++-
>  tools/perf/util/config.c                           | 16 ++---
>  tools/perf/util/config.h                           |  1 -
>  tools/perf/util/env.c                              | 18 ++++++
>  tools/perf/util/env.h                              |  2 +
>  tools/perf/util/evsel.c                            |  2 +-
>  tools/perf/util/machine.c                          | 18 +++++-
>  tools/perf/util/machine.h                          |  2 +
>  tools/perf/util/parse-events.c                     | 73 +++++++++++++---------
>  tools/perf/util/probe-file.c                       |  3 +-
>  tools/perf/util/sort.c                             |  4 +-
>  tools/perf/util/sort.h                             |  4 +-
>  tools/perf/util/trace-event-info.c                 | 11 ++--
>  tools/perf/util/trace-event.c                      |  8 ++-
>  tools/perf/util/util.c                             | 34 +++++++++-
>  tools/perf/util/util.h                             |  4 +-
>  28 files changed, 279 insertions(+), 120 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
@ 2018-05-19 11:33   ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2018-05-19 11:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Clark Williams, linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Andy Lutomirski, Dave Hansen,
	David Ahern, H . Peter Anvin, Jin Yao, Jiri Olsa, Joerg Roedel,
	Kan Liang, Namhyung Kim, Naveen N . Rao, Peter Zijlstra,
	Ravi Bangoria, Sandipan Das, Taeung Song


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 5aafae8d097e2161ee5c6a12ad532100f8885d2b:
> 
>   Merge tag 'perf-core-for-mingo-4.18-20180516' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2018-05-16 17:56:43 +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.18-20180519
> 
> for you to fetch changes up to 19422a9f2a3be7f3a046285ffae4cbb571aa853a:
> 
>   perf tools: Fix kernel_start for PTI on x86 (2018-05-19 06:42:51 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Record min/max LBR cycles (>= skylake) and add 'perf annotate' TUI
>   hotkey to show it (c) (Jin Yao)
> 
> - Fix machine->kernel_start for PTI on x86 (Adrian Hunter)
> 
> - Make machine->env->arch always available, e.g. in 'perf top', not
>   just when reading that info from perf.data files (Adrian Hunter)
> 
> - Reduce the number of files read at 'perf' start, leaving information such as
>   cacheline size, tracefs mount point determination, max_stack, etc, to be
>   lazily read as tools needs then (Arnaldo Carvalho de Melo)
> 
> - Fixup BPF include and examples install messages (Arnaldo Carvalho de Melo)
> 
> - Fixup callchain addresses and symbol offsets in 'perf script', to help
>   correlating with objdump output (Sandipan Das)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (2):
>       perf machine: Add machine__is() to identify machine arch
>       perf tools: Fix kernel_start for PTI on x86
> 
> Arnaldo Carvalho de Melo (12):
>       perf config: Call perf_config__init() lazily
>       tools lib api: The tracing_mnt variable doesn't need to be global
>       tools lib api: Unexport 'tracing_path' variable
>       tools lib api fs tracing_path: Introduce get/put_events_file() helpers
>       perf tools: Reuse the path to the tracepoint /events/ directory
>       perf parse-events: Use get/put_events_file()
>       tools lib api fs tracing_path: Introduce opendir() method
>       tools lib api fs tracing_path: Make tracing_events_path private
>       tools include compiler-gcc: Add __pure attribute helper
>       perf tools: Read the cache line size lazily
>       perf tools: No need to unconditionally read the max_stack sysctls
>       perf bpf: Fixup include and examples install messages
> 
> Jin Yao (2):
>       perf annotate: Record the min/max cycles
>       perf annotate: Create hotkey 'c' to show min/max cycles
> 
> Sandipan Das (2):
>       perf script: Show virtual addresses instead of offsets
>       perf script: Show symbol offsets by default
> 
>  tools/include/linux/compiler-gcc.h                 |  3 +
>  tools/lib/api/fs/tracing_path.c                    | 40 +++++++++---
>  tools/lib/api/fs/tracing_path.h                    |  9 ++-
>  tools/perf/Makefile.perf                           |  2 +
>  tools/perf/builtin-script.c                        | 26 ++++----
>  tools/perf/builtin-top.c                           |  2 +-
>  tools/perf/builtin-trace.c                         |  2 +-
>  tools/perf/perf.c                                  | 24 +------
>  tools/perf/tests/parse-events.c                    |  9 +--
>  .../tests/shell/record+probe_libc_inet_pton.sh     | 12 ++--
>  tools/perf/ui/browsers/annotate.c                  |  8 +++
>  tools/perf/util/annotate.c                         | 51 ++++++++++++---
>  tools/perf/util/annotate.h                         | 11 +++-
>  tools/perf/util/config.c                           | 16 ++---
>  tools/perf/util/config.h                           |  1 -
>  tools/perf/util/env.c                              | 18 ++++++
>  tools/perf/util/env.h                              |  2 +
>  tools/perf/util/evsel.c                            |  2 +-
>  tools/perf/util/machine.c                          | 18 +++++-
>  tools/perf/util/machine.h                          |  2 +
>  tools/perf/util/parse-events.c                     | 73 +++++++++++++---------
>  tools/perf/util/probe-file.c                       |  3 +-
>  tools/perf/util/sort.c                             |  4 +-
>  tools/perf/util/sort.h                             |  4 +-
>  tools/perf/util/trace-event-info.c                 | 11 ++--
>  tools/perf/util/trace-event.c                      |  8 ++-
>  tools/perf/util/util.c                             | 34 +++++++++-
>  tools/perf/util/util.h                             |  4 +-
>  28 files changed, 279 insertions(+), 120 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2018-05-19 10:54 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-05-19 10:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter, Alexander Shishkin,
	Andi Kleen, Andy Lutomirski, Dave Hansen, David Ahern,
	H . Peter Anvin, Jin Yao, Jiri Olsa, Joerg Roedel, Kan Liang,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria,
	Sandipan Das, Taeung Song, Thomas Gleixner, Wang Nan, x86,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 5aafae8d097e2161ee5c6a12ad532100f8885d2b:

  Merge tag 'perf-core-for-mingo-4.18-20180516' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2018-05-16 17:56:43 +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.18-20180519

for you to fetch changes up to 19422a9f2a3be7f3a046285ffae4cbb571aa853a:

  perf tools: Fix kernel_start for PTI on x86 (2018-05-19 06:42:51 -0300)

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

- Record min/max LBR cycles (>= skylake) and add 'perf annotate' TUI
  hotkey to show it (c) (Jin Yao)

- Fix machine->kernel_start for PTI on x86 (Adrian Hunter)

- Make machine->env->arch always available, e.g. in 'perf top', not
  just when reading that info from perf.data files (Adrian Hunter)

- Reduce the number of files read at 'perf' start, leaving information such as
  cacheline size, tracefs mount point determination, max_stack, etc, to be
  lazily read as tools needs then (Arnaldo Carvalho de Melo)

- Fixup BPF include and examples install messages (Arnaldo Carvalho de Melo)

- Fixup callchain addresses and symbol offsets in 'perf script', to help
  correlating with objdump output (Sandipan Das)

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

----------------------------------------------------------------
Adrian Hunter (2):
      perf machine: Add machine__is() to identify machine arch
      perf tools: Fix kernel_start for PTI on x86

Arnaldo Carvalho de Melo (12):
      perf config: Call perf_config__init() lazily
      tools lib api: The tracing_mnt variable doesn't need to be global
      tools lib api: Unexport 'tracing_path' variable
      tools lib api fs tracing_path: Introduce get/put_events_file() helpers
      perf tools: Reuse the path to the tracepoint /events/ directory
      perf parse-events: Use get/put_events_file()
      tools lib api fs tracing_path: Introduce opendir() method
      tools lib api fs tracing_path: Make tracing_events_path private
      tools include compiler-gcc: Add __pure attribute helper
      perf tools: Read the cache line size lazily
      perf tools: No need to unconditionally read the max_stack sysctls
      perf bpf: Fixup include and examples install messages

Jin Yao (2):
      perf annotate: Record the min/max cycles
      perf annotate: Create hotkey 'c' to show min/max cycles

Sandipan Das (2):
      perf script: Show virtual addresses instead of offsets
      perf script: Show symbol offsets by default

 tools/include/linux/compiler-gcc.h                 |  3 +
 tools/lib/api/fs/tracing_path.c                    | 40 +++++++++---
 tools/lib/api/fs/tracing_path.h                    |  9 ++-
 tools/perf/Makefile.perf                           |  2 +
 tools/perf/builtin-script.c                        | 26 ++++----
 tools/perf/builtin-top.c                           |  2 +-
 tools/perf/builtin-trace.c                         |  2 +-
 tools/perf/perf.c                                  | 24 +------
 tools/perf/tests/parse-events.c                    |  9 +--
 .../tests/shell/record+probe_libc_inet_pton.sh     | 12 ++--
 tools/perf/ui/browsers/annotate.c                  |  8 +++
 tools/perf/util/annotate.c                         | 51 ++++++++++++---
 tools/perf/util/annotate.h                         | 11 +++-
 tools/perf/util/config.c                           | 16 ++---
 tools/perf/util/config.h                           |  1 -
 tools/perf/util/env.c                              | 18 ++++++
 tools/perf/util/env.h                              |  2 +
 tools/perf/util/evsel.c                            |  2 +-
 tools/perf/util/machine.c                          | 18 +++++-
 tools/perf/util/machine.h                          |  2 +
 tools/perf/util/parse-events.c                     | 73 +++++++++++++---------
 tools/perf/util/probe-file.c                       |  3 +-
 tools/perf/util/sort.c                             |  4 +-
 tools/perf/util/sort.h                             |  4 +-
 tools/perf/util/trace-event-info.c                 | 11 ++--
 tools/perf/util/trace-event.c                      |  8 ++-
 tools/perf/util/util.c                             | 34 +++++++++-
 tools/perf/util/util.h                             |  4 +-
 28 files changed, 279 insertions(+), 120 deletions(-)

Test results:

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:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   7 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   8 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   9 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  11 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  12 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  13 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  14 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  15 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  16 debian:experimental           : Ok   gcc (Debian 7.3.0-19) 7.3.0
  17 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
  18 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
  19 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 7.3.0-18) 7.3.0
  20 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
  21 fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  22 fedora:21                     : Ok   gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
  23 fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  24 fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  25 fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  26 fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  27 fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  28 fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
  29 fedora:27                     : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
  30 fedora:28                     : Ok   gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
  31 fedora:rawhide                : Ok   gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
  32 gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
  33 mageia:5                      : Ok   gcc (GCC) 4.9.2
  34 mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
  35 opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
  36 opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
  37 opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
  38 opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
  39 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18.0.7)
  40 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)
  41 ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  42 ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  43 ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
  44 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  45 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  46 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  47 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  48 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  49 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  52 ubuntu:17.04                  : Ok   gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
  53 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
  54 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  #

  # uname -a
  Linux seventh 4.17.0-rc5-00069-g3acf4e395260 #2 SMP Fri May 18 12:13:59 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
  # perf --version
  perf version 4.17.rc5.g19422a9
  # 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: Number of exit events of a simple workload            : Ok
  23: Software clock events period values                   : Ok
  24: Object code reading                                   : Ok
  25: Sample parsing                                        : Ok
  26: Use a dummy software event to keep tracking           : Ok
  27: Parse with no sample_id_all bit set                   : Ok
  28: Filter hist entries                                   : Ok
  29: Lookup mmap thread                                    : Ok
  30: Share thread mg                                       : Ok
  31: Sort output of hist entries                           : Ok
  32: Cumulate child hist entries                           : Ok
  33: Track with sched_switch                               : Ok
  34: Filter fds with revents mask in a fdarray             : Ok
  35: Add fd to a fdarray, making it autogrow               : Ok
  36: kmod_path__parse                                      : Ok
  37: Thread map                                            : Ok
  38: LLVM search and compile                               :
  38.1: Basic BPF llvm compile                              : Ok
  38.2: kbuild searching                                    : Ok
  38.3: Compile source for BPF prologue generation          : Ok
  38.4: Compile source for BPF relocation                   : Ok
  39: Session topology                                      : Ok
  40: BPF filter                                            :
  40.1: Basic BPF filtering                                 : Ok
  40.2: BPF pinning                                         : Ok
  40.3: BPF prologue generation                             : Ok
  40.4: BPF relocation checker                              : Ok
  41: Synthesize thread map                                 : Ok
  42: Remove thread map                                     : Ok
  43: Synthesize cpu map                                    : Ok
  44: Synthesize stat config                                : Ok
  45: Synthesize stat                                       : Ok
  46: Synthesize stat round                                 : Ok
  47: Synthesize attr update                                : Ok
  48: Event times                                           : Ok
  49: Read backward ring buffer                             : Ok
  50: Print cpu map                                         : Ok
  51: Probe SDT events                                      : Ok
  52: is_printable_array                                    : Ok
  53: Print bitmap                                          : Ok
  54: perf hooks                                            : Ok
  55: builtin clang support                                 : Skip (not compiled in)
  56: unit_number__scnprintf                                : Ok
  57: mem2node                                              : Ok
  58: x86 rdpmc                                             : Ok
  59: Convert perf time to TSC                              : Ok
  60: DWARF unwind                                          : Ok
  61: x86 instruction decoder - new instructions            : Ok
  62: Use vfs_getname probe to get syscall args filenames   : Ok
  63: Check open filename arg using perf trace + vfs_getname: Ok
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: 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_debug_O: make DEBUG=1
           make_no_backtrace_O: make NO_BACKTRACE=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
             make_no_libnuma_O: make NO_LIBNUMA=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                 make_static_O: make LDFLAGS=-static
             make_no_libperl_O: make NO_LIBPERL=1
             make_util_map_o_O: make util/map.o
              make_no_libelf_O: make NO_LIBELF=1
               make_no_slang_O: make NO_SLANG=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
                   make_help_O: make help
           make_no_libbionic_O: make NO_LIBBIONIC=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
                make_no_newt_O: make NO_NEWT=1
            make_no_demangle_O: make NO_DEMANGLE=1
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
                 make_perf_o_O: make perf.o
                make_install_O: make install
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                   make_tags_O: make tags
         make_install_prefix_O: make install prefix=/tmp/krava
                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_clean_all_O: make clean all
                make_no_gtk2_O: make NO_GTK2=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
           make_no_libpython_O: make NO_LIBPYTHON=1
              make_no_libbpf_O: make NO_LIBBPF=1
            make_install_bin_O: make install-bin
                    make_doc_O: make doc
                   make_pure_O: make
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2018-05-19 10:54 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-05-19 10:54 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter, Alexander Shishkin,
	Andi Kleen, Andy Lutomirski, Dave Hansen, David Ahern,
	H . Peter Anvin, Jin Yao, Jiri Olsa, Joerg Roedel, Kan Liang,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria,
	Sandipan Das

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 5aafae8d097e2161ee5c6a12ad532100f8885d2b:

  Merge tag 'perf-core-for-mingo-4.18-20180516' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2018-05-16 17:56:43 +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.18-20180519

for you to fetch changes up to 19422a9f2a3be7f3a046285ffae4cbb571aa853a:

  perf tools: Fix kernel_start for PTI on x86 (2018-05-19 06:42:51 -0300)

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

- Record min/max LBR cycles (>= skylake) and add 'perf annotate' TUI
  hotkey to show it (c) (Jin Yao)

- Fix machine->kernel_start for PTI on x86 (Adrian Hunter)

- Make machine->env->arch always available, e.g. in 'perf top', not
  just when reading that info from perf.data files (Adrian Hunter)

- Reduce the number of files read at 'perf' start, leaving information such as
  cacheline size, tracefs mount point determination, max_stack, etc, to be
  lazily read as tools needs then (Arnaldo Carvalho de Melo)

- Fixup BPF include and examples install messages (Arnaldo Carvalho de Melo)

- Fixup callchain addresses and symbol offsets in 'perf script', to help
  correlating with objdump output (Sandipan Das)

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

----------------------------------------------------------------
Adrian Hunter (2):
      perf machine: Add machine__is() to identify machine arch
      perf tools: Fix kernel_start for PTI on x86

Arnaldo Carvalho de Melo (12):
      perf config: Call perf_config__init() lazily
      tools lib api: The tracing_mnt variable doesn't need to be global
      tools lib api: Unexport 'tracing_path' variable
      tools lib api fs tracing_path: Introduce get/put_events_file() helpers
      perf tools: Reuse the path to the tracepoint /events/ directory
      perf parse-events: Use get/put_events_file()
      tools lib api fs tracing_path: Introduce opendir() method
      tools lib api fs tracing_path: Make tracing_events_path private
      tools include compiler-gcc: Add __pure attribute helper
      perf tools: Read the cache line size lazily
      perf tools: No need to unconditionally read the max_stack sysctls
      perf bpf: Fixup include and examples install messages

Jin Yao (2):
      perf annotate: Record the min/max cycles
      perf annotate: Create hotkey 'c' to show min/max cycles

Sandipan Das (2):
      perf script: Show virtual addresses instead of offsets
      perf script: Show symbol offsets by default

 tools/include/linux/compiler-gcc.h                 |  3 +
 tools/lib/api/fs/tracing_path.c                    | 40 +++++++++---
 tools/lib/api/fs/tracing_path.h                    |  9 ++-
 tools/perf/Makefile.perf                           |  2 +
 tools/perf/builtin-script.c                        | 26 ++++----
 tools/perf/builtin-top.c                           |  2 +-
 tools/perf/builtin-trace.c                         |  2 +-
 tools/perf/perf.c                                  | 24 +------
 tools/perf/tests/parse-events.c                    |  9 +--
 .../tests/shell/record+probe_libc_inet_pton.sh     | 12 ++--
 tools/perf/ui/browsers/annotate.c                  |  8 +++
 tools/perf/util/annotate.c                         | 51 ++++++++++++---
 tools/perf/util/annotate.h                         | 11 +++-
 tools/perf/util/config.c                           | 16 ++---
 tools/perf/util/config.h                           |  1 -
 tools/perf/util/env.c                              | 18 ++++++
 tools/perf/util/env.h                              |  2 +
 tools/perf/util/evsel.c                            |  2 +-
 tools/perf/util/machine.c                          | 18 +++++-
 tools/perf/util/machine.h                          |  2 +
 tools/perf/util/parse-events.c                     | 73 +++++++++++++---------
 tools/perf/util/probe-file.c                       |  3 +-
 tools/perf/util/sort.c                             |  4 +-
 tools/perf/util/sort.h                             |  4 +-
 tools/perf/util/trace-event-info.c                 | 11 ++--
 tools/perf/util/trace-event.c                      |  8 ++-
 tools/perf/util/util.c                             | 34 +++++++++-
 tools/perf/util/util.h                             |  4 +-
 28 files changed, 279 insertions(+), 120 deletions(-)

Test results:

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:edge                   : Ok   gcc (Alpine 6.4.0) 6.4.0
   6 amazonlinux:1                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
   7 amazonlinux:2                 : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
   8 android-ndk:r12b-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
   9 android-ndk:r15c-arm          : Ok   arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease)
  10 centos:5                      : Ok   gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
  11 centos:6                      : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
  12 centos:7                      : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
  13 debian:7                      : Ok   gcc (Debian 4.7.2-5) 4.7.2
  14 debian:8                      : Ok   gcc (Debian 4.9.2-10+deb8u1) 4.9.2
  15 debian:9                      : Ok   gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
  16 debian:experimental           : Ok   gcc (Debian 7.3.0-19) 7.3.0
  17 debian:experimental-x-arm64   : Ok   aarch64-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
  18 debian:experimental-x-mips    : Ok   mips-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
  19 debian:experimental-x-mips64  : Ok   mips64-linux-gnuabi64-gcc (Debian 7.3.0-18) 7.3.0
  20 debian:experimental-x-mipsel  : Ok   mipsel-linux-gnu-gcc (Debian 7.3.0-19) 7.3.0
  21 fedora:20                     : Ok   gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
  22 fedora:21                     : Ok   gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
  23 fedora:22                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  24 fedora:23                     : Ok   gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
  25 fedora:24                     : Ok   gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
  26 fedora:24-x-ARC-uClibc        : Ok   arc-linux-gcc (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) 7.1.1 20170710
  27 fedora:25                     : Ok   gcc (GCC) 6.4.1 20170727 (Red Hat 6.4.1-1)
  28 fedora:26                     : Ok   gcc (GCC) 7.3.1 20180130 (Red Hat 7.3.1-2)
  29 fedora:27                     : Ok   gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
  30 fedora:28                     : Ok   gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
  31 fedora:rawhide                : Ok   gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20)
  32 gentoo-stage3-amd64:latest    : Ok   gcc (Gentoo 6.4.0-r1 p1.3) 6.4.0
  33 mageia:5                      : Ok   gcc (GCC) 4.9.2
  34 mageia:6                      : Ok   gcc (Mageia 5.5.0-1.mga6) 5.5.0
  35 opensuse:42.1                 : Ok   gcc (SUSE Linux) 4.8.5
  36 opensuse:42.2                 : Ok   gcc (SUSE Linux) 4.8.5
  37 opensuse:42.3                 : Ok   gcc (SUSE Linux) 4.8.5
  38 opensuse:tumbleweed           : Ok   gcc (SUSE Linux) 7.3.1 20180323 [gcc-7-branch revision 258812]
  39 oraclelinux:6                 : Ok   gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18.0.7)
  40 oraclelinux:7                 : Ok   gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28.0.1)
  41 ubuntu:12.04.5                : Ok   gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  42 ubuntu:14.04.4                : Ok   gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  43 ubuntu:14.04.4-x-linaro-arm64 : Ok   aarch64-linux-gnu-gcc (Linaro GCC 5.5-2017.10) 5.5.0
  44 ubuntu:16.04                  : Ok   gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  45 ubuntu:16.04-x-arm            : Ok   arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  46 ubuntu:16.04-x-arm64          : Ok   aarch64-linux-gnu-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  47 ubuntu:16.04-x-powerpc        : Ok   powerpc-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  48 ubuntu:16.04-x-powerpc64      : Ok   powerpc64-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  49 ubuntu:16.04-x-powerpc64el    : Ok   powerpc64le-linux-gnu-gcc (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  50 ubuntu:16.04-x-s390           : Ok   s390x-linux-gnu-gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
  51 ubuntu:16.10                  : Ok   gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
  52 ubuntu:17.04                  : Ok   gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406
  53 ubuntu:17.10                  : Ok   gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
  54 ubuntu:18.04                  : Ok   gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
  #

  # uname -a
  Linux seventh 4.17.0-rc5-00069-g3acf4e395260 #2 SMP Fri May 18 12:13:59 -03 2018 x86_64 x86_64 x86_64 GNU/Linux
  # perf --version
  perf version 4.17.rc5.g19422a9
  # 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: Number of exit events of a simple workload            : Ok
  23: Software clock events period values                   : Ok
  24: Object code reading                                   : Ok
  25: Sample parsing                                        : Ok
  26: Use a dummy software event to keep tracking           : Ok
  27: Parse with no sample_id_all bit set                   : Ok
  28: Filter hist entries                                   : Ok
  29: Lookup mmap thread                                    : Ok
  30: Share thread mg                                       : Ok
  31: Sort output of hist entries                           : Ok
  32: Cumulate child hist entries                           : Ok
  33: Track with sched_switch                               : Ok
  34: Filter fds with revents mask in a fdarray             : Ok
  35: Add fd to a fdarray, making it autogrow               : Ok
  36: kmod_path__parse                                      : Ok
  37: Thread map                                            : Ok
  38: LLVM search and compile                               :
  38.1: Basic BPF llvm compile                              : Ok
  38.2: kbuild searching                                    : Ok
  38.3: Compile source for BPF prologue generation          : Ok
  38.4: Compile source for BPF relocation                   : Ok
  39: Session topology                                      : Ok
  40: BPF filter                                            :
  40.1: Basic BPF filtering                                 : Ok
  40.2: BPF pinning                                         : Ok
  40.3: BPF prologue generation                             : Ok
  40.4: BPF relocation checker                              : Ok
  41: Synthesize thread map                                 : Ok
  42: Remove thread map                                     : Ok
  43: Synthesize cpu map                                    : Ok
  44: Synthesize stat config                                : Ok
  45: Synthesize stat                                       : Ok
  46: Synthesize stat round                                 : Ok
  47: Synthesize attr update                                : Ok
  48: Event times                                           : Ok
  49: Read backward ring buffer                             : Ok
  50: Print cpu map                                         : Ok
  51: Probe SDT events                                      : Ok
  52: is_printable_array                                    : Ok
  53: Print bitmap                                          : Ok
  54: perf hooks                                            : Ok
  55: builtin clang support                                 : Skip (not compiled in)
  56: unit_number__scnprintf                                : Ok
  57: mem2node                                              : Ok
  58: x86 rdpmc                                             : Ok
  59: Convert perf time to TSC                              : Ok
  60: DWARF unwind                                          : Ok
  61: x86 instruction decoder - new instructions            : Ok
  62: Use vfs_getname probe to get syscall args filenames   : Ok
  63: Check open filename arg using perf trace + vfs_getname: Ok
  64: probe libc's inet_pton & backtrace it with ping       : Ok
  65: 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_debug_O: make DEBUG=1
           make_no_backtrace_O: make NO_BACKTRACE=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
             make_no_libnuma_O: make NO_LIBNUMA=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
                 make_static_O: make LDFLAGS=-static
             make_no_libperl_O: make NO_LIBPERL=1
             make_util_map_o_O: make util/map.o
              make_no_libelf_O: make NO_LIBELF=1
               make_no_slang_O: make NO_SLANG=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
                   make_help_O: make help
           make_no_libbionic_O: make NO_LIBBIONIC=1
           make_no_libunwind_O: make NO_LIBUNWIND=1
                make_no_newt_O: make NO_NEWT=1
            make_no_demangle_O: make NO_DEMANGLE=1
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
                 make_perf_o_O: make perf.o
                make_install_O: make install
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                   make_tags_O: make tags
         make_install_prefix_O: make install prefix=/tmp/krava
                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_clean_all_O: make clean all
                make_no_gtk2_O: make NO_GTK2=1
            make_no_auxtrace_O: make NO_AUXTRACE=1
           make_no_libpython_O: make NO_LIBPYTHON=1
              make_no_libbpf_O: make NO_LIBBPF=1
            make_install_bin_O: make install-bin
                    make_doc_O: make doc
                   make_pure_O: make
  OK
  make: Leaving directory '/home/acme/git/perf/tools/perf'
  $

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2017-08-29 19:42 ` Arnaldo Carvalho de Melo
@ 2017-08-29 21:15   ` Ingo Molnar
  -1 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2017-08-29 21:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Alexis Berlemont, Andi Kleen,
	Andy Lutomirski, Arnd Bergmann, Borislav Petkov, Dave Hansen,
	David Ahern, David Carrillo-Cisneros, David Tolnay, Hanjun Guo,
	Hemant Kumar, Jack Henschel, Janakarajan Natarajan, Jiri Olsa,
	Joe Mario, Li Bin, Mark Rutland, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Paul Turner, Peter Zijlstra, Stephane Eranian,
	Wang Nan, zhangmengting, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit b00233b5306512a09e339d69ef5e390a77f2d302:
> 
>   perf/x86: Export some PMU attributes in caps/ directory (2017-08-25 11:04:20 +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.14-20170829
> 
> for you to fetch changes up to b2f7605076d6cdd68162c42c34caadafbbe4c69f:
> 
>   perf symbols: Fix plt entry calculation for ARM and AARCH64 (2017-08-29 11:41:27 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Fix remote HITM detection for Skylake in 'perf c2c' (Jiri Olsa)
> 
> - Fixes for the handling of PERF_RECORD_READ records (Jiri Olsa)
> 
> - Fix kprobes blackist symbol lookup in 'perf probe' (Li Bin)
> 
> - The PLT header and entry sizes are not the same in !x86, fix it for ARM and
>   AARCH64 (Li Bin)
> 
> - Beautify pkey_{alloc,free,mprotect} arguments in 'perf trace' (Arnaldo Carvalho de Melo)
> 
> - Fix CC, AR, LD external definition, allow flex and bison to be
>   externally defined and other related Makefile fixes (David Carrillo-Cisneros)
> 
> - Sync cpu features kernel ABI headers with tooling headers (Arnaldo Carvalho de Melo)
> 
> - Fix path to PMU formats in 'perf stat' documentation (Jack Henschel)
> 
> - Fix static build with newer toolchains (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       tools headers: Sync cpu features kernel ABI headers with tooling headers
>       perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments
> 
> David Carrillo-Cisneros (5):
>       tools build tests: Don't hardcode gcc name
>       perf tools: Allow external definition of flex and bison binary names
>       tools lib: Allow external definition of CC, AR and LD
>       perf tools: Robustify detection of clang binary
>       perf tools: Pass full path of FEATURES_DUMP
> 
> Jack Henschel (1):
>       perf stat: Fix path to PMU formats in documentation
> 
> Jiri Olsa (8):
>       perf tools: Fix static build with newer toolchains
>       perf c2c: Fix remote HITM detection for Skylake
>       perf record: Set read_format for inherit_stat
>       perf report: Add dump_read function
>       perf values: Fix thread index bug
>       perf values: Fix allocation check
>       perf values: Zero value buffers
>       perf report: Group stat values on global event id
> 
> Li Bin (2):
>       perf probe: Fix kprobe blacklist checking condition
>       perf symbols: Fix plt entry calculation for ARM and AARCH64
> 
>  tools/arch/x86/include/asm/cpufeatures.h           |  5 +--
>  tools/arch/x86/include/asm/disabled-features.h     |  4 +-
>  tools/build/tests/ex/Makefile                      |  2 +-
>  tools/lib/api/Makefile                             |  8 ++--
>  tools/lib/subcmd/Makefile                          |  2 +-
>  tools/perf/Documentation/perf-stat.txt             |  4 +-
>  tools/perf/Makefile.config                         |  4 +-
>  tools/perf/Makefile.perf                           | 26 ++++++++---
>  tools/perf/builtin-report.c                        |  6 +--
>  tools/perf/builtin-trace.c                         |  8 ++++
>  tools/perf/trace/beauty/Build                      |  1 +
>  tools/perf/trace/beauty/beauty.h                   |  3 ++
>  tools/perf/trace/beauty/pkey_alloc.c               | 50 ++++++++++++++++++++++
>  .../perf/trace/beauty/pkey_alloc_access_rights.sh  | 10 +++++
>  tools/perf/util/evsel.c                            |  7 ++-
>  tools/perf/util/intel-pt-decoder/Build             |  2 +-
>  tools/perf/util/mem-events.c                       | 11 ++++-
>  tools/perf/util/probe-event.c                      |  2 +-
>  tools/perf/util/session.c                          | 25 +++++++++++
>  tools/perf/util/symbol-elf.c                       | 27 +++++++++---
>  tools/perf/util/values.c                           | 17 +++++---
>  tools/scripts/Makefile.include                     |  4 +-
>  22 files changed, 185 insertions(+), 43 deletions(-)
>  create mode 100644 tools/perf/trace/beauty/pkey_alloc.c
>  create mode 100755 tools/perf/trace/beauty/pkey_alloc_access_rights.sh

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
@ 2017-08-29 21:15   ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2017-08-29 21:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, linux-perf-users, Adrian Hunter,
	Alexander Shishkin, Alexis Berlemont, Andi Kleen,
	Andy Lutomirski, Arnd Bergmann, Borislav Petkov, Dave Hansen,
	David Ahern, David Carrillo-Cisneros, David Tolnay, Hanjun Guo,
	Hemant Kumar, Jack Henschel, Janakarajan Natarajan, Jiri Olsa,
	Joe Mario, Li Bin


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit b00233b5306512a09e339d69ef5e390a77f2d302:
> 
>   perf/x86: Export some PMU attributes in caps/ directory (2017-08-25 11:04:20 +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.14-20170829
> 
> for you to fetch changes up to b2f7605076d6cdd68162c42c34caadafbbe4c69f:
> 
>   perf symbols: Fix plt entry calculation for ARM and AARCH64 (2017-08-29 11:41:27 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> - Fix remote HITM detection for Skylake in 'perf c2c' (Jiri Olsa)
> 
> - Fixes for the handling of PERF_RECORD_READ records (Jiri Olsa)
> 
> - Fix kprobes blackist symbol lookup in 'perf probe' (Li Bin)
> 
> - The PLT header and entry sizes are not the same in !x86, fix it for ARM and
>   AARCH64 (Li Bin)
> 
> - Beautify pkey_{alloc,free,mprotect} arguments in 'perf trace' (Arnaldo Carvalho de Melo)
> 
> - Fix CC, AR, LD external definition, allow flex and bison to be
>   externally defined and other related Makefile fixes (David Carrillo-Cisneros)
> 
> - Sync cpu features kernel ABI headers with tooling headers (Arnaldo Carvalho de Melo)
> 
> - Fix path to PMU formats in 'perf stat' documentation (Jack Henschel)
> 
> - Fix static build with newer toolchains (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (2):
>       tools headers: Sync cpu features kernel ABI headers with tooling headers
>       perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments
> 
> David Carrillo-Cisneros (5):
>       tools build tests: Don't hardcode gcc name
>       perf tools: Allow external definition of flex and bison binary names
>       tools lib: Allow external definition of CC, AR and LD
>       perf tools: Robustify detection of clang binary
>       perf tools: Pass full path of FEATURES_DUMP
> 
> Jack Henschel (1):
>       perf stat: Fix path to PMU formats in documentation
> 
> Jiri Olsa (8):
>       perf tools: Fix static build with newer toolchains
>       perf c2c: Fix remote HITM detection for Skylake
>       perf record: Set read_format for inherit_stat
>       perf report: Add dump_read function
>       perf values: Fix thread index bug
>       perf values: Fix allocation check
>       perf values: Zero value buffers
>       perf report: Group stat values on global event id
> 
> Li Bin (2):
>       perf probe: Fix kprobe blacklist checking condition
>       perf symbols: Fix plt entry calculation for ARM and AARCH64
> 
>  tools/arch/x86/include/asm/cpufeatures.h           |  5 +--
>  tools/arch/x86/include/asm/disabled-features.h     |  4 +-
>  tools/build/tests/ex/Makefile                      |  2 +-
>  tools/lib/api/Makefile                             |  8 ++--
>  tools/lib/subcmd/Makefile                          |  2 +-
>  tools/perf/Documentation/perf-stat.txt             |  4 +-
>  tools/perf/Makefile.config                         |  4 +-
>  tools/perf/Makefile.perf                           | 26 ++++++++---
>  tools/perf/builtin-report.c                        |  6 +--
>  tools/perf/builtin-trace.c                         |  8 ++++
>  tools/perf/trace/beauty/Build                      |  1 +
>  tools/perf/trace/beauty/beauty.h                   |  3 ++
>  tools/perf/trace/beauty/pkey_alloc.c               | 50 ++++++++++++++++++++++
>  .../perf/trace/beauty/pkey_alloc_access_rights.sh  | 10 +++++
>  tools/perf/util/evsel.c                            |  7 ++-
>  tools/perf/util/intel-pt-decoder/Build             |  2 +-
>  tools/perf/util/mem-events.c                       | 11 ++++-
>  tools/perf/util/probe-event.c                      |  2 +-
>  tools/perf/util/session.c                          | 25 +++++++++++
>  tools/perf/util/symbol-elf.c                       | 27 +++++++++---
>  tools/perf/util/values.c                           | 17 +++++---
>  tools/scripts/Makefile.include                     |  4 +-
>  22 files changed, 185 insertions(+), 43 deletions(-)
>  create mode 100644 tools/perf/trace/beauty/pkey_alloc.c
>  create mode 100755 tools/perf/trace/beauty/pkey_alloc_access_rights.sh

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2017-08-29 19:42 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-29 19:42 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Alexis Berlemont, Andi Kleen,
	Andy Lutomirski, Arnd Bergmann, Borislav Petkov, Dave Hansen,
	David Ahern, David Carrillo-Cisneros, David Tolnay, Hanjun Guo,
	Hemant Kumar, Jack Henschel, Janakarajan Natarajan, Jiri Olsa,
	Joe Mario, Li Bin, Mark Rutland, Masami Hiramatsu, Milian Wolff,
	Namhyung Kim, Paul Turner, Peter Zijlstra, Stephane Eranian,
	Wang Nan, zhangmengting, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit b00233b5306512a09e339d69ef5e390a77f2d302:

  perf/x86: Export some PMU attributes in caps/ directory (2017-08-25 11:04:20 +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.14-20170829

for you to fetch changes up to b2f7605076d6cdd68162c42c34caadafbbe4c69f:

  perf symbols: Fix plt entry calculation for ARM and AARCH64 (2017-08-29 11:41:27 -0300)

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

- Fix remote HITM detection for Skylake in 'perf c2c' (Jiri Olsa)

- Fixes for the handling of PERF_RECORD_READ records (Jiri Olsa)

- Fix kprobes blackist symbol lookup in 'perf probe' (Li Bin)

- The PLT header and entry sizes are not the same in !x86, fix it for ARM and
  AARCH64 (Li Bin)

- Beautify pkey_{alloc,free,mprotect} arguments in 'perf trace' (Arnaldo Carvalho de Melo)

- Fix CC, AR, LD external definition, allow flex and bison to be
  externally defined and other related Makefile fixes (David Carrillo-Cisneros)

- Sync cpu features kernel ABI headers with tooling headers (Arnaldo Carvalho de Melo)

- Fix path to PMU formats in 'perf stat' documentation (Jack Henschel)

- Fix static build with newer toolchains (Jiri Olsa)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      tools headers: Sync cpu features kernel ABI headers with tooling headers
      perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments

David Carrillo-Cisneros (5):
      tools build tests: Don't hardcode gcc name
      perf tools: Allow external definition of flex and bison binary names
      tools lib: Allow external definition of CC, AR and LD
      perf tools: Robustify detection of clang binary
      perf tools: Pass full path of FEATURES_DUMP

Jack Henschel (1):
      perf stat: Fix path to PMU formats in documentation

Jiri Olsa (8):
      perf tools: Fix static build with newer toolchains
      perf c2c: Fix remote HITM detection for Skylake
      perf record: Set read_format for inherit_stat
      perf report: Add dump_read function
      perf values: Fix thread index bug
      perf values: Fix allocation check
      perf values: Zero value buffers
      perf report: Group stat values on global event id

Li Bin (2):
      perf probe: Fix kprobe blacklist checking condition
      perf symbols: Fix plt entry calculation for ARM and AARCH64

 tools/arch/x86/include/asm/cpufeatures.h           |  5 +--
 tools/arch/x86/include/asm/disabled-features.h     |  4 +-
 tools/build/tests/ex/Makefile                      |  2 +-
 tools/lib/api/Makefile                             |  8 ++--
 tools/lib/subcmd/Makefile                          |  2 +-
 tools/perf/Documentation/perf-stat.txt             |  4 +-
 tools/perf/Makefile.config                         |  4 +-
 tools/perf/Makefile.perf                           | 26 ++++++++---
 tools/perf/builtin-report.c                        |  6 +--
 tools/perf/builtin-trace.c                         |  8 ++++
 tools/perf/trace/beauty/Build                      |  1 +
 tools/perf/trace/beauty/beauty.h                   |  3 ++
 tools/perf/trace/beauty/pkey_alloc.c               | 50 ++++++++++++++++++++++
 .../perf/trace/beauty/pkey_alloc_access_rights.sh  | 10 +++++
 tools/perf/util/evsel.c                            |  7 ++-
 tools/perf/util/intel-pt-decoder/Build             |  2 +-
 tools/perf/util/mem-events.c                       | 11 ++++-
 tools/perf/util/probe-event.c                      |  2 +-
 tools/perf/util/session.c                          | 25 +++++++++++
 tools/perf/util/symbol-elf.c                       | 27 +++++++++---
 tools/perf/util/values.c                           | 17 +++++---
 tools/scripts/Makefile.include                     |  4 +-
 22 files changed, 185 insertions(+), 43 deletions(-)
 create mode 100644 tools/perf/trace/beauty/pkey_alloc.c
 create mode 100755 tools/perf/trace/beauty/pkey_alloc_access_rights.sh

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.

The 'perf test'  also runs shell scripts exercising the tools, checking
if they affect the system in certain ways, like setting up kprobes and
uprobes, request callchains for well known programs and check that they
are the expected ones, see if 'perf trace' beautifies system call
arguments correctly, etc.

Additionally, a new set of tests, script based, runs the tools in a live system,
setting probes in place that then gets used by 'perf trace', with its output
compared against expected results.

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:3.6: Ok
   4 alpine:edge: Ok
   5 android-ndk:r12b-arm: Ok
   6 archlinux:latest: Ok
   7 centos:5: Ok
   8 centos:6: Ok
   9 centos:7: Ok
  10 debian:7: Ok
  11 debian:8: Ok
  12 debian:9: Ok
  13 debian:experimental: Ok
  14 debian:experimental-x-arm64: Ok
  15 debian:experimental-x-mips: Ok
  16 debian:experimental-x-mips64: Ok
  17 debian:experimental-x-mipsel: Ok
  18 fedora:20: Ok
  19 fedora:21: Ok
  20 fedora:22: Ok
  21 fedora:23: Ok
  22 fedora:24: Ok
  23 fedora:24-x-ARC-uClibc: Ok
  24 fedora:25: Ok
  25 fedora:26: Ok
  26 fedora:rawhide: Ok
  27 mageia:5: Ok
  28 opensuse:13.2: Ok
  29 opensuse:42.1: Ok
  30 opensuse:42.2: Ok
  31 opensuse:42.3: Ok
  32 opensuse:tumbleweed: Ok
  33 oraclelinux:6: Ok
  34 oraclelinux:7: Ok
  35 ubuntu:12.04.5: Ok
  36 ubuntu:14.04.4: Ok
  37 ubuntu:14.04.4-x-linaro-arm64: Ok
  38 ubuntu:15.10: Ok
  39 ubuntu:16.04: Ok
  40 ubuntu:16.04-x-arm: Ok
  41 ubuntu:16.04-x-arm64: Ok
  42 ubuntu:16.04-x-powerpc: Ok
  43 ubuntu:16.04-x-powerpc64: Ok
  44 ubuntu:16.04-x-powerpc64el: Ok
  45 ubuntu:16.04-x-s390: Ok
  46 ubuntu:16.10: Ok
  47 ubuntu:17.04: Ok
  48 ubuntu:17.10: Ok
  #

  # uname -a
  Linux jouet 4.13.0-rc4+ #2 SMP Fri Aug 11 12:39:09 -03 2017 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: 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: Number of exit events of a simple workload            : Ok
  22: Software clock events period values                   : Ok
  23: Object code reading                                   : Ok
  24: Sample parsing                                        : Ok
  25: Use a dummy software event to keep tracking           : Ok
  26: Parse with no sample_id_all bit set                   : Ok
  27: Filter hist entries                                   : Ok
  28: Lookup mmap thread                                    : Ok
  29: Share thread mg                                       : Ok
  30: Sort output of hist entries                           : Ok
  31: Cumulate child hist entries                           : Ok
  32: Track with sched_switch                               : Ok
  33: Filter fds with revents mask in a fdarray             : Ok
  34: Add fd to a fdarray, making it autogrow               : Ok
  35: kmod_path__parse                                      : Ok
  36: Thread map                                            : Ok
  37: LLVM search and compile                               :
  37.1: Basic BPF llvm compile                              : Ok
  37.2: kbuild searching                                    : Ok
  37.3: Compile source for BPF prologue generation          : Ok
  37.4: Compile source for BPF relocation                   : Ok
  38: Session topology                                      : Ok
  39: BPF filter                                            :
  39.1: Basic BPF filtering                                 : Ok
  39.2: BPF pinning                                         : Ok
  39.3: BPF prologue generation                             : Ok
  39.4: BPF relocation checker                              : Ok
  40: Synthesize thread map                                 : Ok
  41: Remove thread map                                     : Ok
  42: Synthesize cpu map                                    : Ok
  43: Synthesize stat config                                : Ok
  44: Synthesize stat                                       : Ok
  45: Synthesize stat round                                 : Ok
  46: Synthesize attr update                                : Ok
  47: Event times                                           : Ok
  48: Read backward ring buffer                             : Ok
  49: Print cpu map                                         : Ok
  50: Probe SDT events                                      : Ok
  51: is_printable_array                                    : Ok
  52: Print bitmap                                          : Ok
  53: perf hooks                                            : Ok
  54: builtin clang support                                 : Skip (not compiled in)
  55: unit_number__scnprintf                                : Ok
  56: x86 rdpmc                                             : Ok
  57: Convert perf time to TSC                              : Ok
  58: DWARF unwind                                          : Ok
  59: x86 instruction decoder - new instructions            : Ok
  60: Intel cqm nmi context read                            : Skip
  61: Use vfs_getname probe to get syscall args filenames   : Ok
  62: probe libc's inet_pton & backtrace it with ping       : Ok
  63: Check open filename arg using perf trace + vfs_getname: Ok
  64: Add vfs_getname probe to get syscall args filenames   : Ok
  #

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

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2017-08-29 19:42 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-08-29 19:42 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, linux-perf-users, Arnaldo Carvalho de Melo,
	Adrian Hunter, Alexander Shishkin, Alexis Berlemont, Andi Kleen,
	Andy Lutomirski, Arnd Bergmann, Borislav Petkov, Dave Hansen,
	David Ahern, David Carrillo-Cisneros, David Tolnay, Hanjun Guo,
	Hemant Kumar, Jack Henschel, Janakarajan Natarajan, Jiri Olsa,
	Joe Mario

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit b00233b5306512a09e339d69ef5e390a77f2d302:

  perf/x86: Export some PMU attributes in caps/ directory (2017-08-25 11:04:20 +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.14-20170829

for you to fetch changes up to b2f7605076d6cdd68162c42c34caadafbbe4c69f:

  perf symbols: Fix plt entry calculation for ARM and AARCH64 (2017-08-29 11:41:27 -0300)

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

- Fix remote HITM detection for Skylake in 'perf c2c' (Jiri Olsa)

- Fixes for the handling of PERF_RECORD_READ records (Jiri Olsa)

- Fix kprobes blackist symbol lookup in 'perf probe' (Li Bin)

- The PLT header and entry sizes are not the same in !x86, fix it for ARM and
  AARCH64 (Li Bin)

- Beautify pkey_{alloc,free,mprotect} arguments in 'perf trace' (Arnaldo Carvalho de Melo)

- Fix CC, AR, LD external definition, allow flex and bison to be
  externally defined and other related Makefile fixes (David Carrillo-Cisneros)

- Sync cpu features kernel ABI headers with tooling headers (Arnaldo Carvalho de Melo)

- Fix path to PMU formats in 'perf stat' documentation (Jack Henschel)

- Fix static build with newer toolchains (Jiri Olsa)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (2):
      tools headers: Sync cpu features kernel ABI headers with tooling headers
      perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments

David Carrillo-Cisneros (5):
      tools build tests: Don't hardcode gcc name
      perf tools: Allow external definition of flex and bison binary names
      tools lib: Allow external definition of CC, AR and LD
      perf tools: Robustify detection of clang binary
      perf tools: Pass full path of FEATURES_DUMP

Jack Henschel (1):
      perf stat: Fix path to PMU formats in documentation

Jiri Olsa (8):
      perf tools: Fix static build with newer toolchains
      perf c2c: Fix remote HITM detection for Skylake
      perf record: Set read_format for inherit_stat
      perf report: Add dump_read function
      perf values: Fix thread index bug
      perf values: Fix allocation check
      perf values: Zero value buffers
      perf report: Group stat values on global event id

Li Bin (2):
      perf probe: Fix kprobe blacklist checking condition
      perf symbols: Fix plt entry calculation for ARM and AARCH64

 tools/arch/x86/include/asm/cpufeatures.h           |  5 +--
 tools/arch/x86/include/asm/disabled-features.h     |  4 +-
 tools/build/tests/ex/Makefile                      |  2 +-
 tools/lib/api/Makefile                             |  8 ++--
 tools/lib/subcmd/Makefile                          |  2 +-
 tools/perf/Documentation/perf-stat.txt             |  4 +-
 tools/perf/Makefile.config                         |  4 +-
 tools/perf/Makefile.perf                           | 26 ++++++++---
 tools/perf/builtin-report.c                        |  6 +--
 tools/perf/builtin-trace.c                         |  8 ++++
 tools/perf/trace/beauty/Build                      |  1 +
 tools/perf/trace/beauty/beauty.h                   |  3 ++
 tools/perf/trace/beauty/pkey_alloc.c               | 50 ++++++++++++++++++++++
 .../perf/trace/beauty/pkey_alloc_access_rights.sh  | 10 +++++
 tools/perf/util/evsel.c                            |  7 ++-
 tools/perf/util/intel-pt-decoder/Build             |  2 +-
 tools/perf/util/mem-events.c                       | 11 ++++-
 tools/perf/util/probe-event.c                      |  2 +-
 tools/perf/util/session.c                          | 25 +++++++++++
 tools/perf/util/symbol-elf.c                       | 27 +++++++++---
 tools/perf/util/values.c                           | 17 +++++---
 tools/scripts/Makefile.include                     |  4 +-
 22 files changed, 185 insertions(+), 43 deletions(-)
 create mode 100644 tools/perf/trace/beauty/pkey_alloc.c
 create mode 100755 tools/perf/trace/beauty/pkey_alloc_access_rights.sh

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.

The 'perf test'  also runs shell scripts exercising the tools, checking
if they affect the system in certain ways, like setting up kprobes and
uprobes, request callchains for well known programs and check that they
are the expected ones, see if 'perf trace' beautifies system call
arguments correctly, etc.

Additionally, a new set of tests, script based, runs the tools in a live system,
setting probes in place that then gets used by 'perf trace', with its output
compared against expected results.

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:3.6: Ok
   4 alpine:edge: Ok
   5 android-ndk:r12b-arm: Ok
   6 archlinux:latest: Ok
   7 centos:5: Ok
   8 centos:6: Ok
   9 centos:7: Ok
  10 debian:7: Ok
  11 debian:8: Ok
  12 debian:9: Ok
  13 debian:experimental: Ok
  14 debian:experimental-x-arm64: Ok
  15 debian:experimental-x-mips: Ok
  16 debian:experimental-x-mips64: Ok
  17 debian:experimental-x-mipsel: Ok
  18 fedora:20: Ok
  19 fedora:21: Ok
  20 fedora:22: Ok
  21 fedora:23: Ok
  22 fedora:24: Ok
  23 fedora:24-x-ARC-uClibc: Ok
  24 fedora:25: Ok
  25 fedora:26: Ok
  26 fedora:rawhide: Ok
  27 mageia:5: Ok
  28 opensuse:13.2: Ok
  29 opensuse:42.1: Ok
  30 opensuse:42.2: Ok
  31 opensuse:42.3: Ok
  32 opensuse:tumbleweed: Ok
  33 oraclelinux:6: Ok
  34 oraclelinux:7: Ok
  35 ubuntu:12.04.5: Ok
  36 ubuntu:14.04.4: Ok
  37 ubuntu:14.04.4-x-linaro-arm64: Ok
  38 ubuntu:15.10: Ok
  39 ubuntu:16.04: Ok
  40 ubuntu:16.04-x-arm: Ok
  41 ubuntu:16.04-x-arm64: Ok
  42 ubuntu:16.04-x-powerpc: Ok
  43 ubuntu:16.04-x-powerpc64: Ok
  44 ubuntu:16.04-x-powerpc64el: Ok
  45 ubuntu:16.04-x-s390: Ok
  46 ubuntu:16.10: Ok
  47 ubuntu:17.04: Ok
  48 ubuntu:17.10: Ok
  #

  # uname -a
  Linux jouet 4.13.0-rc4+ #2 SMP Fri Aug 11 12:39:09 -03 2017 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: 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: Number of exit events of a simple workload            : Ok
  22: Software clock events period values                   : Ok
  23: Object code reading                                   : Ok
  24: Sample parsing                                        : Ok
  25: Use a dummy software event to keep tracking           : Ok
  26: Parse with no sample_id_all bit set                   : Ok
  27: Filter hist entries                                   : Ok
  28: Lookup mmap thread                                    : Ok
  29: Share thread mg                                       : Ok
  30: Sort output of hist entries                           : Ok
  31: Cumulate child hist entries                           : Ok
  32: Track with sched_switch                               : Ok
  33: Filter fds with revents mask in a fdarray             : Ok
  34: Add fd to a fdarray, making it autogrow               : Ok
  35: kmod_path__parse                                      : Ok
  36: Thread map                                            : Ok
  37: LLVM search and compile                               :
  37.1: Basic BPF llvm compile                              : Ok
  37.2: kbuild searching                                    : Ok
  37.3: Compile source for BPF prologue generation          : Ok
  37.4: Compile source for BPF relocation                   : Ok
  38: Session topology                                      : Ok
  39: BPF filter                                            :
  39.1: Basic BPF filtering                                 : Ok
  39.2: BPF pinning                                         : Ok
  39.3: BPF prologue generation                             : Ok
  39.4: BPF relocation checker                              : Ok
  40: Synthesize thread map                                 : Ok
  41: Remove thread map                                     : Ok
  42: Synthesize cpu map                                    : Ok
  43: Synthesize stat config                                : Ok
  44: Synthesize stat                                       : Ok
  45: Synthesize stat round                                 : Ok
  46: Synthesize attr update                                : Ok
  47: Event times                                           : Ok
  48: Read backward ring buffer                             : Ok
  49: Print cpu map                                         : Ok
  50: Probe SDT events                                      : Ok
  51: is_printable_array                                    : Ok
  52: Print bitmap                                          : Ok
  53: perf hooks                                            : Ok
  54: builtin clang support                                 : Skip (not compiled in)
  55: unit_number__scnprintf                                : Ok
  56: x86 rdpmc                                             : Ok
  57: Convert perf time to TSC                              : Ok
  58: DWARF unwind                                          : Ok
  59: x86 instruction decoder - new instructions            : Ok
  60: Intel cqm nmi context read                            : Skip
  61: Use vfs_getname probe to get syscall args filenames   : Ok
  62: probe libc's inet_pton & backtrace it with ping       : Ok
  63: Check open filename arg using perf trace + vfs_getname: Ok
  64: Add vfs_getname probe to get syscall args filenames   : Ok
  #

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

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2017-04-12  7:13   ` Christian Borntraeger
@ 2017-04-12  7:24     ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2017-04-12  7:24 UTC (permalink / raw)
  To: Christian Borntraeger
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Alexander Shishkin,
	Andi Kleen, Andreas Krebbel, Andrew Vagin, David Ahern,
	David Carrillo-Cisneros, Don Zickus, He Kuang, Hendrik Brueckner,
	Jiri Olsa, Kan Liang, Martin Schwidefsky, Masami Hiramatsu,
	Namhyung Kim, Paul Turner, Peter Zijlstra, Simon Que, stable, #,
	v4.10+,
	Stephane Eranian, Taeung Song, Wang Nan, Yao Jin,
	Arnaldo Carvalho de Melo


* Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> The merge looks wrong:
> 
> dbdebdc53 (Ravi Bangoria            2016-11-23 21:33:46 +0530  133)     },
> 3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  134)     {
> 3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  135)             .name = "s390",
> d9f8dfa9b (Christian Borntraeger    2017-04-06 09:51:52 +0200  136)             .init = s390__annotate_init,
> e77852b32 (Christian Borntraeger    2017-04-06 09:51:51 +0200  137)             .objdump =  {
> e77852b32 (Christian Borntraeger    2017-04-06 09:51:51 +0200  138)                     .comment_char = '#',
> e77852b32 (Christian Borntraeger    2017-04-06 09:51:51 +0200  139)             },
> e77852b32 (Christian Borntraeger    2017-04-06 09:51:51 +0200  140)     },
> 43d5b075c (Ingo Molnar              2017-04-12 07:29:13 +0200  141)     {
> 43d5b075c (Ingo Molnar              2017-04-12 07:29:13 +0200  142)             .name = "s390",
> 3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  143)             .objdump =  {
> 3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  144)                     .comment_char = '#',
> 3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  145)             },
> 3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  146)     },
> 786c1b518 (Arnaldo Carvalho de Melo 2016-11-16 15:39:50 -0300  147) };
> 
> You can delete line 141-146

Ok, I've deleted those lines and amended the merge commit - thanks!

	Ingo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2017-04-12  5:30 ` Ingo Molnar
@ 2017-04-12  7:13   ` Christian Borntraeger
  2017-04-12  7:24     ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Christian Borntraeger @ 2017-04-12  7:13 UTC (permalink / raw)
  To: Ingo Molnar, Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexander Shishkin, Andi Kleen, Andreas Krebbel,
	Andrew Vagin, David Ahern, David Carrillo-Cisneros, Don Zickus,
	He Kuang, Hendrik Brueckner, Jiri Olsa, Kan Liang,
	Martin Schwidefsky, Masami Hiramatsu, Namhyung Kim, Paul Turner,
	Peter Zijlstra, Simon Que, stable, #, v4.10+,
	Stephane Eranian, Taeung Song, Wang Nan, Yao Jin,
	Arnaldo Carvalho de Melo

On 04/12/2017 07:30 AM, Ingo Molnar wrote:
> 
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> 
>> Hi Ingo,
>>
>> 	Please consider pulling,
>>
>> - Arnaldo
>>
>> Test results at the end of this message, as usual.
>>
>> The following changes since commit 9df9078ef2086652647248ee6e82ca8f661cb3f5:
>>
>>   perf/amd/uncore: Fix pr_fmt() prefix (2017-04-11 08:44:59 +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-20170411
>>
>> for you to fetch changes up to 986a5bc028a84d487c354a529730b48682d1fb41:
>>
>>   perf annotate: Use stripped line instead of raw disassemble line (2017-04-11 16:22:23 -0300)
>>
>> ----------------------------------------------------------------
>> perf/core improvements and fixes:
>>
>> User visible:
>>
>> - Support s390 jump instructions in perf annotate (Christian Borntraeger)
>>
>> - When failing to setup multiple events (e.g. '-e irq_vectors:*'), state
>>   which one caused the failure (Yao Jin)
>>
>> - Various fixes for pipe mode, where the output of 'perf record' is
>>   written to stdout instead of to a perf.data file, fixing workloads
>>   such as: (David Carrillo-Cisneros)
>>
>>     $ perf record -o - noploop | perf inject -b > perf.data
>>
>>     $ perf record -o - noploop | perf annotate
>>
>> Infrastructure:
>>
>> - Simplify ltrim() implementation (Arnaldo Carvalho de Melo)
>>
>> - Use ltrim() and rtrim() in places where ad-hoc equivalents were being
>>   used (Taeung Song)
>>
>> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>>
>> ----------------------------------------------------------------
>> Arnaldo Carvalho de Melo (3):
>>       perf callchains: Switch from strtok() to strtok_r() when parsing options
>>       perf script: Use strtok_r() when parsing output field list
>>       perf string: Simplify ltrim() implementation
>>
>> Christian Borntraeger (2):
>>       perf annotate s390: Fix perf annotate error -95 (4.10 regression)
>>       perf annotate s390: Implement jump types for perf annotate
>>
>> David Carrillo-Cisneros (6):
>>       perf inject: Don't proceed if perf_session__process_event() fails
>>       perf inject: Copy events when reordering events in pipe mode
>>       perf tools: Describe pipe mode in perf.data-file-fomat.txt
>>       perf annotate: Process attr and build_id records
>>       perf session: Don't rely on evlist in pipe mode
>>       perf tools: Do not print missing features in pipe-mode
>>
>> Jin Yao (1):
>>       perf evsel: Return exact sub event which failed with EPERM for wildcards
>>
>> Taeung Song (6):
>>       perf stat: Refactor the code to strip csv output with ltrim()
>>       perf ui browser: Refactor the code to parse color configs with ltrim()
>>       perf pmu: Refactor wordwrap() with ltrim()
>>       perf tools: Refactor the code to strip command name with {l,r}trim()
>>       perf annotate: Refactor the code to parse disassemble lines with {l,r}trim()
>>       perf annotate: Use stripped line instead of raw disassemble line
>>
>>  tools/perf/Documentation/perf.data-file-format.txt | 19 +++++++-
>>  tools/perf/arch/s390/annotate/instructions.c       | 30 ++++++++++++
>>  tools/perf/builtin-annotate.c                      |  2 +
>>  tools/perf/builtin-inject.c                        |  2 +
>>  tools/perf/builtin-script.c                        |  4 +-
>>  tools/perf/builtin-stat.c                          | 10 +---
>>  tools/perf/ui/browser.c                            |  2 +-
>>  tools/perf/util/annotate.c                         | 54 +++++++---------------
>>  tools/perf/util/callchain.c                        |  4 +-
>>  tools/perf/util/event.c                            | 11 +----
>>  tools/perf/util/evsel.c                            |  8 +++-
>>  tools/perf/util/header.c                           |  3 ++
>>  tools/perf/util/ordered-events.c                   |  3 +-
>>  tools/perf/util/pmu.c                              |  3 +-
>>  tools/perf/util/session.c                          | 17 +++++--
>>  tools/perf/util/string.c                           |  6 +--
>>  16 files changed, 105 insertions(+), 73 deletions(-)
>>  create mode 100644 tools/perf/arch/s390/annotate/instructions.c
> 
> Pulled, thanks a lot Arnaldo!
> 
> Note, there was a conflict in tools/perf/util/annotate.c due to the s390 fix in 
> perf/urgent. I've fixed it up, but please double check the conflict resolution I 
> made in 43d5b075c400.
> 
> Thanks,
> 
> 	Ingo
> 

The merge looks wrong:

dbdebdc53 (Ravi Bangoria            2016-11-23 21:33:46 +0530  133)     },
3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  134)     {
3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  135)             .name = "s390",
d9f8dfa9b (Christian Borntraeger    2017-04-06 09:51:52 +0200  136)             .init = s390__annotate_init,
e77852b32 (Christian Borntraeger    2017-04-06 09:51:51 +0200  137)             .objdump =  {
e77852b32 (Christian Borntraeger    2017-04-06 09:51:51 +0200  138)                     .comment_char = '#',
e77852b32 (Christian Borntraeger    2017-04-06 09:51:51 +0200  139)             },
e77852b32 (Christian Borntraeger    2017-04-06 09:51:51 +0200  140)     },
43d5b075c (Ingo Molnar              2017-04-12 07:29:13 +0200  141)     {
43d5b075c (Ingo Molnar              2017-04-12 07:29:13 +0200  142)             .name = "s390",
3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  143)             .objdump =  {
3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  144)                     .comment_char = '#',
3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  145)             },
3c1a42795 (Christian Borntraeger    2017-04-06 09:51:51 +0200  146)     },
786c1b518 (Arnaldo Carvalho de Melo 2016-11-16 15:39:50 -0300  147) };

You can delete line 141-146

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2017-04-12  0:51 Arnaldo Carvalho de Melo
@ 2017-04-12  5:30 ` Ingo Molnar
  2017-04-12  7:13   ` Christian Borntraeger
  0 siblings, 1 reply; 57+ messages in thread
From: Ingo Molnar @ 2017-04-12  5:30 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexander Shishkin, Andi Kleen, Andreas Krebbel,
	Andrew Vagin, Christian Borntraeger, David Ahern,
	David Carrillo-Cisneros, Don Zickus, He Kuang, Hendrik Brueckner,
	Jiri Olsa, Kan Liang, Martin Schwidefsky, Masami Hiramatsu,
	Namhyung Kim, Paul Turner, Peter Zijlstra, Simon Que, stable, #,
	v4.10+,
	Stephane Eranian, Taeung Song, Wang Nan, Yao Jin,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 9df9078ef2086652647248ee6e82ca8f661cb3f5:
> 
>   perf/amd/uncore: Fix pr_fmt() prefix (2017-04-11 08:44:59 +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-20170411
> 
> for you to fetch changes up to 986a5bc028a84d487c354a529730b48682d1fb41:
> 
>   perf annotate: Use stripped line instead of raw disassemble line (2017-04-11 16:22:23 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Support s390 jump instructions in perf annotate (Christian Borntraeger)
> 
> - When failing to setup multiple events (e.g. '-e irq_vectors:*'), state
>   which one caused the failure (Yao Jin)
> 
> - Various fixes for pipe mode, where the output of 'perf record' is
>   written to stdout instead of to a perf.data file, fixing workloads
>   such as: (David Carrillo-Cisneros)
> 
>     $ perf record -o - noploop | perf inject -b > perf.data
> 
>     $ perf record -o - noploop | perf annotate
> 
> Infrastructure:
> 
> - Simplify ltrim() implementation (Arnaldo Carvalho de Melo)
> 
> - Use ltrim() and rtrim() in places where ad-hoc equivalents were being
>   used (Taeung Song)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       perf callchains: Switch from strtok() to strtok_r() when parsing options
>       perf script: Use strtok_r() when parsing output field list
>       perf string: Simplify ltrim() implementation
> 
> Christian Borntraeger (2):
>       perf annotate s390: Fix perf annotate error -95 (4.10 regression)
>       perf annotate s390: Implement jump types for perf annotate
> 
> David Carrillo-Cisneros (6):
>       perf inject: Don't proceed if perf_session__process_event() fails
>       perf inject: Copy events when reordering events in pipe mode
>       perf tools: Describe pipe mode in perf.data-file-fomat.txt
>       perf annotate: Process attr and build_id records
>       perf session: Don't rely on evlist in pipe mode
>       perf tools: Do not print missing features in pipe-mode
> 
> Jin Yao (1):
>       perf evsel: Return exact sub event which failed with EPERM for wildcards
> 
> Taeung Song (6):
>       perf stat: Refactor the code to strip csv output with ltrim()
>       perf ui browser: Refactor the code to parse color configs with ltrim()
>       perf pmu: Refactor wordwrap() with ltrim()
>       perf tools: Refactor the code to strip command name with {l,r}trim()
>       perf annotate: Refactor the code to parse disassemble lines with {l,r}trim()
>       perf annotate: Use stripped line instead of raw disassemble line
> 
>  tools/perf/Documentation/perf.data-file-format.txt | 19 +++++++-
>  tools/perf/arch/s390/annotate/instructions.c       | 30 ++++++++++++
>  tools/perf/builtin-annotate.c                      |  2 +
>  tools/perf/builtin-inject.c                        |  2 +
>  tools/perf/builtin-script.c                        |  4 +-
>  tools/perf/builtin-stat.c                          | 10 +---
>  tools/perf/ui/browser.c                            |  2 +-
>  tools/perf/util/annotate.c                         | 54 +++++++---------------
>  tools/perf/util/callchain.c                        |  4 +-
>  tools/perf/util/event.c                            | 11 +----
>  tools/perf/util/evsel.c                            |  8 +++-
>  tools/perf/util/header.c                           |  3 ++
>  tools/perf/util/ordered-events.c                   |  3 +-
>  tools/perf/util/pmu.c                              |  3 +-
>  tools/perf/util/session.c                          | 17 +++++--
>  tools/perf/util/string.c                           |  6 +--
>  16 files changed, 105 insertions(+), 73 deletions(-)
>  create mode 100644 tools/perf/arch/s390/annotate/instructions.c

Pulled, thanks a lot Arnaldo!

Note, there was a conflict in tools/perf/util/annotate.c due to the s390 fix in 
perf/urgent. I've fixed it up, but please double check the conflict resolution I 
made in 43d5b075c400.

Thanks,

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2017-04-12  0:51 Arnaldo Carvalho de Melo
  2017-04-12  5:30 ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-04-12  0:51 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Andi Kleen, Andreas Krebbel, Andrew Vagin, Christian Borntraeger,
	David Ahern, David Carrillo-Cisneros, Don Zickus, He Kuang,
	Hendrik Brueckner, Jiri Olsa, Kan Liang, Martin Schwidefsky,
	Masami Hiramatsu, Namhyung Kim, Paul Turner, Peter Zijlstra,
	Simon Que, stable, #, v4.10+,
	Stephane Eranian, Taeung Song, Wang Nan, Yao Jin,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 9df9078ef2086652647248ee6e82ca8f661cb3f5:

  perf/amd/uncore: Fix pr_fmt() prefix (2017-04-11 08:44:59 +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-20170411

for you to fetch changes up to 986a5bc028a84d487c354a529730b48682d1fb41:

  perf annotate: Use stripped line instead of raw disassemble line (2017-04-11 16:22:23 -0300)

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

User visible:

- Support s390 jump instructions in perf annotate (Christian Borntraeger)

- When failing to setup multiple events (e.g. '-e irq_vectors:*'), state
  which one caused the failure (Yao Jin)

- Various fixes for pipe mode, where the output of 'perf record' is
  written to stdout instead of to a perf.data file, fixing workloads
  such as: (David Carrillo-Cisneros)

    $ perf record -o - noploop | perf inject -b > perf.data

    $ perf record -o - noploop | perf annotate

Infrastructure:

- Simplify ltrim() implementation (Arnaldo Carvalho de Melo)

- Use ltrim() and rtrim() in places where ad-hoc equivalents were being
  used (Taeung Song)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      perf callchains: Switch from strtok() to strtok_r() when parsing options
      perf script: Use strtok_r() when parsing output field list
      perf string: Simplify ltrim() implementation

Christian Borntraeger (2):
      perf annotate s390: Fix perf annotate error -95 (4.10 regression)
      perf annotate s390: Implement jump types for perf annotate

David Carrillo-Cisneros (6):
      perf inject: Don't proceed if perf_session__process_event() fails
      perf inject: Copy events when reordering events in pipe mode
      perf tools: Describe pipe mode in perf.data-file-fomat.txt
      perf annotate: Process attr and build_id records
      perf session: Don't rely on evlist in pipe mode
      perf tools: Do not print missing features in pipe-mode

Jin Yao (1):
      perf evsel: Return exact sub event which failed with EPERM for wildcards

Taeung Song (6):
      perf stat: Refactor the code to strip csv output with ltrim()
      perf ui browser: Refactor the code to parse color configs with ltrim()
      perf pmu: Refactor wordwrap() with ltrim()
      perf tools: Refactor the code to strip command name with {l,r}trim()
      perf annotate: Refactor the code to parse disassemble lines with {l,r}trim()
      perf annotate: Use stripped line instead of raw disassemble line

 tools/perf/Documentation/perf.data-file-format.txt | 19 +++++++-
 tools/perf/arch/s390/annotate/instructions.c       | 30 ++++++++++++
 tools/perf/builtin-annotate.c                      |  2 +
 tools/perf/builtin-inject.c                        |  2 +
 tools/perf/builtin-script.c                        |  4 +-
 tools/perf/builtin-stat.c                          | 10 +---
 tools/perf/ui/browser.c                            |  2 +-
 tools/perf/util/annotate.c                         | 54 +++++++---------------
 tools/perf/util/callchain.c                        |  4 +-
 tools/perf/util/event.c                            | 11 +----
 tools/perf/util/evsel.c                            |  8 +++-
 tools/perf/util/header.c                           |  3 ++
 tools/perf/util/ordered-events.c                   |  3 +-
 tools/perf/util/pmu.c                              |  3 +-
 tools/perf/util/session.c                          | 17 +++++--
 tools/perf/util/string.c                           |  6 +--
 16 files changed, 105 insertions(+), 73 deletions(-)
 create mode 100644 tools/perf/arch/s390/annotate/instructions.c

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.

For this specific pull request the samples/bpf/ was disabled, as 'make headers_install'
is failing with the following error, in this case in fedora:rawhide:

    INSTALL usr/include/uapi/ (0 file)
  /git/linux/scripts/Makefile.headersinst:62: *** Missing generated UAPI file ./arch/x86/include/generated/uapi/asm/unistd_32.h.  Stop.
  make[1]: *** [/git/linux/Makefile:1151: headers_install] Error 2
  make[1]: Leaving directory '/tmp/build/linux'
  make: *** [Makefile:152: sub-make] Error 2
  make: Leaving directory '/git/linux'

I'll investigate later, perf and objtool builds just fine, with clang and gcc.

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
  # 

  # uname -a
  Linux jouet 4.11.0-rc6+ #7 SMP Tue Apr 11 11:53:14 -03 2017 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: 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 .
            make_no_auxtrace_O: make NO_AUXTRACE=1
            make_install_bin_O: make install-bin
                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_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
   make_install_prefix_slash_O: make install prefix=/tmp/krava/
             make_no_libperl_O: make NO_LIBPERL=1
              make_no_libelf_O: make NO_LIBELF=1
                make_no_gtk2_O: make NO_GTK2=1
                make_no_newt_O: make NO_NEWT=1
                  make_debug_O: make DEBUG=1
              make_no_libbpf_O: make NO_LIBBPF=1
             make_no_libnuma_O: make NO_LIBNUMA=1
                   make_help_O: make help
              make_clean_all_O: make clean all
           make_no_libunwind_O: make NO_LIBUNWIND=1
           make_no_libpython_O: make NO_LIBPYTHON=1
                 make_perf_o_O: make perf.o
                   make_tags_O: make tags
             make_util_map_o_O: make util/map.o
       make_util_pmu_bison_o_O: make util/pmu-bison.o
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
               make_no_slang_O: make NO_SLANG=1
           make_no_backtrace_O: make NO_BACKTRACE=1
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
         make_with_clangllvm_O: make LIBCLANGLLVM=1
        make_with_babeltrace_O: make LIBBABELTRACE=1
                   make_pure_O: make
                make_install_O: make install
           make_no_libbionic_O: make NO_LIBBIONIC=1
                 make_static_O: make LDFLAGS=-static
                    make_doc_O: make doc
            make_no_demangle_O: make NO_DEMANGLE=1
         make_install_prefix_O: make install prefix=/tmp/krava
            make_no_libaudit_O: make NO_LIBAUDIT=1
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2017-02-20 19:08 Arnaldo Carvalho de Melo
@ 2017-02-21  8:08 ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2017-02-21  8:08 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Borislav Petkov, David Ahern,
	Jan Stancek, Jiri Olsa, kernel-team, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, Steven Rostedt, Wang Nan


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

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> Test results at the end of this message, as usual.
> 
> The following changes since commit 0c8967c9df230d2c4dde6649f410b62e01806c22:
> 
>   Merge tag 'perf-core-for-mingo-4.11-20170215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-02-16 20:53:13 +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.11-20170220
> 
> for you to fetch changes up to 68ba32352d51474d163d58e084b62a12bb610b21:
> 
>   perf record: Honor --quiet option properly (2017-02-20 11:50:36 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Make -a/--all-cpus be the default target in 'perf record' and 'perf stat',
>   just like it is with 'perf trace' (Jiri Olsa)
> 
> - Introduce -q/--quiet to the 'annotate', 'diff' and 'report', fix up
>   its behaviour in 'record'. This makes the output more compact by
>   elliminating headers, leaving just the histogram lines (Namhyung Kim)
> 
> Fixes:
> 
> - Handle offline/absent CPUs (Jan Stancek)
> 
> Infrastructure:
> 
> - Filter out -specs=/a/b/c from CC options when building the python
>   support, allowing that feature to be built with clang (Arnaldo Carvalho de Melo)
> 
> - Fix DEBUG=1 build with clang (Arnaldo Carvalho de Melo)
> 
> Trivial:
> 
> - Fix spelling of 'preempt' in a libtraceevent function name (Steven Rostedt)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (3):
>       tools perf scripting python: clang doesn't have -spec, remove it
>       perf python: Filter out -specs=/a/b/c from the python binding cc options
>       perf session: Fix DEBUG=1 build with clang
> 
> Jan Stancek (3):
>       perf cpumap: Add cpu__max_present_cpu()
>       perf header: Make build_cpu_topology skip offline/absent CPUs
>       perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map
> 
> Jiri Olsa (5):
>       perf build: Add special fixdep cleaning rule
>       perf tools: Move new_term arguments into struct parse_events_term template
>       perf tools: Fail on using multiple bits long terms without value
>       perf stat: Add -a as default target
>       perf record: Add -a as default target
> 
> Namhyung Kim (6):
>       perf utils: Add perf_quiet_option()
>       perf utils: Check verbose flag properly
>       perf report: Add -q/--quiet option
>       perf diff: Add -q/--quiet option
>       perf annotate: Add -q/--quiet option
>       perf record: Honor --quiet option properly
> 
> Steven Rostedt (VMware) (1):
>       tools lib traceevent: It's preempt not prempt
> 
>  tools/build/Makefile                               |  4 +-
>  tools/build/Makefile.include                       |  3 +
>  tools/lib/traceevent/event-parse.c                 |  4 +-
>  tools/lib/traceevent/event-parse.h                 |  2 +-
>  tools/perf/Documentation/perf-annotate.txt         |  4 ++
>  tools/perf/Documentation/perf-diff.txt             |  4 ++
>  tools/perf/Documentation/perf-record.txt           |  2 +-
>  tools/perf/Documentation/perf-report.txt           |  4 ++
>  tools/perf/Documentation/perf-stat.txt             |  2 +-
>  tools/perf/Makefile.config                         |  7 +++
>  tools/perf/Makefile.perf                           |  4 +-
>  tools/perf/builtin-annotate.c                      |  4 ++
>  tools/perf/builtin-diff.c                          | 14 +++--
>  tools/perf/builtin-mem.c                           |  4 +-
>  tools/perf/builtin-record.c                        |  8 ++-
>  tools/perf/builtin-report.c                        | 21 +++++--
>  tools/perf/builtin-sched.c                         | 12 ++--
>  tools/perf/builtin-stat.c                          | 11 ++--
>  tools/perf/builtin-top.c                           |  2 +-
>  tools/perf/builtin-trace.c                         |  6 +-
>  tools/perf/pmu-events/json.c                       |  2 +-
>  tools/perf/tests/attr.c                            |  2 +-
>  tools/perf/tests/builtin-test.c                    |  2 +-
>  tools/perf/tests/code-reading.c                    |  2 +-
>  tools/perf/tests/fdarray.c                         |  2 +-
>  tools/perf/tests/llvm.c                            |  2 +-
>  tools/perf/tests/parse-events.c                    |  2 +-
>  tools/perf/tests/perf-record.c                     |  4 +-
>  tools/perf/tests/python-use.c                      |  2 +-
>  tools/perf/tests/thread-map.c                      |  6 +-
>  tools/perf/tests/topology.c                        |  4 +-
>  tools/perf/tests/vmlinux-kallsyms.c                |  2 +-
>  tools/perf/ui/browsers/map.c                       |  6 +-
>  tools/perf/ui/hist.c                               |  2 +-
>  tools/perf/util/annotate.c                         |  2 +-
>  tools/perf/util/cpumap.c                           | 22 +++++++
>  tools/perf/util/cpumap.h                           |  1 +
>  tools/perf/util/debug.c                            | 17 ++++++
>  tools/perf/util/debug.h                            |  1 +
>  tools/perf/util/dso.c                              |  2 +-
>  tools/perf/util/env.c                              |  2 +-
>  tools/perf/util/header.c                           | 33 ++++++----
>  tools/perf/util/hist.c                             |  6 +-
>  tools/perf/util/parse-events.c                     | 71 +++++++++++++---------
>  tools/perf/util/parse-events.h                     |  2 +
>  tools/perf/util/parse-events.y                     | 14 ++---
>  tools/perf/util/pmu.c                              | 21 +++++--
>  tools/perf/util/probe-event.c                      |  2 +-
>  .../util/scripting-engines/trace-event-python.c    |  4 +-
>  tools/perf/util/session.c                          |  2 +-
>  tools/perf/util/setup.py                           |  9 ++-
>  tools/perf/util/sort.c                             |  8 +--
>  tools/perf/util/stat.c                             |  2 +-
>  tools/perf/util/symbol-elf.c                       |  2 +-
>  54 files changed, 256 insertions(+), 129 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2017-02-20 19:08 Arnaldo Carvalho de Melo
  2017-02-21  8:08 ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-02-20 19:08 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, Borislav Petkov, David Ahern,
	Jan Stancek, Jiri Olsa, kernel-team, Masami Hiramatsu,
	Namhyung Kim, Peter Zijlstra, Steven Rostedt, Wang Nan

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

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 0c8967c9df230d2c4dde6649f410b62e01806c22:

  Merge tag 'perf-core-for-mingo-4.11-20170215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-02-16 20:53:13 +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.11-20170220

for you to fetch changes up to 68ba32352d51474d163d58e084b62a12bb610b21:

  perf record: Honor --quiet option properly (2017-02-20 11:50:36 -0300)

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

New features:

- Make -a/--all-cpus be the default target in 'perf record' and 'perf stat',
  just like it is with 'perf trace' (Jiri Olsa)

- Introduce -q/--quiet to the 'annotate', 'diff' and 'report', fix up
  its behaviour in 'record'. This makes the output more compact by
  elliminating headers, leaving just the histogram lines (Namhyung Kim)

Fixes:

- Handle offline/absent CPUs (Jan Stancek)

Infrastructure:

- Filter out -specs=/a/b/c from CC options when building the python
  support, allowing that feature to be built with clang (Arnaldo Carvalho de Melo)

- Fix DEBUG=1 build with clang (Arnaldo Carvalho de Melo)

Trivial:

- Fix spelling of 'preempt' in a libtraceevent function name (Steven Rostedt)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
      tools perf scripting python: clang doesn't have -spec, remove it
      perf python: Filter out -specs=/a/b/c from the python binding cc options
      perf session: Fix DEBUG=1 build with clang

Jan Stancek (3):
      perf cpumap: Add cpu__max_present_cpu()
      perf header: Make build_cpu_topology skip offline/absent CPUs
      perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map

Jiri Olsa (5):
      perf build: Add special fixdep cleaning rule
      perf tools: Move new_term arguments into struct parse_events_term template
      perf tools: Fail on using multiple bits long terms without value
      perf stat: Add -a as default target
      perf record: Add -a as default target

Namhyung Kim (6):
      perf utils: Add perf_quiet_option()
      perf utils: Check verbose flag properly
      perf report: Add -q/--quiet option
      perf diff: Add -q/--quiet option
      perf annotate: Add -q/--quiet option
      perf record: Honor --quiet option properly

Steven Rostedt (VMware) (1):
      tools lib traceevent: It's preempt not prempt

 tools/build/Makefile                               |  4 +-
 tools/build/Makefile.include                       |  3 +
 tools/lib/traceevent/event-parse.c                 |  4 +-
 tools/lib/traceevent/event-parse.h                 |  2 +-
 tools/perf/Documentation/perf-annotate.txt         |  4 ++
 tools/perf/Documentation/perf-diff.txt             |  4 ++
 tools/perf/Documentation/perf-record.txt           |  2 +-
 tools/perf/Documentation/perf-report.txt           |  4 ++
 tools/perf/Documentation/perf-stat.txt             |  2 +-
 tools/perf/Makefile.config                         |  7 +++
 tools/perf/Makefile.perf                           |  4 +-
 tools/perf/builtin-annotate.c                      |  4 ++
 tools/perf/builtin-diff.c                          | 14 +++--
 tools/perf/builtin-mem.c                           |  4 +-
 tools/perf/builtin-record.c                        |  8 ++-
 tools/perf/builtin-report.c                        | 21 +++++--
 tools/perf/builtin-sched.c                         | 12 ++--
 tools/perf/builtin-stat.c                          | 11 ++--
 tools/perf/builtin-top.c                           |  2 +-
 tools/perf/builtin-trace.c                         |  6 +-
 tools/perf/pmu-events/json.c                       |  2 +-
 tools/perf/tests/attr.c                            |  2 +-
 tools/perf/tests/builtin-test.c                    |  2 +-
 tools/perf/tests/code-reading.c                    |  2 +-
 tools/perf/tests/fdarray.c                         |  2 +-
 tools/perf/tests/llvm.c                            |  2 +-
 tools/perf/tests/parse-events.c                    |  2 +-
 tools/perf/tests/perf-record.c                     |  4 +-
 tools/perf/tests/python-use.c                      |  2 +-
 tools/perf/tests/thread-map.c                      |  6 +-
 tools/perf/tests/topology.c                        |  4 +-
 tools/perf/tests/vmlinux-kallsyms.c                |  2 +-
 tools/perf/ui/browsers/map.c                       |  6 +-
 tools/perf/ui/hist.c                               |  2 +-
 tools/perf/util/annotate.c                         |  2 +-
 tools/perf/util/cpumap.c                           | 22 +++++++
 tools/perf/util/cpumap.h                           |  1 +
 tools/perf/util/debug.c                            | 17 ++++++
 tools/perf/util/debug.h                            |  1 +
 tools/perf/util/dso.c                              |  2 +-
 tools/perf/util/env.c                              |  2 +-
 tools/perf/util/header.c                           | 33 ++++++----
 tools/perf/util/hist.c                             |  6 +-
 tools/perf/util/parse-events.c                     | 71 +++++++++++++---------
 tools/perf/util/parse-events.h                     |  2 +
 tools/perf/util/parse-events.y                     | 14 ++---
 tools/perf/util/pmu.c                              | 21 +++++--
 tools/perf/util/probe-event.c                      |  2 +-
 .../util/scripting-engines/trace-event-python.c    |  4 +-
 tools/perf/util/session.c                          |  2 +-
 tools/perf/util/setup.py                           |  9 ++-
 tools/perf/util/sort.c                             |  8 +--
 tools/perf/util/stat.c                             |  2 +-
 tools/perf/util/symbol-elf.c                       |  2 +-
 54 files changed, 256 insertions(+), 129 deletions(-)

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.

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 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-arm64: Ok
  11 debian:experimental-x-mips: Ok
  12 debian:experimental-x-mips64: Ok
  13 debian:experimental-x-mipsel: Ok
  14 fedora:20: Ok
  15 fedora:21: Ok
  16 fedora:22: Ok
  17 fedora:23: Ok
  18 fedora:24: Ok
  19 fedora:24-x-ARC-uClibc: Ok
  20 fedora:25: Ok
  21 fedora:rawhide: Ok
  22 mageia:5: Ok
  23 opensuse:13.2: Ok
  24 opensuse:42.1: Ok
  25 opensuse:tumbleweed: Ok
  26 ubuntu:12.04.5: Ok
  27 ubuntu:14.04.4-x-linaro-arm64: Ok
  28 ubuntu:15.10: Ok
  29 ubuntu:16.04: Ok
  30 ubuntu:16.04-x-arm: Ok
  31 ubuntu:16.04-x-arm64: Ok
  32 ubuntu:16.04-x-powerpc: Ok
  33 ubuntu:16.04-x-powerpc64: Ok
  34 ubuntu:16.04-x-powerpc64el: Ok
  35 ubuntu:16.04-x-s390: Ok
  36 ubuntu:16.10: Ok
  #

  # uname -a
  Linux jouet 4.10.0-rc8 #2 SMP Wed Feb 15 15:26:36 BRT 2017 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 pinning                              : Ok
  37.3: BPF prologue generation                  : Ok
  37.4: 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: unit_number__scnprintf                     : Ok
  54: x86 rdpmc                                  : Ok
  55: Convert perf time to TSC                   : Ok
  56: DWARF unwind                               : Ok
  57: x86 instruction decoder - new instructions : Ok
  58: 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_with_clangllvm_O: make LIBCLANGLLVM=1
            make_no_libaudit_O: make NO_LIBAUDIT=1
                   make_tags_O: make tags
                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_clean_all_O: make clean all
           make_no_libunwind_O: make NO_LIBUNWIND=1
           make_no_libpython_O: make NO_LIBPYTHON=1
            make_install_bin_O: make install-bin
                make_no_newt_O: make NO_NEWT=1
               make_no_slang_O: make NO_SLANG=1
                    make_doc_O: make doc
              make_no_libbpf_O: make NO_LIBBPF=1
                 make_perf_o_O: make perf.o
         make_install_prefix_O: make install prefix=/tmp/krava
            make_no_auxtrace_O: make NO_AUXTRACE=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_help_O: make help
                   make_pure_O: make
              make_no_libelf_O: make NO_LIBELF=1
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
                  make_debug_O: make DEBUG=1
                make_install_O: make install
           make_no_libbionic_O: make NO_LIBBIONIC=1
                 make_static_O: make LDFLAGS=-static
             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_libperl_O: make NO_LIBPERL=1
           make_no_backtrace_O: make NO_BACKTRACE=1
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
       make_util_pmu_bison_o_O: make util/pmu-bison.o
                make_no_gtk2_O: make NO_GTK2=1
            make_no_demangle_O: make NO_DEMANGLE=1
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2016-06-28 14:01   ` Arnaldo Carvalho de Melo
  2016-06-28 14:12     ` Arnaldo Carvalho de Melo
@ 2016-06-29  9:36     ` Ingo Molnar
  1 sibling, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2016-06-29  9:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Ananth N Mavinakayanahalli,
	Andi Kleen, Anton Blanchard, Daniel Axtens, David Ahern,
	He Kuang, Jiri Olsa, Marc Kleine-Budde, Masami Hiramatsu,
	Michael Ellerman, Namhyung Kim, Naveen N . Rao, Neeraj Badlani,
	Nilay Vaish, Peter Zijlstra, pi3orama, Ravi Bangoria,
	Taeung Song, Wang Nan, Zefan Li, Arnaldo Carvalho de Melo


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

> Em Tue, Jun 28, 2016 at 09:02:57AM +0200, Ingo Molnar escreveu:
> > 
> > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > 
> > > Hi Ingo,
> > > 
> > > 	Please consider pulling,
> > > 
> > > - Arnaldo
> > > 
> > > The following changes since commit d4cf1949f9689314aef962eea95df84a8288d097:
> > > 
> > >   perf/x86/intel: Add {rd,wr}lbr_{to,from} wrappers (2016-06-27 11:34:21 +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-20160627
> > > 
> > > for you to fetch changes up to 6d9c675078e697309c1c06a1051f01de8151c476:
> > > 
> > >   perf data ctf: Generate fork and exit events to CTF output (2016-06-27 15:50:23 -0300)
> > > 
> > > ----------------------------------------------------------------
> > > perf/core improvements and fixes:
> > > 
> > > New features:
> > > 
> > > - Generate comm, fork and exit events when converting perf.data files to CTF (Wang Nan)
> > > 
> > > Documentation:
> > > 
> > > - Document perf.data on disk format (Andi Kleen)
> > > 
> > > Infrastructure:
> > > 
> > > - Add libbabeltrace to build-test (Wang Nan)
> > > 
> > > - 'perf record' prep work to support multiple evlists (Wang Nan)
> > > 
> > > - Remove unused hist_entry__annotate function (Ravi Bangoria)
> > > 
> > > - Add more toolchain triplets (Ravi Bangoria)
> > > 
> > > - Update message for slang devel packages on Ubuntu (Neeraj Badlani)
> > > 
> > > - Generalize handling of 'ret' instructions in the annotate TUI (Naveen N. Rao)
> > > 
> > > - Use proper dso name for is_regular_file, fixing device file handling (Jiri Olsa)
> > > 
> > > Build Fixes:
> > > 
> > > - Add missing config.h include, fixing the build with libabeltrace (Jiri Olsa)
> > > 
> > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > 
> > > ----------------------------------------------------------------
> > > Andi Kleen (1):
> > >       perf tools: Add documentation for perf.data on disk format
> > 
> > The doc build fails with:
> > 
> > asciidoc: FAILED: manpage document title is mandatory
> > Makefile:276: recipe for target 'perf-file-format.xml' failed
> > make[2]: *** [perf-file-format.xml] Error 1
> > make[2]: *** Waiting for unfinished jobs....
> 
> Ok, I've created a perf-core-for-mingo-20160628 with that patch removed
> while we investigate this, please consider pulling that one instead.

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2016-06-28 14:01   ` Arnaldo Carvalho de Melo
@ 2016-06-28 14:12     ` Arnaldo Carvalho de Melo
  2016-06-29  9:36     ` Ingo Molnar
  1 sibling, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-28 14:12 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Adrian Hunter,
	Ananth N Mavinakayanahalli, Andi Kleen, Anton Blanchard,
	Daniel Axtens, David Ahern, He Kuang, Jiri Olsa,
	Marc Kleine-Budde, Masami Hiramatsu, Michael Ellerman,
	Namhyung Kim, Naveen N . Rao, Neeraj Badlani, Nilay Vaish,
	Peter Zijlstra, pi3orama, Ravi Bangoria, Taeung Song, Wang Nan,
	Zefan Li, Arnaldo Carvalho de Melo

Em Tue, Jun 28, 2016 at 11:01:55AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Jun 28, 2016 at 09:02:57AM +0200, Ingo Molnar escreveu:
> > * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > Andi Kleen (1):
> > >       perf tools: Add documentation for perf.data on disk format

> > The doc build fails with:

> > asciidoc: FAILED: manpage document title is mandatory
> > Makefile:276: recipe for target 'perf-file-format.xml' failed
> > make[2]: *** [perf-file-format.xml] Error 1
> > make[2]: *** Waiting for unfinished jobs....
 
> Ok, I've created a perf-core-for-mingo-20160628 with that patch removed
> while we investigate this, please consider pulling that one instead.
 
> build-test should've caught this... Reproduced, trying to fix...

So, when doing the docs install it expects files starting with perf-*
will be fed to asciidoc to generate man pages, etc, so the quick fix
here is to rename perf-file-format.txt to perf.data-file-format.txt,
which I did, so this will go in the next pull request.

Volunteers accepted to turn this into asciidoc format so that we can do
a man perf-data-file-format or somesuch.

- Arnaldo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2016-06-28  7:02 ` Ingo Molnar
  2016-06-28  8:27   ` Jiri Olsa
@ 2016-06-28 14:01   ` Arnaldo Carvalho de Melo
  2016-06-28 14:12     ` Arnaldo Carvalho de Melo
  2016-06-29  9:36     ` Ingo Molnar
  1 sibling, 2 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-28 14:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Ananth N Mavinakayanahalli,
	Andi Kleen, Anton Blanchard, Daniel Axtens, David Ahern,
	He Kuang, Jiri Olsa, Marc Kleine-Budde, Masami Hiramatsu,
	Michael Ellerman, Namhyung Kim, Naveen N . Rao, Neeraj Badlani,
	Nilay Vaish, Peter Zijlstra, pi3orama, Ravi Bangoria,
	Taeung Song, Wang Nan, Zefan Li, Arnaldo Carvalho de Melo

Em Tue, Jun 28, 2016 at 09:02:57AM +0200, Ingo Molnar escreveu:
> 
> * Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> 
> > Hi Ingo,
> > 
> > 	Please consider pulling,
> > 
> > - Arnaldo
> > 
> > The following changes since commit d4cf1949f9689314aef962eea95df84a8288d097:
> > 
> >   perf/x86/intel: Add {rd,wr}lbr_{to,from} wrappers (2016-06-27 11:34:21 +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-20160627
> > 
> > for you to fetch changes up to 6d9c675078e697309c1c06a1051f01de8151c476:
> > 
> >   perf data ctf: Generate fork and exit events to CTF output (2016-06-27 15:50:23 -0300)
> > 
> > ----------------------------------------------------------------
> > perf/core improvements and fixes:
> > 
> > New features:
> > 
> > - Generate comm, fork and exit events when converting perf.data files to CTF (Wang Nan)
> > 
> > Documentation:
> > 
> > - Document perf.data on disk format (Andi Kleen)
> > 
> > Infrastructure:
> > 
> > - Add libbabeltrace to build-test (Wang Nan)
> > 
> > - 'perf record' prep work to support multiple evlists (Wang Nan)
> > 
> > - Remove unused hist_entry__annotate function (Ravi Bangoria)
> > 
> > - Add more toolchain triplets (Ravi Bangoria)
> > 
> > - Update message for slang devel packages on Ubuntu (Neeraj Badlani)
> > 
> > - Generalize handling of 'ret' instructions in the annotate TUI (Naveen N. Rao)
> > 
> > - Use proper dso name for is_regular_file, fixing device file handling (Jiri Olsa)
> > 
> > Build Fixes:
> > 
> > - Add missing config.h include, fixing the build with libabeltrace (Jiri Olsa)
> > 
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > ----------------------------------------------------------------
> > Andi Kleen (1):
> >       perf tools: Add documentation for perf.data on disk format
> 
> The doc build fails with:
> 
> asciidoc: FAILED: manpage document title is mandatory
> Makefile:276: recipe for target 'perf-file-format.xml' failed
> make[2]: *** [perf-file-format.xml] Error 1
> make[2]: *** Waiting for unfinished jobs....

Ok, I've created a perf-core-for-mingo-20160628 with that patch removed
while we investigate this, please consider pulling that one instead.

build-test should've caught this... Reproduced, trying to fix...

- Arnaldo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2016-06-28  7:02 ` Ingo Molnar
@ 2016-06-28  8:27   ` Jiri Olsa
  2016-06-28 14:01   ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 57+ messages in thread
From: Jiri Olsa @ 2016-06-28  8:27 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Adrian Hunter,
	Ananth N Mavinakayanahalli, Andi Kleen, Anton Blanchard,
	Daniel Axtens, David Ahern, He Kuang, Marc Kleine-Budde,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
	Neeraj Badlani, Nilay Vaish, Peter Zijlstra, pi3orama,
	Ravi Bangoria, Taeung Song, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo

On Tue, Jun 28, 2016 at 09:02:57AM +0200, Ingo Molnar wrote:

SNIP

> > - Add missing config.h include, fixing the build with libabeltrace (Jiri Olsa)
> > 
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > ----------------------------------------------------------------
> > Andi Kleen (1):
> >       perf tools: Add documentation for perf.data on disk format
> 
> The doc build fails with:
> 
> asciidoc: FAILED: manpage document title is mandatory
> Makefile:276: recipe for target 'perf-file-format.xml' failed
> make[2]: *** [perf-file-format.xml] Error 1
> make[2]: *** Waiting for unfinished jobs....
> 

hum, my asciidoc does not complain

jirka

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2016-06-27 21:01 Arnaldo Carvalho de Melo
@ 2016-06-28  7:02 ` Ingo Molnar
  2016-06-28  8:27   ` Jiri Olsa
  2016-06-28 14:01   ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 57+ messages in thread
From: Ingo Molnar @ 2016-06-28  7:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Ananth N Mavinakayanahalli,
	Andi Kleen, Anton Blanchard, Daniel Axtens, David Ahern,
	He Kuang, Jiri Olsa, Marc Kleine-Budde, Masami Hiramatsu,
	Michael Ellerman, Namhyung Kim, Naveen N . Rao, Neeraj Badlani,
	Nilay Vaish, Peter Zijlstra, pi3orama, Ravi Bangoria,
	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 d4cf1949f9689314aef962eea95df84a8288d097:
> 
>   perf/x86/intel: Add {rd,wr}lbr_{to,from} wrappers (2016-06-27 11:34:21 +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-20160627
> 
> for you to fetch changes up to 6d9c675078e697309c1c06a1051f01de8151c476:
> 
>   perf data ctf: Generate fork and exit events to CTF output (2016-06-27 15:50:23 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Generate comm, fork and exit events when converting perf.data files to CTF (Wang Nan)
> 
> Documentation:
> 
> - Document perf.data on disk format (Andi Kleen)
> 
> Infrastructure:
> 
> - Add libbabeltrace to build-test (Wang Nan)
> 
> - 'perf record' prep work to support multiple evlists (Wang Nan)
> 
> - Remove unused hist_entry__annotate function (Ravi Bangoria)
> 
> - Add more toolchain triplets (Ravi Bangoria)
> 
> - Update message for slang devel packages on Ubuntu (Neeraj Badlani)
> 
> - Generalize handling of 'ret' instructions in the annotate TUI (Naveen N. Rao)
> 
> - Use proper dso name for is_regular_file, fixing device file handling (Jiri Olsa)
> 
> Build Fixes:
> 
> - Add missing config.h include, fixing the build with libabeltrace (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf tools: Add documentation for perf.data on disk format

The doc build fails with:

asciidoc: FAILED: manpage document title is mandatory
Makefile:276: recipe for target 'perf-file-format.xml' failed
make[2]: *** [perf-file-format.xml] Error 1
make[2]: *** Waiting for unfinished jobs....

Thanks,

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2016-06-27 21:01 Arnaldo Carvalho de Melo
  2016-06-28  7:02 ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-06-27 21:01 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Ananth N Mavinakayanahalli, Andi Kleen, Anton Blanchard,
	Daniel Axtens, David Ahern, He Kuang, Jiri Olsa,
	Marc Kleine-Budde, Masami Hiramatsu, Michael Ellerman,
	Namhyung Kim, Naveen N . Rao, Neeraj Badlani, Nilay Vaish,
	Peter Zijlstra, pi3orama, Ravi Bangoria, Taeung Song, Wang Nan,
	Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit d4cf1949f9689314aef962eea95df84a8288d097:

  perf/x86/intel: Add {rd,wr}lbr_{to,from} wrappers (2016-06-27 11:34:21 +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-20160627

for you to fetch changes up to 6d9c675078e697309c1c06a1051f01de8151c476:

  perf data ctf: Generate fork and exit events to CTF output (2016-06-27 15:50:23 -0300)

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

New features:

- Generate comm, fork and exit events when converting perf.data files to CTF (Wang Nan)

Documentation:

- Document perf.data on disk format (Andi Kleen)

Infrastructure:

- Add libbabeltrace to build-test (Wang Nan)

- 'perf record' prep work to support multiple evlists (Wang Nan)

- Remove unused hist_entry__annotate function (Ravi Bangoria)

- Add more toolchain triplets (Ravi Bangoria)

- Update message for slang devel packages on Ubuntu (Neeraj Badlani)

- Generalize handling of 'ret' instructions in the annotate TUI (Naveen N. Rao)

- Use proper dso name for is_regular_file, fixing device file handling (Jiri Olsa)

Build Fixes:

- Add missing config.h include, fixing the build with libabeltrace (Jiri Olsa)

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

----------------------------------------------------------------
Andi Kleen (1):
      perf tools: Add documentation for perf.data on disk format

Jiri Olsa (2):
      perf data convert: Include config.h header
      perf symbols: Use proper dso name for is_regular_file

Naveen N. Rao (1):
      perf annotate: Generalize handling of 'ret' instructions

Neeraj Badlani (1):
      perf tools: Update makefile message for installing slang devel package

Ravi Bangoria (2):
      perf annotate: Remove unused hist_entry__annotate function
      perf tools: Add more toolchain triplets

Wang Nan (11):
      perf build: Add libbabeltrace to build-test
      perf record: Move mmap setup block to separate function
      perf record: Prepare reading from multiple evlists in record__mmap_read_all()
      perf record: Prepare picking perf_event_mmap_page from multiple evlists
      perf data ctf: Add value_set_string() helper
      perf data ctf: Pass convert options through opts structure
      perf data ctf: Add 'all' option
      perf data ctf: Prepare collect non-sample events
      perf data ctf: Generate comm event to CTF output
      perf data ctf: Add '--all' option for 'perf data convert'
      perf data ctf: Generate fork and exit events to CTF output

 tools/perf/Documentation/perf-data.txt        |   4 +
 tools/perf/Documentation/perf-file-format.txt | 442 ++++++++++++++++++++++++++
 tools/perf/arch/common.c                      |  17 +
 tools/perf/builtin-data.c                     |  11 +-
 tools/perf/builtin-record.c                   | 105 ++++--
 tools/perf/config/Makefile                    |   2 +-
 tools/perf/tests/make                         |   2 +
 tools/perf/ui/browsers/annotate.c             |  20 +-
 tools/perf/util/annotate.c                    |  15 +-
 tools/perf/util/annotate.h                    |   3 +-
 tools/perf/util/data-convert-bt.c             | 196 +++++++++++-
 tools/perf/util/data-convert-bt.h             |   4 +-
 tools/perf/util/data-convert.h                |   9 +
 tools/perf/util/symbol.c                      |   2 +-
 14 files changed, 773 insertions(+), 59 deletions(-)
 create mode 100644 tools/perf/Documentation/perf-file-format.txt
 create mode 100644 tools/perf/util/data-convert.h

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2015-07-24  1:58 Arnaldo Carvalho de Melo
@ 2015-07-27 15:58 ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2015-07-27 15:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	David Ahern, Frederic Weisbecker, Jiri Olsa, Mathieu Poirier,
	Namhyung Kim, Pawel Moll, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt, Thomas Gleixner, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit a11c51acc52822754d66a11c15f6f6edd4d23c55:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-07-21 07:58:06 +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 7c14898ba9386ee5c939bb418643ac6baff52840:
> 
>   perf script: Add option --show-switch-events (2015-07-23 22:51:14 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Introduce PERF_RECORD_SWITCH(_CPU_WIDE) and use it in 'record' to
>   ask for context switches, allowing non priviledged tasks to know
>   when they are switched in and out, which wasn't possible with
>   the other context switch tracepoint and software events, see the
>   patch description for a comprehensive justification (Adrian Hunter)
> 
> - Stop collecting /proc/kallsyms in perf.data files, saving about
>   4.5MB on a typical x86-64 system, use the symbol resolution
>   routines used in all the other tools (report, top, etc) now that
>   we can ask libtraceevent to use perf's symbol resolution code.
>   (Arnaldo Carvalho de Melo)
> 
> User visible fixes:
> 
> - Expose perf's symbol resolver to libtraceecent, so that its plugins can
>   resolve tracepoint fields to kernel functions, like the 'function' field
>   in the "timer:hrtimer_start tracepoint" (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Map propagation of thread and cpu maps improvements, prep work for
>   'perf stat' new features (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (5):
>       perf: Add PERF_RECORD_SWITCH to indicate context switches
>       perf tools: Add new PERF_RECORD_SWITCH event
>       perf record: Add option --switch-events to select PERF_RECORD_SWITCH events
>       perf script: Don't assume evsel position of tracking events
>       perf script: Add option --show-switch-events
> 
> Arnaldo Carvalho de Melo (8):
>       perf symbols: Add front end cache for DSO symbol lookup
>       perf symbols: Introduce map__is_(kernel,kmodule)()
>       tools lib traceevent: Allow setting an alternative symbol resolver
>       perf symbols: Provide libtraceevent callback to resolve kernel symbols
>       perf trace: Provide libtracevent with a kernel symbol resolver
>       perf script: Switch from perf.data's kallsyms to perf's symbol resolver
>       perf tools: Stop reading the kallsyms data from perf.data
>       perf tools: Stop copying kallsyms into the perf.data file header
> 
> Jiri Olsa (5):
>       perf test: Check for refcnt in thread_map test
>       perf evlist: Force perf_evlist__set_maps to propagate maps through events
>       perf evlist: Use bool instead of target argument in propagate_maps()
>       perf evlist: Tolerate NULL maps in propagate_maps
>       perf header: Use argv style storage for cmdline feature data
> 
>  include/uapi/linux/perf_event.h          |  31 +++++++++-
>  kernel/events/core.c                     | 103 +++++++++++++++++++++++++++++++
>  tools/lib/traceevent/event-parse.c       |  68 +++++++++++++++++++-
>  tools/lib/traceevent/event-parse.h       |   8 +++
>  tools/perf/Documentation/perf-record.txt |   4 ++
>  tools/perf/Documentation/perf-script.txt |   4 ++
>  tools/perf/builtin-inject.c              |   1 +
>  tools/perf/builtin-record.c              |   7 +++
>  tools/perf/builtin-script.c              |  48 ++++++++++++--
>  tools/perf/builtin-trace.c               |   3 +
>  tools/perf/perf.h                        |   1 +
>  tools/perf/tests/thread-map.c            |   4 ++
>  tools/perf/util/dso.h                    |   4 ++
>  tools/perf/util/event.c                  |  28 +++++++++
>  tools/perf/util/event.h                  |  12 ++++
>  tools/perf/util/evlist.c                 |  28 +++++++--
>  tools/perf/util/evlist.h                 |  12 ++--
>  tools/perf/util/evsel.c                  |   4 ++
>  tools/perf/util/header.c                 |  35 ++++++-----
>  tools/perf/util/header.h                 |   1 +
>  tools/perf/util/machine.c                |  25 ++++++++
>  tools/perf/util/machine.h                |   6 ++
>  tools/perf/util/map.c                    |  14 +++++
>  tools/perf/util/map.h                    |   7 +++
>  tools/perf/util/record.c                 |  10 +++
>  tools/perf/util/session.c                |  21 +++++++
>  tools/perf/util/symbol.c                 |   7 ++-
>  tools/perf/util/tool.h                   |   1 +
>  tools/perf/util/trace-event-info.c       |  22 +++----
>  tools/perf/util/trace-event-parse.c      |  30 ---------
>  tools/perf/util/trace-event-read.c       |  28 ++++-----
>  tools/perf/util/trace-event.c            |  45 +++++++++-----
>  tools/perf/util/trace-event.h            |   1 +
>  33 files changed, 513 insertions(+), 110 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2015-07-24  1:58 Arnaldo Carvalho de Melo
  2015-07-27 15:58 ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-07-24  1:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Mathieu Poirier, Namhyung Kim, Pawel Moll,
	Peter Zijlstra, Stephane Eranian, Steven Rostedt,
	Thomas Gleixner, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit a11c51acc52822754d66a11c15f6f6edd4d23c55:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-07-21 07:58:06 +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 7c14898ba9386ee5c939bb418643ac6baff52840:

  perf script: Add option --show-switch-events (2015-07-23 22:51:14 -0300)

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

New features:

- Introduce PERF_RECORD_SWITCH(_CPU_WIDE) and use it in 'record' to
  ask for context switches, allowing non priviledged tasks to know
  when they are switched in and out, which wasn't possible with
  the other context switch tracepoint and software events, see the
  patch description for a comprehensive justification (Adrian Hunter)

- Stop collecting /proc/kallsyms in perf.data files, saving about
  4.5MB on a typical x86-64 system, use the symbol resolution
  routines used in all the other tools (report, top, etc) now that
  we can ask libtraceevent to use perf's symbol resolution code.
  (Arnaldo Carvalho de Melo)

User visible fixes:

- Expose perf's symbol resolver to libtraceecent, so that its plugins can
  resolve tracepoint fields to kernel functions, like the 'function' field
  in the "timer:hrtimer_start tracepoint" (Arnaldo Carvalho de Melo)

Infrastructure:

- Map propagation of thread and cpu maps improvements, prep work for
  'perf stat' new features (Jiri Olsa)

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

----------------------------------------------------------------
Adrian Hunter (5):
      perf: Add PERF_RECORD_SWITCH to indicate context switches
      perf tools: Add new PERF_RECORD_SWITCH event
      perf record: Add option --switch-events to select PERF_RECORD_SWITCH events
      perf script: Don't assume evsel position of tracking events
      perf script: Add option --show-switch-events

Arnaldo Carvalho de Melo (8):
      perf symbols: Add front end cache for DSO symbol lookup
      perf symbols: Introduce map__is_(kernel,kmodule)()
      tools lib traceevent: Allow setting an alternative symbol resolver
      perf symbols: Provide libtraceevent callback to resolve kernel symbols
      perf trace: Provide libtracevent with a kernel symbol resolver
      perf script: Switch from perf.data's kallsyms to perf's symbol resolver
      perf tools: Stop reading the kallsyms data from perf.data
      perf tools: Stop copying kallsyms into the perf.data file header

Jiri Olsa (5):
      perf test: Check for refcnt in thread_map test
      perf evlist: Force perf_evlist__set_maps to propagate maps through events
      perf evlist: Use bool instead of target argument in propagate_maps()
      perf evlist: Tolerate NULL maps in propagate_maps
      perf header: Use argv style storage for cmdline feature data

 include/uapi/linux/perf_event.h          |  31 +++++++++-
 kernel/events/core.c                     | 103 +++++++++++++++++++++++++++++++
 tools/lib/traceevent/event-parse.c       |  68 +++++++++++++++++++-
 tools/lib/traceevent/event-parse.h       |   8 +++
 tools/perf/Documentation/perf-record.txt |   4 ++
 tools/perf/Documentation/perf-script.txt |   4 ++
 tools/perf/builtin-inject.c              |   1 +
 tools/perf/builtin-record.c              |   7 +++
 tools/perf/builtin-script.c              |  48 ++++++++++++--
 tools/perf/builtin-trace.c               |   3 +
 tools/perf/perf.h                        |   1 +
 tools/perf/tests/thread-map.c            |   4 ++
 tools/perf/util/dso.h                    |   4 ++
 tools/perf/util/event.c                  |  28 +++++++++
 tools/perf/util/event.h                  |  12 ++++
 tools/perf/util/evlist.c                 |  28 +++++++--
 tools/perf/util/evlist.h                 |  12 ++--
 tools/perf/util/evsel.c                  |   4 ++
 tools/perf/util/header.c                 |  35 ++++++-----
 tools/perf/util/header.h                 |   1 +
 tools/perf/util/machine.c                |  25 ++++++++
 tools/perf/util/machine.h                |   6 ++
 tools/perf/util/map.c                    |  14 +++++
 tools/perf/util/map.h                    |   7 +++
 tools/perf/util/record.c                 |  10 +++
 tools/perf/util/session.c                |  21 +++++++
 tools/perf/util/symbol.c                 |   7 ++-
 tools/perf/util/tool.h                   |   1 +
 tools/perf/util/trace-event-info.c       |  22 +++----
 tools/perf/util/trace-event-parse.c      |  30 ---------
 tools/perf/util/trace-event-read.c       |  28 ++++-----
 tools/perf/util/trace-event.c            |  45 +++++++++-----
 tools/perf/util/trace-event.h            |   1 +
 33 files changed, 513 insertions(+), 110 deletions(-)

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2015-05-18 15:50 Arnaldo Carvalho de Melo
@ 2015-05-20 11:25 ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2015-05-20 11:25 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Andi Kleen,
	Borislav Petkov, Brendan Gregg, Daniel Borkmann, David Ahern,
	Don Zickus, Frederic Weisbecker, He Kuang, Ingo Molnar,
	Jan Stancek, Jiri Olsa, Jiri Olsa, Masami Hiramatsu,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, pi3orama,
	Stephane Eranian, Steven Rostedt, Vinson Lee, Wang Nan, Zefan Li,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider applying,
> 
> - Arnaldo
> 
> The following changes since commit aa891009ee8863944a96ba4a348102f3d5f5f931:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-05-15 08:36:33 +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 2d8e405acd787f4b975f73e0f8d9804b272c00f0:
> 
>   perf bench numa: Share sched_getcpu() __weak def with cloexec.c (2015-05-18 12:36:46 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fix "Command" sort_entry's cmp and collapse function (Jiri Olsa)
> 
> - Load map's symtab before 'perf probe' glob matching (Wang Nan)
> 
> - Set vmlinux_path__nr_entries to 0 in vmlinux_path__exit, to fix
>   the use case where this code is called multiple times, which wasn't
>   that common when it was introduced but seems to be now (Wang Nan).
> 
> Infrastructure:
> 
> - Protect dso symtab and cache operations with a mutex (Namhyung Kim)
> 
> - Make all refcnt operations use atomic.h (Arnaldo Carvalho de Melo)
> 
> - Install libtraceevent.a into libdir (Wang Nan)
> 
> Build fixes:
> 
> - Fix one build failure on RHEL5 by making 'perf bench numa' use the
>   __weak sched_getcpu() provided by cloexec.h (Arnaldo Carvalho de Melo)
> 
> - Fix dwarf-aux.c compilation on i386 (Jiri Olsa)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (6):
>       perf tools: Use atomic.h for the map_groups refcount
>       perf machine: Stop accessing atomic_t::counter directly
>       perf evlist: Use atomic.h for the perf_mmap refcount
>       perf cgroup: Use atomic.h for refcounting
>       perf tools: Elliminate alignment holes
>       perf bench numa: Share sched_getcpu() __weak def with cloexec.c
> 
> Jiri Olsa (2):
>       perf tools: Fix dwarf-aux.c compilation on i386
>       perf tools: Fix "Command" sort_entry's cmp and collapse function
> 
> Namhyung Kim (5):
>       perf tools: Add rm_rf() utility function
>       perf tools: Introduce copyfile_offset() function
>       perf symbols: Protect dso symbol loading using a mutex
>       perf symbols: Protect dso cache tree using dso->lock
>       perf tools: Protect dso cache fd with a mutex
> 
> Wang Nan (5):
>       perf probe: Load map before glob matching
>       tools include: add __aligned_u64 to types.h.
>       perf tools: Set vmlinux_path__nr_entries to 0 in vmlinux_path__exit
>       tools lib traceevent: Install libtraceevent.a into libdir
>       tools build: Change FEATURE_TESTS and FEATURE_DISPLAY to weak binding
> 
>  tools/build/Makefile.feature       |   4 +-
>  tools/include/linux/types.h        |   4 ++
>  tools/lib/traceevent/Makefile      |  20 ++++--
>  tools/perf/bench/numa.c            |   1 +
>  tools/perf/builtin-timechart.c     |   4 +-
>  tools/perf/tests/thread-mg-share.c |  12 ++--
>  tools/perf/util/cgroup.c           |  10 +--
>  tools/perf/util/cgroup.h           |   4 +-
>  tools/perf/util/dso.c              | 134 ++++++++++++++++++++++++++++---------
>  tools/perf/util/dso.h              |   1 +
>  tools/perf/util/dwarf-aux.c        |   8 +--
>  tools/perf/util/evlist.c           |  12 ++--
>  tools/perf/util/evlist.h           |   5 +-
>  tools/perf/util/evsel.h            |   4 +-
>  tools/perf/util/machine.c          |   2 +-
>  tools/perf/util/map.c              |   4 +-
>  tools/perf/util/map.h              |   6 +-
>  tools/perf/util/probe-event.c      |   3 +
>  tools/perf/util/sort.c             |   4 +-
>  tools/perf/util/symbol.c           |  35 +++++++---
>  tools/perf/util/thread.h           |   2 +-
>  tools/perf/util/util.c             |  81 +++++++++++++++++++---
>  tools/perf/util/util.h             |   2 +
>  23 files changed, 263 insertions(+), 99 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2015-05-18 15:50 Arnaldo Carvalho de Melo
  2015-05-20 11:25 ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-05-18 15:50 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Andi Kleen, Borislav Petkov, Brendan Gregg,
	Daniel Borkmann, David Ahern, Don Zickus, Frederic Weisbecker,
	He Kuang, Ingo Molnar, Jan Stancek, Jiri Olsa, Jiri Olsa,
	Masami Hiramatsu, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	pi3orama, Stephane Eranian, Steven Rostedt, Vinson Lee, Wang Nan,
	Zefan Li, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider applying,

- Arnaldo

The following changes since commit aa891009ee8863944a96ba4a348102f3d5f5f931:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-05-15 08:36:33 +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 2d8e405acd787f4b975f73e0f8d9804b272c00f0:

  perf bench numa: Share sched_getcpu() __weak def with cloexec.c (2015-05-18 12:36:46 -0300)

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

User visible:

- Fix "Command" sort_entry's cmp and collapse function (Jiri Olsa)

- Load map's symtab before 'perf probe' glob matching (Wang Nan)

- Set vmlinux_path__nr_entries to 0 in vmlinux_path__exit, to fix
  the use case where this code is called multiple times, which wasn't
  that common when it was introduced but seems to be now (Wang Nan).

Infrastructure:

- Protect dso symtab and cache operations with a mutex (Namhyung Kim)

- Make all refcnt operations use atomic.h (Arnaldo Carvalho de Melo)

- Install libtraceevent.a into libdir (Wang Nan)

Build fixes:

- Fix one build failure on RHEL5 by making 'perf bench numa' use the
  __weak sched_getcpu() provided by cloexec.h (Arnaldo Carvalho de Melo)

- Fix dwarf-aux.c compilation on i386 (Jiri Olsa)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (6):
      perf tools: Use atomic.h for the map_groups refcount
      perf machine: Stop accessing atomic_t::counter directly
      perf evlist: Use atomic.h for the perf_mmap refcount
      perf cgroup: Use atomic.h for refcounting
      perf tools: Elliminate alignment holes
      perf bench numa: Share sched_getcpu() __weak def with cloexec.c

Jiri Olsa (2):
      perf tools: Fix dwarf-aux.c compilation on i386
      perf tools: Fix "Command" sort_entry's cmp and collapse function

Namhyung Kim (5):
      perf tools: Add rm_rf() utility function
      perf tools: Introduce copyfile_offset() function
      perf symbols: Protect dso symbol loading using a mutex
      perf symbols: Protect dso cache tree using dso->lock
      perf tools: Protect dso cache fd with a mutex

Wang Nan (5):
      perf probe: Load map before glob matching
      tools include: add __aligned_u64 to types.h.
      perf tools: Set vmlinux_path__nr_entries to 0 in vmlinux_path__exit
      tools lib traceevent: Install libtraceevent.a into libdir
      tools build: Change FEATURE_TESTS and FEATURE_DISPLAY to weak binding

 tools/build/Makefile.feature       |   4 +-
 tools/include/linux/types.h        |   4 ++
 tools/lib/traceevent/Makefile      |  20 ++++--
 tools/perf/bench/numa.c            |   1 +
 tools/perf/builtin-timechart.c     |   4 +-
 tools/perf/tests/thread-mg-share.c |  12 ++--
 tools/perf/util/cgroup.c           |  10 +--
 tools/perf/util/cgroup.h           |   4 +-
 tools/perf/util/dso.c              | 134 ++++++++++++++++++++++++++++---------
 tools/perf/util/dso.h              |   1 +
 tools/perf/util/dwarf-aux.c        |   8 +--
 tools/perf/util/evlist.c           |  12 ++--
 tools/perf/util/evlist.h           |   5 +-
 tools/perf/util/evsel.h            |   4 +-
 tools/perf/util/machine.c          |   2 +-
 tools/perf/util/map.c              |   4 +-
 tools/perf/util/map.h              |   6 +-
 tools/perf/util/probe-event.c      |   3 +
 tools/perf/util/sort.c             |   4 +-
 tools/perf/util/symbol.c           |  35 +++++++---
 tools/perf/util/thread.h           |   2 +-
 tools/perf/util/util.c             |  81 +++++++++++++++++++---
 tools/perf/util/util.h             |   2 +
 23 files changed, 263 insertions(+), 99 deletions(-)

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2014-12-17 14:50 ` Arnaldo Carvalho de Melo
@ 2014-12-18  6:24   ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2014-12-18  6:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Mitchell Krome, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian


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

> Em Tue, Dec 16, 2014 at 01:57:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Hi Ingo,
> > 
> > 	Please consider pulling,
> > 
> > - Arnaldo
> > 
> > The following changes since commit 41e950c033b7df997d4b38653efe6554be9b96a7:
> > 
> >   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2014-12-12 09:09:52 +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
> 
> Ingo,
> 
> 	Please consider pulling the perf-core-for-mingo-2 signed tag
> instead, it is exactly the same content modulo removal of some
> whitespaces at the end of a few lines in tools/perf/Makefile.perf that
> Jiri found while reading those patches,

Pulled, thanks a lot!

	Ingo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2014-12-16 16:57 Arnaldo Carvalho de Melo
@ 2014-12-17 14:50 ` Arnaldo Carvalho de Melo
  2014-12-18  6:24   ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-12-17 14:50 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, Jiri Olsa, Mike Galbraith,
	Mitchell Krome, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian

Em Tue, Dec 16, 2014 at 01:57:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 41e950c033b7df997d4b38653efe6554be9b96a7:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2014-12-12 09:09:52 +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

Ingo,

	Please consider pulling the perf-core-for-mingo-2 signed tag
instead, it is exactly the same content modulo removal of some
whitespaces at the end of a few lines in tools/perf/Makefile.perf that
Jiri found while reading those patches,

Thanks,

- Arnaldo
 
> for you to fetch changes up to 67195c75a87232f055ff415fc4624ef01f24fc3d:
> 
>   perf symbols: Fix use after free in filename__read_build_id (2014-12-16 13:38:28 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - The mmap address range for the ring buffer now is calculated using the
>   contents of /proc/sys/kernel/perf_event_mlock_kb.
> 
>   This fixes an -EPERM case where 'trace' was trying to use more than what
>   configured on perf_event_mlock_kb. (Arnaldo Carvalho de Melo)
> 
> Infrastructure:
> 
> - Move bitops definitions so that they match the header file hierarchy
>   in the kernel sources where that code came from. (Arnaldo Carvalho de Melo)
> 
> - Adopt round{down,up}_pow_of_two from the kernel and use it instead of
>   equivalent code, so that we reuse more kernel code and make tools/ look
>   more like kernel source code, to encourage further contributions from
>   kernel hackers (Arnaldo Carvalho de Melo)
> 
> - Fix use after free in filename__read_build_id (Mitchell Krome)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (17):
>       perf evlist: Fixup brown paper bag on "hint" for --mmap-pages cmdline arg
>       perf evlist: Clarify sterror_mmap variable names
>       perf evlist: Improve the strerror_mmap method
>       perf trace: Let the perf_evlist__mmap autosize the number of pages to use
>       perf evlist: Do not use hard coded value for a mmap_pages default
>       tools: Move __ffs implementation to tools/include/asm-generic/bitops/__ffs.h
>       tools: Move code originally from linux/log2.h to tools/include/linux/
>       tools: Move code originally from asm-generic/atomic.h into tools/include/asm-generic/
>       tools: Whitespace prep patches for moving bitops.h
>       tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib
>       tools: Introduce asm-generic/bitops.h
>       tools: Move bitops.h from tools/perf/util to tools/
>       tools: Adopt fls_long and deps
>       tools: Adopt rounddown_pow_of_two and deps
>       perf tools: Make the mmap length autotuning more robust
>       tools: Adopt roundup_pow_of_two
>       perf evlist: Use roundup_pow_of_two
> 
> Mitchell Krome (1):
>       perf symbols: Fix use after free in filename__read_build_id
> 
>  tools/include/asm-generic/bitops.h        |  27 +++++
>  tools/include/asm-generic/bitops/__ffs.h  |  43 +++++++
>  tools/include/asm-generic/bitops/__fls.h  |   1 +
>  tools/include/asm-generic/bitops/atomic.h |  22 ++++
>  tools/include/asm-generic/bitops/find.h   |  33 ++++++
>  tools/include/asm-generic/bitops/fls.h    |   1 +
>  tools/include/asm-generic/bitops/fls64.h  |   1 +
>  tools/include/linux/bitops.h              |  53 +++++++++
>  tools/include/linux/log2.h                | 185 ++++++++++++++++++++++++++++++
>  tools/lib/util/find_next_bit.c            |  89 ++++++++++++++
>  tools/perf/MANIFEST                       |  13 ++-
>  tools/perf/Makefile.perf                  |  14 ++-
>  tools/perf/builtin-trace.c                |   2 +-
>  tools/perf/util/evlist.c                  |  46 ++++++--
>  tools/perf/util/include/linux/bitops.h    | 162 --------------------------
>  tools/perf/util/symbol-minimal.c          |   8 +-
>  tools/perf/util/util.h                    |  29 -----
>  17 files changed, 522 insertions(+), 207 deletions(-)
>  create mode 100644 tools/include/asm-generic/bitops.h
>  create mode 100644 tools/include/asm-generic/bitops/__ffs.h
>  create mode 100644 tools/include/asm-generic/bitops/__fls.h
>  create mode 100644 tools/include/asm-generic/bitops/atomic.h
>  create mode 100644 tools/include/asm-generic/bitops/find.h
>  create mode 100644 tools/include/asm-generic/bitops/fls.h
>  create mode 100644 tools/include/asm-generic/bitops/fls64.h
>  create mode 100644 tools/include/linux/bitops.h
>  create mode 100644 tools/include/linux/log2.h
>  create mode 100644 tools/lib/util/find_next_bit.c
>  delete mode 100644 tools/perf/util/include/linux/bitops.h
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2014-12-16 16:57 Arnaldo Carvalho de Melo
  2014-12-17 14:50 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-12-16 16:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Borislav Petkov, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Mike Galbraith, Mitchell Krome, Namhyung Kim,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 41e950c033b7df997d4b38653efe6554be9b96a7:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2014-12-12 09:09:52 +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 67195c75a87232f055ff415fc4624ef01f24fc3d:

  perf symbols: Fix use after free in filename__read_build_id (2014-12-16 13:38:28 -0300)

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

User visible:

- The mmap address range for the ring buffer now is calculated using the
  contents of /proc/sys/kernel/perf_event_mlock_kb.

  This fixes an -EPERM case where 'trace' was trying to use more than what
  configured on perf_event_mlock_kb. (Arnaldo Carvalho de Melo)

Infrastructure:

- Move bitops definitions so that they match the header file hierarchy
  in the kernel sources where that code came from. (Arnaldo Carvalho de Melo)

- Adopt round{down,up}_pow_of_two from the kernel and use it instead of
  equivalent code, so that we reuse more kernel code and make tools/ look
  more like kernel source code, to encourage further contributions from
  kernel hackers (Arnaldo Carvalho de Melo)

- Fix use after free in filename__read_build_id (Mitchell Krome)

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (17):
      perf evlist: Fixup brown paper bag on "hint" for --mmap-pages cmdline arg
      perf evlist: Clarify sterror_mmap variable names
      perf evlist: Improve the strerror_mmap method
      perf trace: Let the perf_evlist__mmap autosize the number of pages to use
      perf evlist: Do not use hard coded value for a mmap_pages default
      tools: Move __ffs implementation to tools/include/asm-generic/bitops/__ffs.h
      tools: Move code originally from linux/log2.h to tools/include/linux/
      tools: Move code originally from asm-generic/atomic.h into tools/include/asm-generic/
      tools: Whitespace prep patches for moving bitops.h
      tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib
      tools: Introduce asm-generic/bitops.h
      tools: Move bitops.h from tools/perf/util to tools/
      tools: Adopt fls_long and deps
      tools: Adopt rounddown_pow_of_two and deps
      perf tools: Make the mmap length autotuning more robust
      tools: Adopt roundup_pow_of_two
      perf evlist: Use roundup_pow_of_two

Mitchell Krome (1):
      perf symbols: Fix use after free in filename__read_build_id

 tools/include/asm-generic/bitops.h        |  27 +++++
 tools/include/asm-generic/bitops/__ffs.h  |  43 +++++++
 tools/include/asm-generic/bitops/__fls.h  |   1 +
 tools/include/asm-generic/bitops/atomic.h |  22 ++++
 tools/include/asm-generic/bitops/find.h   |  33 ++++++
 tools/include/asm-generic/bitops/fls.h    |   1 +
 tools/include/asm-generic/bitops/fls64.h  |   1 +
 tools/include/linux/bitops.h              |  53 +++++++++
 tools/include/linux/log2.h                | 185 ++++++++++++++++++++++++++++++
 tools/lib/util/find_next_bit.c            |  89 ++++++++++++++
 tools/perf/MANIFEST                       |  13 ++-
 tools/perf/Makefile.perf                  |  14 ++-
 tools/perf/builtin-trace.c                |   2 +-
 tools/perf/util/evlist.c                  |  46 ++++++--
 tools/perf/util/include/linux/bitops.h    | 162 --------------------------
 tools/perf/util/symbol-minimal.c          |   8 +-
 tools/perf/util/util.h                    |  29 -----
 17 files changed, 522 insertions(+), 207 deletions(-)
 create mode 100644 tools/include/asm-generic/bitops.h
 create mode 100644 tools/include/asm-generic/bitops/__ffs.h
 create mode 100644 tools/include/asm-generic/bitops/__fls.h
 create mode 100644 tools/include/asm-generic/bitops/atomic.h
 create mode 100644 tools/include/asm-generic/bitops/find.h
 create mode 100644 tools/include/asm-generic/bitops/fls.h
 create mode 100644 tools/include/asm-generic/bitops/fls64.h
 create mode 100644 tools/include/linux/bitops.h
 create mode 100644 tools/include/linux/log2.h
 create mode 100644 tools/lib/util/find_next_bit.c
 delete mode 100644 tools/perf/util/include/linux/bitops.h

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2014-12-11 21:25 Arnaldo Carvalho de Melo
@ 2014-12-12  8:10 ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2014-12-12  8:10 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Yarygin, Andi Kleen,
	Arjun Sreedharan, Borislav Petkov, Christian Borntraeger,
	Corey Ashford, David Ahern, Don Zickus, Frederic Weisbecker,
	Jiri Olsa, Kan Liang, Kim Phillips, Matt Mullins, Mike Galbraith,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Rabin Vincent,
	Stephane Eranian, Steven Rostedt, Tom Huynh, Yann E. MORIN,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit cfa0bd52d0ba9b852f76c7b3f1055edd5e5c7846:
> 
>   Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-12-08 07:45:45 +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 e09b18d4907992d3d615b215c1abf585721b2810:
> 
>   perf trace: Provide a better explanation when mmap fails (2014-12-11 18:04:10 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Mark events as (x86 only) in help output for 'perf kvm stat live" (Alexander Yarygin)
> 
> - Provide a better explanation when mmap fails in 'trace' (Arnaldo Carvalho de Melo)
> 
> - Add --buildid-dir option to set cache directory, i.e. use:
> 
>       $ perf --buildid-dir /path/to/dir tool --tool-options
> 
>   (Jiri Olsa)
> 
> - Fix memcpy/memset 'perf bench' output (Rabin Vicent)
> 
> - Fix 'perf test' attr tests size values to cope with machine state on
>   interrupt ABI changes (Jiri Olsa)
> 
> - Fixup callchain type parameter handling error message (Kan Liang)
> 
> Infrastructure/cleanups:
> 
> - calloc/xcalloc: Fix argument order (Arjun Sreedharan)
> 
> - Move filename__read_int from tools/perf/ to tools/lib, add sysctl__read_int
>   there and use it in place of ad-hoc copies (Arnaldo Carvalho de Melo)
> 
> - Use single strcmp call instead of two (Jiri Olsa)
> 
> - Remove extra debugdir variables in 'perf buildid-cache' (Jiri Olsa)
> 
> - Fix -a segfault related to kcore handling in 'perf buildid-cache' (Jiri Olsa)
> 
> - Move cpumode resolve code to add_callchain_ip (Kan Liang)
> 
> - Merge memset into memcpy 'perf bench' (Rabin Vincent)
> 
> - Change print format from %lu to %PRIu64 in the hists browser (Tom Huynh)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alexander Yarygin (1):
>       perf kvm stat live: Mark events as (x86 only) in help output
> 
> Arjun Sreedharan (1):
>       calloc/xcalloc: Fix argument order
> 
> Arnaldo Carvalho de Melo (5):
>       tools lib fs: Adopt filename__read_int from tools/perf/
>       tools lib fs: Add sysctl__read_int helper
>       perf tools: Use sysctl__read_int instead of ad-hoc copies
>       perf evlist: Introduce strerror_mmap method
>       perf trace: Provide a better explanation when mmap fails
> 
> Jiri Olsa (5):
>       perf tools: Use single strcmp call instead of two
>       perf buildid-cache: Remove extra debugdir variables
>       perf buildid cache: Fix -a segfault related to kcore handling
>       perf tools: Add --buildid-dir option to set cache directory
>       perf tests: Fix attr tests size values to cope with machine state on interrupt ABI changes
> 
> Kan Liang (2):
>       perf callchain: Fixup parameter handling error message
>       perf callchain: Move cpumode resolve code to add_callchain_ip
> 
> Rabin Vincent (3):
>       perf bench: Prepare memcpy for merge
>       perf bench: Merge memset into memcpy
>       perf bench: Fix memcpy/memset output
> 
> Tom Huynh (1):
>       perf hists browser: Change print format from %lu to %PRIu64
> 
>  scripts/kconfig/mconf.c            |   4 +-
>  tools/lib/api/fs/fs.c              |  34 +++++
>  tools/lib/api/fs/fs.h              |   3 +
>  tools/perf/Documentation/perf.txt  |   4 +
>  tools/perf/Makefile.perf           |   1 -
>  tools/perf/bench/mem-memcpy.c      | 286 ++++++++++++++++++++++++----------
>  tools/perf/bench/mem-memset.c      | 304 -------------------------------------
>  tools/perf/builtin-buildid-cache.c |  13 +-
>  tools/perf/builtin-kvm.c           |   3 +-
>  tools/perf/builtin-trace.c         |  12 +-
>  tools/perf/perf.c                  |  14 +-
>  tools/perf/tests/attr/base-record  |   2 +-
>  tools/perf/tests/attr/base-stat    |   2 +-
>  tools/perf/ui/browsers/hists.c     |   2 +-
>  tools/perf/ui/hist.c               |   4 +-
>  tools/perf/util/build-id.c         |   9 +-
>  tools/perf/util/callchain.c        |   2 +-
>  tools/perf/util/config.c           |  10 +-
>  tools/perf/util/evlist.c           |  23 +++
>  tools/perf/util/evlist.h           |   1 +
>  tools/perf/util/machine.c          |  72 +++++----
>  tools/perf/util/record.c           |  11 +-
>  tools/perf/util/util.c             |  26 +---
>  tools/perf/util/util.h             |   3 +-
>  tools/thermal/tmon/sysfs.c         |   6 +-
>  25 files changed, 350 insertions(+), 501 deletions(-)
>  delete mode 100644 tools/perf/bench/mem-memset.c

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2014-12-11 21:25 Arnaldo Carvalho de Melo
  2014-12-12  8:10 ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-12-11 21:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Yarygin, Andi Kleen, Arjun Sreedharan, Borislav Petkov,
	Christian Borntraeger, Corey Ashford, David Ahern, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Kan Liang, Kim Phillips,
	Matt Mullins, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Rabin Vincent, Stephane Eranian, Steven Rostedt,
	Tom Huynh, Yann E. MORIN, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit cfa0bd52d0ba9b852f76c7b3f1055edd5e5c7846:

  Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-12-08 07:45:45 +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 e09b18d4907992d3d615b215c1abf585721b2810:

  perf trace: Provide a better explanation when mmap fails (2014-12-11 18:04:10 -0300)

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

User visible:

- Mark events as (x86 only) in help output for 'perf kvm stat live" (Alexander Yarygin)

- Provide a better explanation when mmap fails in 'trace' (Arnaldo Carvalho de Melo)

- Add --buildid-dir option to set cache directory, i.e. use:

      $ perf --buildid-dir /path/to/dir tool --tool-options

  (Jiri Olsa)

- Fix memcpy/memset 'perf bench' output (Rabin Vicent)

- Fix 'perf test' attr tests size values to cope with machine state on
  interrupt ABI changes (Jiri Olsa)

- Fixup callchain type parameter handling error message (Kan Liang)

Infrastructure/cleanups:

- calloc/xcalloc: Fix argument order (Arjun Sreedharan)

- Move filename__read_int from tools/perf/ to tools/lib, add sysctl__read_int
  there and use it in place of ad-hoc copies (Arnaldo Carvalho de Melo)

- Use single strcmp call instead of two (Jiri Olsa)

- Remove extra debugdir variables in 'perf buildid-cache' (Jiri Olsa)

- Fix -a segfault related to kcore handling in 'perf buildid-cache' (Jiri Olsa)

- Move cpumode resolve code to add_callchain_ip (Kan Liang)

- Merge memset into memcpy 'perf bench' (Rabin Vincent)

- Change print format from %lu to %PRIu64 in the hists browser (Tom Huynh)

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

----------------------------------------------------------------
Alexander Yarygin (1):
      perf kvm stat live: Mark events as (x86 only) in help output

Arjun Sreedharan (1):
      calloc/xcalloc: Fix argument order

Arnaldo Carvalho de Melo (5):
      tools lib fs: Adopt filename__read_int from tools/perf/
      tools lib fs: Add sysctl__read_int helper
      perf tools: Use sysctl__read_int instead of ad-hoc copies
      perf evlist: Introduce strerror_mmap method
      perf trace: Provide a better explanation when mmap fails

Jiri Olsa (5):
      perf tools: Use single strcmp call instead of two
      perf buildid-cache: Remove extra debugdir variables
      perf buildid cache: Fix -a segfault related to kcore handling
      perf tools: Add --buildid-dir option to set cache directory
      perf tests: Fix attr tests size values to cope with machine state on interrupt ABI changes

Kan Liang (2):
      perf callchain: Fixup parameter handling error message
      perf callchain: Move cpumode resolve code to add_callchain_ip

Rabin Vincent (3):
      perf bench: Prepare memcpy for merge
      perf bench: Merge memset into memcpy
      perf bench: Fix memcpy/memset output

Tom Huynh (1):
      perf hists browser: Change print format from %lu to %PRIu64

 scripts/kconfig/mconf.c            |   4 +-
 tools/lib/api/fs/fs.c              |  34 +++++
 tools/lib/api/fs/fs.h              |   3 +
 tools/perf/Documentation/perf.txt  |   4 +
 tools/perf/Makefile.perf           |   1 -
 tools/perf/bench/mem-memcpy.c      | 286 ++++++++++++++++++++++++----------
 tools/perf/bench/mem-memset.c      | 304 -------------------------------------
 tools/perf/builtin-buildid-cache.c |  13 +-
 tools/perf/builtin-kvm.c           |   3 +-
 tools/perf/builtin-trace.c         |  12 +-
 tools/perf/perf.c                  |  14 +-
 tools/perf/tests/attr/base-record  |   2 +-
 tools/perf/tests/attr/base-stat    |   2 +-
 tools/perf/ui/browsers/hists.c     |   2 +-
 tools/perf/ui/hist.c               |   4 +-
 tools/perf/util/build-id.c         |   9 +-
 tools/perf/util/callchain.c        |   2 +-
 tools/perf/util/config.c           |  10 +-
 tools/perf/util/evlist.c           |  23 +++
 tools/perf/util/evlist.h           |   1 +
 tools/perf/util/machine.c          |  72 +++++----
 tools/perf/util/record.c           |  11 +-
 tools/perf/util/util.c             |  26 +---
 tools/perf/util/util.h             |   3 +-
 tools/thermal/tmon/sysfs.c         |   6 +-
 25 files changed, 350 insertions(+), 501 deletions(-)
 delete mode 100644 tools/perf/bench/mem-memset.c

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2014-11-06 21:04 Arnaldo Carvalho de Melo
@ 2014-11-07  5:24 ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2014-11-07  5:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Corey Ashford, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Steven Rostedt,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit daa01794a4a36a1da1b09a529adec0c8c0b94ab2:
> 
>   perf evsel: Do not call pevent_free_format when deleting tracepoint (2014-11-06 17:47:14 -0300)
> 
> 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 daa01794a4a36a1da1b09a529adec0c8c0b94ab2:
> 
>   perf evsel: Do not call pevent_free_format when deleting tracepoint (2014-11-06 17:47:14 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Infrastructure:
> 
> o Add gzip decompression support for kernel modules (Namhyung Kim)
> 
> o More prep patches for Intel PT, including a a thread stack and
>   more stuff made available via the database export mechanism (Adrian Hunter)
> 
> o Optimize checking that tracepoint events are defined in perf script perl/python (Jiri Olsa)
> 
> o Do not free pevent when deleting tracepoint evsel (Jiri Olsa)
> 
> o Fix build-id matching for vmlinux (Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2014-11-06 21:04 Arnaldo Carvalho de Melo
  2014-11-07  5:24 ` Ingo Molnar
  0 siblings, 1 reply; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-11-06 21:04 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit daa01794a4a36a1da1b09a529adec0c8c0b94ab2:

  perf evsel: Do not call pevent_free_format when deleting tracepoint (2014-11-06 17:47:14 -0300)

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 daa01794a4a36a1da1b09a529adec0c8c0b94ab2:

  perf evsel: Do not call pevent_free_format when deleting tracepoint (2014-11-06 17:47:14 -0300)

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

Infrastructure:

o Add gzip decompression support for kernel modules (Namhyung Kim)

o More prep patches for Intel PT, including a a thread stack and
  more stuff made available via the database export mechanism (Adrian Hunter)

o Optimize checking that tracepoint events are defined in perf script perl/python (Jiri Olsa)

o Do not free pevent when deleting tracepoint evsel (Jiri Olsa)

o Fix build-id matching for vmlinux (Namhyung Kim)

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

----------------------------------------------------------------

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
  2014-08-15 16:49 ` Arnaldo Carvalho de Melo
@ 2014-08-18  8:18   ` Ingo Molnar
  -1 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2014-08-18  8:18 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alex Converse, Andi Kleen,
	Anshuman Khandual, Arun Sharma, Brendan Gregg, Cody P Schafer,
	David Ahern, Elliott Hughes, Frederic Weisbecker, Haren Myneni,
	Jiri Olsa, linuxppc-dev, Masami Hiramatsu, Michael Ellerman,
	Namhyung Kim, Naohiro Aota, Paul Mackerras, Peter Zijlstra,
	Rodrigo Campos, Stephane Eranian, Sukadev Bhattiprolu,
	yrl.pp-manager.tt, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit f373da34282560c60f0c197690eecb1b2dc49fc0:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-08-14 10:38:40 +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 759e612bf96627b64fcafe4174b3f6f2dedf2c0d:
> 
>   perf stat: Use strerror_r instead of strerror (2014-08-15 13:08:40 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> . Warn user to rebuild target with debuginfo in 'perf probe' (Masami Hiramatsu)
> 
> . Don't truncate Intel style addresses in 'annotate'. (Alex Converse)
> 
> Developer stuff:
> 
> . Annotate PMU related list_head members with type info. (Cody P Schafer)
> 
> . Add the triplet used for arm64 by Android (Elliott Hughes)
> 
> . Replace thread unsafe strerror() with strerror_r() accross the
>   whole tools/perf/ tree (Masami Hiramatsu)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alex Converse (1):
>       perf annotate: Don't truncate Intel style addresses
> 
> Cody P Schafer (1):
>       perf tools: Annotate PMU related list_head members with type info
> 
> Elliott Hughes (1):
>       perf tools: Add arm64 triplets
> 
> Masami Hiramatsu (14):
>       perf probe: Warn user to rebuild target with debuginfo
>       perf probe: Don't use strerror if strlist__add failed
>       perf: Use strerror_r instead of strerror
>       perf probe: Make error messages thread-safe
>       perf util: Replace strerror with strerror_r for thread-safety
>       perf top: Use strerror_r instead of strerror
>       perf trace: Use strerror_r instead of strerror
>       perf record: Use strerror_r instead of strerror
>       perf test: Use strerror_r instead of strerror
>       perf sched: Use strerror_r instead of strerror
>       perf buildid-cache: Use strerror_r instead of strerror
>       perf kvm: Use strerror_r instead of strerror
>       perf help: Use strerror_r instead of strerror
>       perf stat: Use strerror_r instead of strerror
> 
> Namhyung Kim (1):
>       perf report: Relax -g option parsing not to limit the option order
> 
>  tools/perf/arch/common.c                  |  9 +++
>  tools/perf/builtin-buildid-cache.c        |  7 ++-
>  tools/perf/builtin-help.c                 | 20 +++++--
>  tools/perf/builtin-kvm.c                  |  7 ++-
>  tools/perf/builtin-probe.c                |  5 +-
>  tools/perf/builtin-record.c               |  7 ++-
>  tools/perf/builtin-sched.c                |  4 +-
>  tools/perf/builtin-stat.c                 |  2 +-
>  tools/perf/builtin-top.c                  |  2 +-
>  tools/perf/builtin-trace.c                |  6 +-
>  tools/perf/perf.c                         | 10 +++-
>  tools/perf/tests/builtin-test.c           |  4 +-
>  tools/perf/tests/mmap-basic.c             |  7 ++-
>  tools/perf/tests/open-syscall-all-cpus.c  |  5 +-
>  tools/perf/tests/open-syscall-tp-fields.c |  7 ++-
>  tools/perf/tests/open-syscall.c           |  3 +-
>  tools/perf/tests/perf-record.c            | 13 +++--
>  tools/perf/tests/rdpmc.c                  |  6 +-
>  tools/perf/tests/sw-clock.c               |  6 +-
>  tools/perf/tests/task-exit.c              |  6 +-
>  tools/perf/util/annotate.c                | 12 +++-
>  tools/perf/util/callchain.c               | 95 +++++++++++++------------------
>  tools/perf/util/cloexec.c                 |  6 +-
>  tools/perf/util/data.c                    |  8 ++-
>  tools/perf/util/debug.h                   |  3 +
>  tools/perf/util/dso.c                     |  8 ++-
>  tools/perf/util/evlist.c                  |  2 +-
>  tools/perf/util/evsel.c                   |  7 ++-
>  tools/perf/util/parse-events.c            |  5 +-
>  tools/perf/util/pmu.c                     |  4 +-
>  tools/perf/util/pmu.h                     |  6 +-
>  tools/perf/util/probe-event.c             | 75 +++++++++++++-----------
>  tools/perf/util/probe-finder.c            |  7 ++-
>  tools/perf/util/run-command.c             |  9 ++-
>  tools/perf/util/util.c                    |  5 +-
>  35 files changed, 234 insertions(+), 154 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/18] perf/core improvements and fixes
@ 2014-08-18  8:18   ` Ingo Molnar
  0 siblings, 0 replies; 57+ messages in thread
From: Ingo Molnar @ 2014-08-18  8:18 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Frederic Weisbecker, Alex Converse,
	Adrian Hunter, Paul Mackerras, Masami Hiramatsu, Jiri Olsa,
	Anshuman Khandual, Namhyung Kim, Andi Kleen, Cody P Schafer,
	Sukadev Bhattiprolu, Arun Sharma, Naohiro Aota,
	Arnaldo Carvalho de Melo, Stephane Eranian, yrl.pp-manager.tt,
	Michael Ellerman, Rodrigo Campos, linux-kernel, David Ahern,
	Brendan Gregg, Elliott Hughes, linuxppc-dev


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit f373da34282560c60f0c197690eecb1b2dc49fc0:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-08-14 10:38:40 +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 759e612bf96627b64fcafe4174b3f6f2dedf2c0d:
> 
>   perf stat: Use strerror_r instead of strerror (2014-08-15 13:08:40 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> . Warn user to rebuild target with debuginfo in 'perf probe' (Masami Hiramatsu)
> 
> . Don't truncate Intel style addresses in 'annotate'. (Alex Converse)
> 
> Developer stuff:
> 
> . Annotate PMU related list_head members with type info. (Cody P Schafer)
> 
> . Add the triplet used for arm64 by Android (Elliott Hughes)
> 
> . Replace thread unsafe strerror() with strerror_r() accross the
>   whole tools/perf/ tree (Masami Hiramatsu)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alex Converse (1):
>       perf annotate: Don't truncate Intel style addresses
> 
> Cody P Schafer (1):
>       perf tools: Annotate PMU related list_head members with type info
> 
> Elliott Hughes (1):
>       perf tools: Add arm64 triplets
> 
> Masami Hiramatsu (14):
>       perf probe: Warn user to rebuild target with debuginfo
>       perf probe: Don't use strerror if strlist__add failed
>       perf: Use strerror_r instead of strerror
>       perf probe: Make error messages thread-safe
>       perf util: Replace strerror with strerror_r for thread-safety
>       perf top: Use strerror_r instead of strerror
>       perf trace: Use strerror_r instead of strerror
>       perf record: Use strerror_r instead of strerror
>       perf test: Use strerror_r instead of strerror
>       perf sched: Use strerror_r instead of strerror
>       perf buildid-cache: Use strerror_r instead of strerror
>       perf kvm: Use strerror_r instead of strerror
>       perf help: Use strerror_r instead of strerror
>       perf stat: Use strerror_r instead of strerror
> 
> Namhyung Kim (1):
>       perf report: Relax -g option parsing not to limit the option order
> 
>  tools/perf/arch/common.c                  |  9 +++
>  tools/perf/builtin-buildid-cache.c        |  7 ++-
>  tools/perf/builtin-help.c                 | 20 +++++--
>  tools/perf/builtin-kvm.c                  |  7 ++-
>  tools/perf/builtin-probe.c                |  5 +-
>  tools/perf/builtin-record.c               |  7 ++-
>  tools/perf/builtin-sched.c                |  4 +-
>  tools/perf/builtin-stat.c                 |  2 +-
>  tools/perf/builtin-top.c                  |  2 +-
>  tools/perf/builtin-trace.c                |  6 +-
>  tools/perf/perf.c                         | 10 +++-
>  tools/perf/tests/builtin-test.c           |  4 +-
>  tools/perf/tests/mmap-basic.c             |  7 ++-
>  tools/perf/tests/open-syscall-all-cpus.c  |  5 +-
>  tools/perf/tests/open-syscall-tp-fields.c |  7 ++-
>  tools/perf/tests/open-syscall.c           |  3 +-
>  tools/perf/tests/perf-record.c            | 13 +++--
>  tools/perf/tests/rdpmc.c                  |  6 +-
>  tools/perf/tests/sw-clock.c               |  6 +-
>  tools/perf/tests/task-exit.c              |  6 +-
>  tools/perf/util/annotate.c                | 12 +++-
>  tools/perf/util/callchain.c               | 95 +++++++++++++------------------
>  tools/perf/util/cloexec.c                 |  6 +-
>  tools/perf/util/data.c                    |  8 ++-
>  tools/perf/util/debug.h                   |  3 +
>  tools/perf/util/dso.c                     |  8 ++-
>  tools/perf/util/evlist.c                  |  2 +-
>  tools/perf/util/evsel.c                   |  7 ++-
>  tools/perf/util/parse-events.c            |  5 +-
>  tools/perf/util/pmu.c                     |  4 +-
>  tools/perf/util/pmu.h                     |  6 +-
>  tools/perf/util/probe-event.c             | 75 +++++++++++++-----------
>  tools/perf/util/probe-finder.c            |  7 ++-
>  tools/perf/util/run-command.c             |  9 ++-
>  tools/perf/util/util.c                    |  5 +-
>  35 files changed, 234 insertions(+), 154 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2014-08-15 16:49 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-08-15 16:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alex Converse, Andi Kleen, Anshuman Khandual, Arun Sharma,
	Brendan Gregg, Cody P Schafer, David Ahern, Elliott Hughes,
	Frederic Weisbecker, Haren Myneni, Jiri Olsa, linuxppc-dev,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naohiro Aota,
	Paul Mackerras, Peter Zijlstra, Rodrigo Campos, Stephane Eranian,
	Sukadev Bhattiprolu, yrl.pp-manager.tt, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit f373da34282560c60f0c197690eecb1b2dc49fc0:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-08-14 10:38:40 +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 759e612bf96627b64fcafe4174b3f6f2dedf2c0d:

  perf stat: Use strerror_r instead of strerror (2014-08-15 13:08:40 -0300)

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

User visible:

. Warn user to rebuild target with debuginfo in 'perf probe' (Masami Hiramatsu)

. Don't truncate Intel style addresses in 'annotate'. (Alex Converse)

Developer stuff:

. Annotate PMU related list_head members with type info. (Cody P Schafer)

. Add the triplet used for arm64 by Android (Elliott Hughes)

. Replace thread unsafe strerror() with strerror_r() accross the
  whole tools/perf/ tree (Masami Hiramatsu)

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

----------------------------------------------------------------
Alex Converse (1):
      perf annotate: Don't truncate Intel style addresses

Cody P Schafer (1):
      perf tools: Annotate PMU related list_head members with type info

Elliott Hughes (1):
      perf tools: Add arm64 triplets

Masami Hiramatsu (14):
      perf probe: Warn user to rebuild target with debuginfo
      perf probe: Don't use strerror if strlist__add failed
      perf: Use strerror_r instead of strerror
      perf probe: Make error messages thread-safe
      perf util: Replace strerror with strerror_r for thread-safety
      perf top: Use strerror_r instead of strerror
      perf trace: Use strerror_r instead of strerror
      perf record: Use strerror_r instead of strerror
      perf test: Use strerror_r instead of strerror
      perf sched: Use strerror_r instead of strerror
      perf buildid-cache: Use strerror_r instead of strerror
      perf kvm: Use strerror_r instead of strerror
      perf help: Use strerror_r instead of strerror
      perf stat: Use strerror_r instead of strerror

Namhyung Kim (1):
      perf report: Relax -g option parsing not to limit the option order

 tools/perf/arch/common.c                  |  9 +++
 tools/perf/builtin-buildid-cache.c        |  7 ++-
 tools/perf/builtin-help.c                 | 20 +++++--
 tools/perf/builtin-kvm.c                  |  7 ++-
 tools/perf/builtin-probe.c                |  5 +-
 tools/perf/builtin-record.c               |  7 ++-
 tools/perf/builtin-sched.c                |  4 +-
 tools/perf/builtin-stat.c                 |  2 +-
 tools/perf/builtin-top.c                  |  2 +-
 tools/perf/builtin-trace.c                |  6 +-
 tools/perf/perf.c                         | 10 +++-
 tools/perf/tests/builtin-test.c           |  4 +-
 tools/perf/tests/mmap-basic.c             |  7 ++-
 tools/perf/tests/open-syscall-all-cpus.c  |  5 +-
 tools/perf/tests/open-syscall-tp-fields.c |  7 ++-
 tools/perf/tests/open-syscall.c           |  3 +-
 tools/perf/tests/perf-record.c            | 13 +++--
 tools/perf/tests/rdpmc.c                  |  6 +-
 tools/perf/tests/sw-clock.c               |  6 +-
 tools/perf/tests/task-exit.c              |  6 +-
 tools/perf/util/annotate.c                | 12 +++-
 tools/perf/util/callchain.c               | 95 +++++++++++++------------------
 tools/perf/util/cloexec.c                 |  6 +-
 tools/perf/util/data.c                    |  8 ++-
 tools/perf/util/debug.h                   |  3 +
 tools/perf/util/dso.c                     |  8 ++-
 tools/perf/util/evlist.c                  |  2 +-
 tools/perf/util/evsel.c                   |  7 ++-
 tools/perf/util/parse-events.c            |  5 +-
 tools/perf/util/pmu.c                     |  4 +-
 tools/perf/util/pmu.h                     |  6 +-
 tools/perf/util/probe-event.c             | 75 +++++++++++++-----------
 tools/perf/util/probe-finder.c            |  7 ++-
 tools/perf/util/run-command.c             |  9 ++-
 tools/perf/util/util.c                    |  5 +-
 35 files changed, 234 insertions(+), 154 deletions(-)

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2014-08-15 16:49 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-08-15 16:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Frederic Weisbecker, Alex Converse,
	Adrian Hunter, Paul Mackerras, Masami Hiramatsu, Jiri Olsa,
	Anshuman Khandual, Namhyung Kim, Andi Kleen, Cody P Schafer,
	Sukadev Bhattiprolu, Arun Sharma, Naohiro Aota,
	Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo,
	Stephane Eranian, yrl.pp-manager.tt, Michael Ellerman,
	Rodrigo Campos, linux-kernel, David Ahern, Brendan Gregg,
	Elliott Hughes, linuxppc-dev

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit f373da34282560c60f0c197690eecb1b2dc49fc0:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-08-14 10:38:40 +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 759e612bf96627b64fcafe4174b3f6f2dedf2c0d:

  perf stat: Use strerror_r instead of strerror (2014-08-15 13:08:40 -0300)

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

User visible:

. Warn user to rebuild target with debuginfo in 'perf probe' (Masami Hiramatsu)

. Don't truncate Intel style addresses in 'annotate'. (Alex Converse)

Developer stuff:

. Annotate PMU related list_head members with type info. (Cody P Schafer)

. Add the triplet used for arm64 by Android (Elliott Hughes)

. Replace thread unsafe strerror() with strerror_r() accross the
  whole tools/perf/ tree (Masami Hiramatsu)

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

----------------------------------------------------------------
Alex Converse (1):
      perf annotate: Don't truncate Intel style addresses

Cody P Schafer (1):
      perf tools: Annotate PMU related list_head members with type info

Elliott Hughes (1):
      perf tools: Add arm64 triplets

Masami Hiramatsu (14):
      perf probe: Warn user to rebuild target with debuginfo
      perf probe: Don't use strerror if strlist__add failed
      perf: Use strerror_r instead of strerror
      perf probe: Make error messages thread-safe
      perf util: Replace strerror with strerror_r for thread-safety
      perf top: Use strerror_r instead of strerror
      perf trace: Use strerror_r instead of strerror
      perf record: Use strerror_r instead of strerror
      perf test: Use strerror_r instead of strerror
      perf sched: Use strerror_r instead of strerror
      perf buildid-cache: Use strerror_r instead of strerror
      perf kvm: Use strerror_r instead of strerror
      perf help: Use strerror_r instead of strerror
      perf stat: Use strerror_r instead of strerror

Namhyung Kim (1):
      perf report: Relax -g option parsing not to limit the option order

 tools/perf/arch/common.c                  |  9 +++
 tools/perf/builtin-buildid-cache.c        |  7 ++-
 tools/perf/builtin-help.c                 | 20 +++++--
 tools/perf/builtin-kvm.c                  |  7 ++-
 tools/perf/builtin-probe.c                |  5 +-
 tools/perf/builtin-record.c               |  7 ++-
 tools/perf/builtin-sched.c                |  4 +-
 tools/perf/builtin-stat.c                 |  2 +-
 tools/perf/builtin-top.c                  |  2 +-
 tools/perf/builtin-trace.c                |  6 +-
 tools/perf/perf.c                         | 10 +++-
 tools/perf/tests/builtin-test.c           |  4 +-
 tools/perf/tests/mmap-basic.c             |  7 ++-
 tools/perf/tests/open-syscall-all-cpus.c  |  5 +-
 tools/perf/tests/open-syscall-tp-fields.c |  7 ++-
 tools/perf/tests/open-syscall.c           |  3 +-
 tools/perf/tests/perf-record.c            | 13 +++--
 tools/perf/tests/rdpmc.c                  |  6 +-
 tools/perf/tests/sw-clock.c               |  6 +-
 tools/perf/tests/task-exit.c              |  6 +-
 tools/perf/util/annotate.c                | 12 +++-
 tools/perf/util/callchain.c               | 95 +++++++++++++------------------
 tools/perf/util/cloexec.c                 |  6 +-
 tools/perf/util/data.c                    |  8 ++-
 tools/perf/util/debug.h                   |  3 +
 tools/perf/util/dso.c                     |  8 ++-
 tools/perf/util/evlist.c                  |  2 +-
 tools/perf/util/evsel.c                   |  7 ++-
 tools/perf/util/parse-events.c            |  5 +-
 tools/perf/util/pmu.c                     |  4 +-
 tools/perf/util/pmu.h                     |  6 +-
 tools/perf/util/probe-event.c             | 75 +++++++++++++-----------
 tools/perf/util/probe-finder.c            |  7 ++-
 tools/perf/util/run-command.c             |  9 ++-
 tools/perf/util/util.c                    |  5 +-
 35 files changed, 234 insertions(+), 154 deletions(-)

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2014-08-15 16:48 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-08-15 16:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alex Converse, Andi Kleen, Anshuman Khandual, Arun Sharma,
	Brendan Gregg, Cody P Schafer, David Ahern, Elliott Hughes,
	Frederic Weisbecker, Haren Myneni, Jiri Olsa, linuxppc-dev,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naohiro Aota,
	Paul Mackerras, Peter Zijlstra, Rodrigo Campos, Stephane Eranian,
	Sukadev Bhattiprolu, yrl.pp-manager.tt, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit f373da34282560c60f0c197690eecb1b2dc49fc0:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-08-14 10:38:40 +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 759e612bf96627b64fcafe4174b3f6f2dedf2c0d:

  perf stat: Use strerror_r instead of strerror (2014-08-15 13:08:40 -0300)

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

User visible:

. Warn user to rebuild target with debuginfo in 'perf probe' (Masami Hiramatsu)

. Don't truncate Intel style addresses in 'annotate'. (Alex Converse)

Developer stuff:

. Annotate PMU related list_head members with type info. (Cody P Schafer)

. Add the triplet used for arm64 by Android (Elliott Hughes)

. Replace thread unsafe strerror() with strerror_r() accross the
  whole tools/perf/ tree (Masami Hiramatsu)

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

----------------------------------------------------------------
Alex Converse (1):
      perf annotate: Don't truncate Intel style addresses

Cody P Schafer (1):
      perf tools: Annotate PMU related list_head members with type info

Elliott Hughes (1):
      perf tools: Add arm64 triplets

Masami Hiramatsu (14):
      perf probe: Warn user to rebuild target with debuginfo
      perf probe: Don't use strerror if strlist__add failed
      perf: Use strerror_r instead of strerror
      perf probe: Make error messages thread-safe
      perf util: Replace strerror with strerror_r for thread-safety
      perf top: Use strerror_r instead of strerror
      perf trace: Use strerror_r instead of strerror
      perf record: Use strerror_r instead of strerror
      perf test: Use strerror_r instead of strerror
      perf sched: Use strerror_r instead of strerror
      perf buildid-cache: Use strerror_r instead of strerror
      perf kvm: Use strerror_r instead of strerror
      perf help: Use strerror_r instead of strerror
      perf stat: Use strerror_r instead of strerror

Namhyung Kim (1):
      perf report: Relax -g option parsing not to limit the option order

 tools/perf/arch/common.c                  |  9 +++
 tools/perf/builtin-buildid-cache.c        |  7 ++-
 tools/perf/builtin-help.c                 | 20 +++++--
 tools/perf/builtin-kvm.c                  |  7 ++-
 tools/perf/builtin-probe.c                |  5 +-
 tools/perf/builtin-record.c               |  7 ++-
 tools/perf/builtin-sched.c                |  4 +-
 tools/perf/builtin-stat.c                 |  2 +-
 tools/perf/builtin-top.c                  |  2 +-
 tools/perf/builtin-trace.c                |  6 +-
 tools/perf/perf.c                         | 10 +++-
 tools/perf/tests/builtin-test.c           |  4 +-
 tools/perf/tests/mmap-basic.c             |  7 ++-
 tools/perf/tests/open-syscall-all-cpus.c  |  5 +-
 tools/perf/tests/open-syscall-tp-fields.c |  7 ++-
 tools/perf/tests/open-syscall.c           |  3 +-
 tools/perf/tests/perf-record.c            | 13 +++--
 tools/perf/tests/rdpmc.c                  |  6 +-
 tools/perf/tests/sw-clock.c               |  6 +-
 tools/perf/tests/task-exit.c              |  6 +-
 tools/perf/util/annotate.c                | 12 +++-
 tools/perf/util/callchain.c               | 95 +++++++++++++------------------
 tools/perf/util/cloexec.c                 |  6 +-
 tools/perf/util/data.c                    |  8 ++-
 tools/perf/util/debug.h                   |  3 +
 tools/perf/util/dso.c                     |  8 ++-
 tools/perf/util/evlist.c                  |  2 +-
 tools/perf/util/evsel.c                   |  7 ++-
 tools/perf/util/parse-events.c            |  5 +-
 tools/perf/util/pmu.c                     |  4 +-
 tools/perf/util/pmu.h                     |  6 +-
 tools/perf/util/probe-event.c             | 75 +++++++++++++-----------
 tools/perf/util/probe-finder.c            |  7 ++-
 tools/perf/util/run-command.c             |  9 ++-
 tools/perf/util/util.c                    |  5 +-
 35 files changed, 234 insertions(+), 154 deletions(-)

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

* [GIT PULL 00/18] perf/core improvements and fixes
@ 2014-08-15 16:48 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 57+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-08-15 16:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Peter Zijlstra, Frederic Weisbecker, Alex Converse,
	Adrian Hunter, Paul Mackerras, Masami Hiramatsu, Jiri Olsa,
	Anshuman Khandual, Namhyung Kim, Andi Kleen, Cody P Schafer,
	Sukadev Bhattiprolu, Arun Sharma, Naohiro Aota,
	Arnaldo Carvalho de Melo, Arnaldo Carvalho de Melo,
	Stephane Eranian, yrl.pp-manager.tt, Michael Ellerman,
	Rodrigo Campos, linux-kernel, David Ahern, Brendan Gregg,
	Elliott Hughes, linuxppc-dev

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit f373da34282560c60f0c197690eecb1b2dc49fc0:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-08-14 10:38:40 +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 759e612bf96627b64fcafe4174b3f6f2dedf2c0d:

  perf stat: Use strerror_r instead of strerror (2014-08-15 13:08:40 -0300)

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

User visible:

. Warn user to rebuild target with debuginfo in 'perf probe' (Masami Hiramatsu)

. Don't truncate Intel style addresses in 'annotate'. (Alex Converse)

Developer stuff:

. Annotate PMU related list_head members with type info. (Cody P Schafer)

. Add the triplet used for arm64 by Android (Elliott Hughes)

. Replace thread unsafe strerror() with strerror_r() accross the
  whole tools/perf/ tree (Masami Hiramatsu)

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

----------------------------------------------------------------
Alex Converse (1):
      perf annotate: Don't truncate Intel style addresses

Cody P Schafer (1):
      perf tools: Annotate PMU related list_head members with type info

Elliott Hughes (1):
      perf tools: Add arm64 triplets

Masami Hiramatsu (14):
      perf probe: Warn user to rebuild target with debuginfo
      perf probe: Don't use strerror if strlist__add failed
      perf: Use strerror_r instead of strerror
      perf probe: Make error messages thread-safe
      perf util: Replace strerror with strerror_r for thread-safety
      perf top: Use strerror_r instead of strerror
      perf trace: Use strerror_r instead of strerror
      perf record: Use strerror_r instead of strerror
      perf test: Use strerror_r instead of strerror
      perf sched: Use strerror_r instead of strerror
      perf buildid-cache: Use strerror_r instead of strerror
      perf kvm: Use strerror_r instead of strerror
      perf help: Use strerror_r instead of strerror
      perf stat: Use strerror_r instead of strerror

Namhyung Kim (1):
      perf report: Relax -g option parsing not to limit the option order

 tools/perf/arch/common.c                  |  9 +++
 tools/perf/builtin-buildid-cache.c        |  7 ++-
 tools/perf/builtin-help.c                 | 20 +++++--
 tools/perf/builtin-kvm.c                  |  7 ++-
 tools/perf/builtin-probe.c                |  5 +-
 tools/perf/builtin-record.c               |  7 ++-
 tools/perf/builtin-sched.c                |  4 +-
 tools/perf/builtin-stat.c                 |  2 +-
 tools/perf/builtin-top.c                  |  2 +-
 tools/perf/builtin-trace.c                |  6 +-
 tools/perf/perf.c                         | 10 +++-
 tools/perf/tests/builtin-test.c           |  4 +-
 tools/perf/tests/mmap-basic.c             |  7 ++-
 tools/perf/tests/open-syscall-all-cpus.c  |  5 +-
 tools/perf/tests/open-syscall-tp-fields.c |  7 ++-
 tools/perf/tests/open-syscall.c           |  3 +-
 tools/perf/tests/perf-record.c            | 13 +++--
 tools/perf/tests/rdpmc.c                  |  6 +-
 tools/perf/tests/sw-clock.c               |  6 +-
 tools/perf/tests/task-exit.c              |  6 +-
 tools/perf/util/annotate.c                | 12 +++-
 tools/perf/util/callchain.c               | 95 +++++++++++++------------------
 tools/perf/util/cloexec.c                 |  6 +-
 tools/perf/util/data.c                    |  8 ++-
 tools/perf/util/debug.h                   |  3 +
 tools/perf/util/dso.c                     |  8 ++-
 tools/perf/util/evlist.c                  |  2 +-
 tools/perf/util/evsel.c                   |  7 ++-
 tools/perf/util/parse-events.c            |  5 +-
 tools/perf/util/pmu.c                     |  4 +-
 tools/perf/util/pmu.h                     |  6 +-
 tools/perf/util/probe-event.c             | 75 +++++++++++++-----------
 tools/perf/util/probe-finder.c            |  7 ++-
 tools/perf/util/run-command.c             |  9 ++-
 tools/perf/util/util.c                    |  5 +-
 35 files changed, 234 insertions(+), 154 deletions(-)

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

end of thread, other threads:[~2018-05-19 11:34 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-23 16:40 [GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 01/18] perf annotate: Start supporting cross arch annotation Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 02/18] perf annotate: Allow arches to specify functions to skip Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 03/18] perf annotate: Add per arch instructions annotate handlers Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 04/18] tools lib traceevent: Use USECS_PER_SEC instead of hardcoded number Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 05/18] tools lib traceevent: Add retrieval of preempt count and latency flags Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 06/18] perf tools: Show event fd in debug output Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 07/18] perf c2c report: Setup browser after opening perf.data Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 08/18] perf c2c report: Add -f/--force option Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 09/18] perf c2c report: Add struct c2c_stats::tot_hitm field Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 10/18] perf c2c report: Display total HITMs on default Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 11/18] perf c2c: Support cascading options Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 12/18] perf symbols: Print symbol offsets conditionally Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 13/18] perf evsel: Support printing callchains with arrows Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 14/18] perf sched timehist: Introduce timehist command Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 15/18] perf sched timehist: Add summary options Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 16/18] perf sched timehist: Add -w/--wakeups option Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 17/18] perf sched timehist: Add call graph options Arnaldo Carvalho de Melo
2016-11-23 16:40 ` [PATCH 18/18] perf sched timehist: Add -V/--cpu-visual option Arnaldo Carvalho de Melo
2016-11-24  4:10 ` [GIT PULL 00/18] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2018-05-19 10:54 Arnaldo Carvalho de Melo
2018-05-19 10:54 ` Arnaldo Carvalho de Melo
2018-05-19 11:33 ` Ingo Molnar
2018-05-19 11:33   ` Ingo Molnar
2017-08-29 19:42 Arnaldo Carvalho de Melo
2017-08-29 19:42 ` Arnaldo Carvalho de Melo
2017-08-29 21:15 ` Ingo Molnar
2017-08-29 21:15   ` Ingo Molnar
2017-04-12  0:51 Arnaldo Carvalho de Melo
2017-04-12  5:30 ` Ingo Molnar
2017-04-12  7:13   ` Christian Borntraeger
2017-04-12  7:24     ` Ingo Molnar
2017-02-20 19:08 Arnaldo Carvalho de Melo
2017-02-21  8:08 ` Ingo Molnar
2016-06-27 21:01 Arnaldo Carvalho de Melo
2016-06-28  7:02 ` Ingo Molnar
2016-06-28  8:27   ` Jiri Olsa
2016-06-28 14:01   ` Arnaldo Carvalho de Melo
2016-06-28 14:12     ` Arnaldo Carvalho de Melo
2016-06-29  9:36     ` Ingo Molnar
2015-07-24  1:58 Arnaldo Carvalho de Melo
2015-07-27 15:58 ` Ingo Molnar
2015-05-18 15:50 Arnaldo Carvalho de Melo
2015-05-20 11:25 ` Ingo Molnar
2014-12-16 16:57 Arnaldo Carvalho de Melo
2014-12-17 14:50 ` Arnaldo Carvalho de Melo
2014-12-18  6:24   ` Ingo Molnar
2014-12-11 21:25 Arnaldo Carvalho de Melo
2014-12-12  8:10 ` Ingo Molnar
2014-11-06 21:04 Arnaldo Carvalho de Melo
2014-11-07  5:24 ` Ingo Molnar
2014-08-15 16:49 Arnaldo Carvalho de Melo
2014-08-15 16:49 ` Arnaldo Carvalho de Melo
2014-08-18  8:18 ` Ingo Molnar
2014-08-18  8:18   ` Ingo Molnar
2014-08-15 16:48 Arnaldo Carvalho de Melo
2014-08-15 16:48 ` Arnaldo Carvalho de Melo

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