All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 00/20] perf/core improvements and fixes
@ 2015-03-03  3:25 Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 01/20] perf tools: Only include tsc file for x86 Arnaldo Carvalho de Melo
                   ` (21 more replies)
  0 siblings, 22 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, He Kuang, H . Peter Anvin, Jiri Olsa,
	Kaixu Xia, Kan Liang, Masami Hiramatsu, Namhyung Kim,
	Naohiro Aota, Peter Zijlstra, Stephane Eranian,
	Suzuki K . Poulose, Thomas Gleixner, Arnaldo Carvalho de Melo

Hi Ingo,

	This one has the thread reference counting, that I tested using 'perf probe':

  perf probe -x ~/bin/perf 'thread__delete:4 thread refcnt=thread->refcnt tid=thread->tid'
  perf probe -x ~/bin/perf 'thread__get:1 thread refcnt=thread->refcnt tid=thread->tid'
  perf probe -x ~/bin/perf 'thread__put:6 thread refcnt=thread->refcnt tid=thread->tid'
  perf record -o thread_refcnt.data -g -e probe_perf:thread__put,probe_perf:thread__get_1,probe_perf:thread__delete perf top

	with that I checked and in the end the refcount reaches zero and
thread__delete is called, as expected, using 'perf script', looking at the
callchains, etc, did the same for 'perf sched lat' and 'trace' also seems to
work.

	David, Namhyung, please holler if you find something fishy with this
thread refcnt stuff, as it is something that is related to previous/current
work by you guys,

	Ah, I also merged perf/urgent so that it is buildable in more systems.o

	There is also the revert for that is_power_of_2 "simplification" in perf_mmap,
that hasn't made it to perf/urgent nor upstream, its something only in perf/core, sorry
about that one, should have caught that :-\

	Please consider pulling,

- Arnaldo
The following changes since commit 33be4ef116511f1079c4c3bf4b5547faf7439301:

  Merge 'tip/perf/urgent' into perf/core to pick fixes (2015-03-02 11:45:49 -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 ae536acfacb65a4a9858c32b12361e09f84f4157:

  perf sched: No need to keep the session around (2015-03-03 00:17:12 -0300)

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

User visible:

- Warn if given uprobe event accesses memory on older kernel (Masami Hiramatsu)

- 'perf record' Documentation fixes (Namhyung Kim)

- Report unsupported events properly in 'perf stat' (Suzuki K. Poulose)

Infrastructure:

- Avoid FORK after COMM when synthesizing records for pre-existing threads (Arnaldo Carvalho de Melo)

- Reference count struct thread (Arnaldo Carvalho de Melo)

- No need to keep the session around in 'perf sched', thread refcounting removes that need (Arnaldo Carvalho de Melo)

- Initialize cpu set in pthread_attr_setaffinity_np feature test (Adrian Hunter)

- Only include tsc file for x86 (David Ahern)

- Compare JOBS to 0 after grep (David Ahern)

- Improve feature detection messages (Ingo Molnar)

- Revert "perf: Remove the extra validity check on nr_pages" (Kan Liang)

- Remove bias offset to find probe point by address (Masami Hiramatsu)

- Fix build error on ARCH=i386/x86_64/sparc64 )Namhyung Kim)

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test

Arnaldo Carvalho de Melo (3):
      perf tools: Fix FORK after COMM when synthesizing records for pre-existing threads
      perf tools: Reference count struct thread
      perf sched: No need to keep the session around

David Ahern (2):
      perf tools: Only include tsc file for x86
      perf tools: Compare JOBS to 0 after grep

Ingo Molnar (7):
      perf tools: Add PERF-FEATURES to the .gitignore file
      perf tools: Remove annoying extra message from the features build
      perf tools: Improve Python feature detection messages
      perf tools: Improve libperl detection message
      perf tools: Improve libbfd detection message
      perf tools: Improve feature test debuggability
      perf tools: Improve 'libbabel' feature check failure message

Kan Liang (1):
      Revert "perf: Remove the extra validity check on nr_pages"

Masami Hiramatsu (2):
      perf probe: Warn if given uprobe event accesses memory on older kernel
      perf probe: Remove bias offset to find probe point by address

Namhyung Kim (3):
      perf tools: Fix build error on ARCH=i386/x86_64/sparc64
      perf record: Get rid of -l option from Documentation
      perf record: Document --group option

Suzuki K. Poulose (1):
      perf stat: Report unsupported events properly

 kernel/events/core.c                               |  2 +-
 tools/perf/.gitignore                              |  1 +
 tools/perf/Documentation/perf-record.txt           | 12 ++++--
 tools/perf/Makefile                                |  2 +-
 tools/perf/builtin-sched.c                         | 26 +++++--------
 tools/perf/builtin-stat.c                          |  5 ++-
 tools/perf/builtin-trace.c                         |  7 +++-
 tools/perf/config/Makefile                         | 17 ++++-----
 tools/perf/config/Makefile.arch                    | 27 +++----------
 tools/perf/config/feature-checks/Makefile          | 16 ++++----
 .../test-pthread-attr-setaffinity-np.c             |  4 +-
 tools/perf/config/utilities.mak                    |  3 +-
 tools/perf/ui/browsers/hists.c                     |  6 +--
 tools/perf/util/Build                              |  2 +-
 tools/perf/util/build-id.c                         |  5 ++-
 tools/perf/util/event.c                            | 34 ++++++++++++-----
 tools/perf/util/hist.c                             |  2 +
 tools/perf/util/hist.h                             |  2 +-
 tools/perf/util/machine.c                          | 44 +++++++++++-----------
 tools/perf/util/machine.h                          |  1 -
 tools/perf/util/probe-event.c                      | 23 +++++++++++
 tools/perf/util/probe-finder.c                     |  5 +--
 tools/perf/util/session.c                          |  6 ---
 tools/perf/util/thread.c                           | 14 +++++++
 tools/perf/util/thread.h                           | 13 +++++++
 25 files changed, 164 insertions(+), 115 deletions(-)

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

* [PATCH 01/20] perf tools: Only include tsc file for x86
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 02/20] perf tools: Compare JOBS to 0 after grep Arnaldo Carvalho de Melo
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Adrian Hunter, Jiri Olsa,
	Arnaldo Carvalho de Melo

From: David Ahern <david.ahern@oracle.com>

The perf_time_to_tsc and tsc_to_perf_time functions are only used for x86.

Make inclusion of tsc.c dependent on x86 as well.

Signed-off-by: David Ahern <david.ahern@oracle.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1424370153-128274-1-git-send-email-david.ahern@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/Build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index a2c8047d25f7..972a6e0da7ad 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -71,7 +71,7 @@ libperf-y += stat.o
 libperf-y += record.o
 libperf-y += srcline.o
 libperf-y += data.o
-libperf-y += tsc.o
+libperf-$(CONFIG_X86) += tsc.o
 libperf-y += cloexec.o
 libperf-y += thread-stack.o
 
-- 
1.9.3


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

* [PATCH 02/20] perf tools: Compare JOBS to 0 after grep
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 01/20] perf tools: Only include tsc file for x86 Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 03/20] perf stat: Report unsupported events properly Arnaldo Carvalho de Melo
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, David Ahern, Arnaldo Carvalho de Melo

From: David Ahern <david.ahern@oracle.com>

If JOBS is not by user perf tries to autodetect the number by grepping
the number of CPUs from /proc/cpuinfo. 'grep -c' will always return an
integer so after this command JOBS should be compared to 0, not "".

Signed-off-by: David Ahern <david.ahern@oracle.com>
Link: http://lkml.kernel.org/r/1424303971-91904-1-git-send-email-david.ahern@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index cb2e5868c8e8..d5020aeb5626 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -25,7 +25,7 @@ unexport MAKEFLAGS
 #
 ifeq ($(JOBS),)
   JOBS := $(shell grep -c ^processor /proc/cpuinfo 2>/dev/null)
-  ifeq ($(JOBS),)
+  ifeq ($(JOBS),0)
     JOBS := 1
   endif
 endif
-- 
1.9.3


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

* [PATCH 03/20] perf stat: Report unsupported events properly
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 01/20] perf tools: Only include tsc file for x86 Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 02/20] perf tools: Compare JOBS to 0 after grep Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 04/20] perf tools: Fix FORK after COMM when synthesizing records for pre-existing threads Arnaldo Carvalho de Melo
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Suzuki K. Poulose, Jiri Olsa, Arnaldo Carvalho de Melo

From: "Suzuki K. Poulose" <suzuki.poulose@arm.com>

Commit 1971f59 (perf stat: Use read_counter in read_counter_aggr )
broke the perf stat output for unsupported counters.

 $ perf stat -v -a -C 0 -e CCI_400/config=24/ sleep 1
 Warning:
 CCI_400/config=24/ event is not supported by the kernel.

  Performance counter stats for 'system wide':

                  0      CCI_400/config=24/

        1.080265400 seconds time elapsed

Where it used to be :

$ perf stat -v -a -C 0 -e CCI_400/config=24/ sleep 1
 Warning:
 CCI_400/config=24/ event is not supported by the kernel.

  Performance counter stats for 'system wide':

    <not supported>      CCI_400/config=24/

        1.083840675 seconds time elapsed

This patch fixes the issues by checking if the counter is supported,
before reading and logging the counter value.

Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Acked-by: David Ahern <dsahern@gmail.com>
Tested-by: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1423852858-8455-1-git-send-email-suzuki.poulose@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-stat.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index e598e4e98170..d28949d210cc 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -510,6 +510,9 @@ static int read_counter(struct perf_evsel *counter)
 	int ncpus = perf_evsel__nr_cpus(counter);
 	int cpu, thread;
 
+	if (!counter->supported)
+		return -ENOENT;
+
 	if (counter->system_wide)
 		nthreads = 1;
 
@@ -1285,7 +1288,7 @@ static void print_counter_aggr(struct perf_evsel *counter, char *prefix)
 	if (prefix)
 		fprintf(output, "%s", prefix);
 
-	if (scaled == -1) {
+	if (scaled == -1 || !counter->supported) {
 		fprintf(output, "%*s%s",
 			csv_output ? 0 : 18,
 			counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED,
-- 
1.9.3


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

* [PATCH 04/20] perf tools: Fix FORK after COMM when synthesizing records for pre-existing threads
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2015-03-03  3:25 ` [PATCH 03/20] perf stat: Report unsupported events properly Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 05/20] perf tools: Fix build error on ARCH=i386/x86_64/sparc64 Arnaldo Carvalho de Melo
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 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, Namhyung Kim, Stephane Eranian

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

In this commit:

  commit 363b785f3805a2632eb09a8b430842461c21a640
  Author: Don Zickus <dzickus@redhat.com>
  Date:   Fri Mar 14 10:43:44 2014 -0400

      perf tools: Speed up thread map generation

We ended up emitting PERF_RECORD_FORK events after their corresponding
PERF_RECORD_COMM, so the code below will remove the "existing thread"
and then recreates it, unnecessarily:

  [root@ssdandy ~]# perf probe -x ~/bin/perf -L machine__process_fork_event
  <machine__process_fork_event@/home/acme/git/linux/tools/perf/util/machine.c:0>
      0  int machine__process_fork_event(struct machine *machine, union perf_event *event,
                                        struct perf_sample *sample)
      2  {
      3         struct thread *thread = machine__find_thread(machine,
                                                             event->fork.pid,
                                                             event->fork.tid);
      6         struct thread *parent = machine__findnew_thread(machine,
                                                                event->fork.ppid,
                                                                event->fork.ptid);

                /* if a thread currently exists for the thread id remove it */
                if (thread != NULL)
     12                 machine__remove_thread(machine, thread);

     14         thread = machine__findnew_thread(machine, event->fork.pid,
                                                 event->fork.tid);
     16         if (dump_trace)
     17                 perf_event__fprintf_task(event, stdout);

     19         if (thread == NULL || parent == NULL ||
     20             thread__fork(thread, parent, sample->time) < 0) {
     21                 dump_printf("problem processing PERF_RECORD_FORK, skipping event.\n");
     22                 return -1;
                }

     25         return 0;
     26  }

  [root@ssdandy ~]# perf probe -x ~/bin/perf fork_after_comm=machine__process_fork_event:12
  Added new event:
    probe_perf:fork_after_comm (on machine__process_fork_event:12 in /home/acme/bin/perf)

  You can now use it in all perf tools, such as:

	perf record -e probe_perf:fork_after_comm -aR sleep 1

  [root@ssdandy ~]#

  [root@ssdandy ~]# perf record -g -e probe_perf:* trace -o /tmp/bla
  ^C[ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.021 MB perf.data (30 samples) ]
  Terminated
  [root@ssdandy ~]#

  [root@ssdandy ~]# perf report --no-children --show-total-period --stdio
  # To display the perf.data header info, please use --header/--header-only options.
  #
  # Samples: 30  of event 'probe_perf:fork_after_comm'
  # Event count (approx.): 30
  #
  # Overhead        Period  Command  Shared Object  Symbol
  # ........  ............  .......  .............  ...............................
  #
     100.00%            30  trace    trace          [.] machine__process_fork_event
                |
                ---machine__process_fork_event
                   __event__synthesize_thread.part.2
                   perf_event__synthesize_threads
                   cmd_trace
                   main
                   __libc_start_main

  [root@ssdandy ~]#

  And Looking at 'perf report -D' output we see it:

  0 0 0x8698 [0x30]: PERF_RECORD_COMM: auditd:703/707
  0 0 0x86c8 [0x38]: PERF_RECORD_FORK(703:707):(703:703)

Fix it by more closely mimicking how the kernel generates those records
when a new fork happens, i.e. first a PERF_RECORD_FORK, then a
PERF_RECORD_COMM.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-h0emvymi2t3mw8dlqd6d6z73@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/event.c | 34 ++++++++++++++++++++++++----------
 1 file changed, 24 insertions(+), 10 deletions(-)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 9e806d855b04..d5efa5092ce6 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -95,9 +95,7 @@ static pid_t perf_event__get_comm_tgid(pid_t pid, char *comm, size_t len)
 	return tgid;
 }
 
-static pid_t perf_event__synthesize_comm(struct perf_tool *tool,
-					 union perf_event *event, pid_t pid,
-					 perf_event__handler_t process,
+static pid_t perf_event__prepare_comm(union perf_event *event, pid_t pid,
 					 struct machine *machine)
 {
 	size_t size;
@@ -124,6 +122,19 @@ static pid_t perf_event__synthesize_comm(struct perf_tool *tool,
 				(sizeof(event->comm.comm) - size) +
 				machine->id_hdr_size);
 	event->comm.tid = pid;
+out:
+	return tgid;
+}
+
+static pid_t perf_event__synthesize_comm(struct perf_tool *tool,
+					 union perf_event *event, pid_t pid,
+					 perf_event__handler_t process,
+					 struct machine *machine)
+{
+	pid_t tgid = perf_event__prepare_comm(event, pid, machine);
+
+	if (tgid == -1)
+		goto out;
 
 	if (process(tool, event, &synth_sample, machine) != 0)
 		return -1;
@@ -139,7 +150,6 @@ static int perf_event__synthesize_fork(struct perf_tool *tool,
 {
 	memset(&event->fork, 0, sizeof(event->fork) + machine->id_hdr_size);
 
-	/* this is really a clone event but we use fork to synthesize it */
 	event->fork.ppid = tgid;
 	event->fork.ptid = tgid;
 	event->fork.pid  = tgid;
@@ -368,19 +378,23 @@ static int __event__synthesize_thread(union perf_event *comm_event,
 		if (*end)
 			continue;
 
-		tgid = perf_event__synthesize_comm(tool, comm_event, _pid,
-						   process, machine);
+		tgid = perf_event__prepare_comm(comm_event, _pid, machine);
 		if (tgid == -1)
 			return -1;
 
+		if (perf_event__synthesize_fork(tool, fork_event, _pid, tgid,
+						process, machine) < 0)
+			return -1;
+		/*
+		 * Send the prepared comm event
+		 */
+		if (process(tool, comm_event, &synth_sample, machine) != 0)
+			return -1;
+
 		if (_pid == pid) {
 			/* process the parent's maps too */
 			rc = perf_event__synthesize_mmap_events(tool, mmap_event, pid, tgid,
 						process, machine, mmap_data);
-		} else {
-			/* only fork the tid's map, to save time */
-			rc = perf_event__synthesize_fork(tool, fork_event, _pid, tgid,
-						 process, machine);
 		}
 
 		if (rc)
-- 
1.9.3


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

* [PATCH 05/20] perf tools: Fix build error on ARCH=i386/x86_64/sparc64
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2015-03-03  3:25 ` [PATCH 04/20] perf tools: Fix FORK after COMM when synthesizing records for pre-existing threads Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 06/20] perf record: Get rid of -l option from Documentation Arnaldo Carvalho de Melo
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, David Ahern, He Kuang,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

He Kuang reported that current perf tools failed to build when ARCH
variable was given like above.

It was because the name is different that internal directory name.  I
can see that David's sparc64 build has same problem.

So fix it by applying the sed conversion script to the command line ARCH
variable also, and fixing the converted name there (i.e. i386/x86_64 ->
x86, sparc64 -> sparc).

Reported-by: He Kuang <hekuang@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: He Kuang <hekuang@huawei.com>
Acked: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <david.ahern@oracle.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1425270663-10215-1-git-send-email-namhyung@kernel.org
[ Resolved conflict with 4861f87cd3d1 "Make sparc64 arch point to sparc" ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile.arch | 27 +++++----------------------
 1 file changed, 5 insertions(+), 22 deletions(-)

diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch
index ac8721ffa6c8..e9720571341d 100644
--- a/tools/perf/config/Makefile.arch
+++ b/tools/perf/config/Makefile.arch
@@ -1,32 +1,15 @@
+ifndef ARCH
+ARCH := $(shell uname -m 2>/dev/null || echo not)
+endif
 
-uname_M := $(shell uname -m 2>/dev/null || echo not)
-
-RAW_ARCH := $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
+ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
+                                  -e s/sun4u/sparc/ -e s/sparc64/sparc/ \
                                   -e s/arm.*/arm/ -e s/sa110/arm/ \
                                   -e s/s390x/s390/ -e s/parisc64/parisc/ \
                                   -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
                                   -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
                                   -e s/tile.*/tile/ )
 
-# Additional ARCH settings for x86
-ifeq ($(RAW_ARCH),i386)
-  ARCH ?= x86
-endif
-
-ifeq ($(RAW_ARCH),x86_64)
-  ARCH ?= x86
-
-  ifneq (, $(findstring m32,$(CFLAGS)))
-    RAW_ARCH := x86_32
-  endif
-endif
-
-ifeq ($(RAW_ARCH),sparc64)
-  ARCH ?= sparc
-endif
-
-ARCH ?= $(RAW_ARCH)
-
 LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
 ifeq ($(LP64), 1)
   IS_64_BIT := 1
-- 
1.9.3


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

* [PATCH 06/20] perf record: Get rid of -l option from Documentation
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (4 preceding siblings ...)
  2015-03-03  3:25 ` [PATCH 05/20] perf tools: Fix build error on ARCH=i386/x86_64/sparc64 Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 07/20] perf record: Document --group option Arnaldo Carvalho de Melo
                   ` (15 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Jiri Olsa, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

The perf record does not support -l option anymore, so nuke it.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1425272038-10406-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-record.txt | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index cae75c11120f..4d668945dfe6 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -62,9 +62,6 @@ OPTIONS
 --all-cpus::
         System-wide collection from all CPUs.
 
--l::
-        Scale counter values.
-
 -p::
 --pid=::
 	Record events on existing process ID (comma separated list).
-- 
1.9.3


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

* [PATCH 07/20] perf record: Document --group option
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (5 preceding siblings ...)
  2015-03-03  3:25 ` [PATCH 06/20] perf record: Get rid of -l option from Documentation Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 08/20] perf tools: Add PERF-FEATURES to the .gitignore file Arnaldo Carvalho de Melo
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Namhyung Kim, Jiri Olsa, Peter Zijlstra,
	Stephane Eranian, Arnaldo Carvalho de Melo

From: Namhyung Kim <namhyung@kernel.org>

The 'perf record --group' option lacks documentation and confuses users.
As -e/--event option already supports group spec, it should not be used
anymore.

Also add a short description of event group itself.

Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1425266013-5034-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Documentation/perf-record.txt | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 4d668945dfe6..355c4f5569b5 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -55,6 +55,11 @@ OPTIONS
           If you want to profile write accesses in [0x1000~1008), just set
           'mem:0x1000/8:w'.
 
+	- a group of events surrounded by a pair of brace ("{event1,event2,...}").
+	  Each event is separated by commas and the group should be quoted to
+	  prevent the shell interpretation.  You also need to use --group on
+	  "perf report" to view group events together.
+
 --filter=<filter>::
         Event filter.
 
@@ -104,6 +109,10 @@ OPTIONS
 	specification with appended unit character - B/K/M/G. The
 	size is rounded up to have nearest pages power of two value.
 
+--group::
+	Put all events in a single event group.  This precedes the --event
+	option and remains only for backward compatibility.  See --event.
+
 -g::
 	Enables call-graph (stack chain/backtrace) recording.
 
-- 
1.9.3


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

* [PATCH 08/20] perf tools: Add PERF-FEATURES to the .gitignore file
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (6 preceding siblings ...)
  2015-03-03  3:25 ` [PATCH 07/20] perf record: Document --group option Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 09/20] perf tools: Remove annoying extra message from the features build Arnaldo Carvalho de Melo
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Jiri Olsa, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Ingo Molnar <mingo@kernel.org>

It's an auto-generated file.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150228081248.GA31856@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore
index 40399c3d97d6..68328f517a2e 100644
--- a/tools/perf/.gitignore
+++ b/tools/perf/.gitignore
@@ -1,6 +1,7 @@
 PERF-CFLAGS
 PERF-GUI-VARS
 PERF-VERSION-FILE
+PERF-FEATURES
 perf
 perf-read-vdso32
 perf-read-vdsox32
-- 
1.9.3


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

* [PATCH 09/20] perf tools: Remove annoying extra message from the features build
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (7 preceding siblings ...)
  2015-03-03  3:25 ` [PATCH 08/20] perf tools: Add PERF-FEATURES to the .gitignore file Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:25 ` [PATCH 10/20] perf tools: Improve Python feature detection messages Arnaldo Carvalho de Melo
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Jiri Olsa, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Ingo Molnar <mingo@kernel.org>

This message:

  Makefile:153: The path 'python-config' is not executable.

Appears on every perf build that does not have a sufficient python
environment installed. It's really just an internal detail of python
configuration pass and users should not see it - and it's pretty
meaningless to them in any case because the message is not very helpful.
(So it's not executable. Why does that matter? What can the user do
about it?)

Remove the warning, the missing python feature warning is sufficient:

  config/Makefile:566: No python-config tool was found
  config/Makefile:566: Python support will not be built

although even that one isn't very helpful to users: so no Python support
will be built, what can the user do to fix that? Most other such
warnings give package install suggestions.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150228081750.GA31887@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/utilities.mak | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/config/utilities.mak b/tools/perf/config/utilities.mak
index 7076a62d0ff7..c16ce833079c 100644
--- a/tools/perf/config/utilities.mak
+++ b/tools/perf/config/utilities.mak
@@ -175,6 +175,5 @@ _ge-abspath = $(if $(is-executable),$(1))
 define get-executable-or-default
 $(if $($(1)),$(call _ge_attempt,$($(1)),$(1)),$(call _ge_attempt,$(2)))
 endef
-_ge_attempt = $(if $(get-executable),$(get-executable),$(_gea_warn)$(call _gea_err,$(2)))
-_gea_warn = $(warning The path '$(1)' is not executable.)
+_ge_attempt = $(if $(get-executable),$(get-executable),$(call _gea_err,$(2)))
 _gea_err  = $(if $(1),$(error Please set '$(1)' appropriately))
-- 
1.9.3


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

* [PATCH 10/20] perf tools: Improve Python feature detection messages
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (8 preceding siblings ...)
  2015-03-03  3:25 ` [PATCH 09/20] perf tools: Remove annoying extra message from the features build Arnaldo Carvalho de Melo
@ 2015-03-03  3:25 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 11/20] perf tools: Improve libperl detection message Arnaldo Carvalho de Melo
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Jiri Olsa, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Ingo Molnar <mingo@kernel.org>

Change the Python detection message from:

  config/Makefile:566: No python-config tool was found
  config/Makefile:566: Python support will not be built

  config/Makefile:565: No 'python-config' tool was found: disables Python support - please install python-devel/python-dev

It's now a standard one-line message with a package install suggestion,
and it also uses the standard language used by other feature detection
messages.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150228083345.GB31887@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index c3570b5f3bf3..d3efeef58ded 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -548,22 +548,21 @@ endif
 disable-python = $(eval $(disable-python_code))
 define disable-python_code
   CFLAGS += -DNO_LIBPYTHON
-  $(if $(1),$(warning No $(1) was found))
-  $(warning Python support will not be built)
+  $(warning $1)
   NO_LIBPYTHON := 1
 endef
 
 ifdef NO_LIBPYTHON
-  $(call disable-python)
+  $(call disable-python,Python support disabled by user)
 else
 
   ifndef PYTHON
-    $(call disable-python,python interpreter)
+    $(call disable-python,No python interpreter was found: disables Python support - please install python-devel/python-dev)
   else
     PYTHON_WORD := $(call shell-wordify,$(PYTHON))
 
     ifndef PYTHON_CONFIG
-      $(call disable-python,python-config tool)
+      $(call disable-python,No 'python-config' tool was found: disables Python support - please install python-devel/python-dev)
     else
 
       PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
@@ -575,7 +574,7 @@ else
       FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
 
       ifneq ($(feature-libpython), 1)
-        $(call disable-python,Python.h (for Python 2.x))
+        $(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev)
       else
 
         ifneq ($(feature-libpython-version), 1)
-- 
1.9.3


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

* [PATCH 11/20] perf tools: Improve libperl detection message
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (9 preceding siblings ...)
  2015-03-03  3:25 ` [PATCH 10/20] perf tools: Improve Python feature detection messages Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 12/20] perf tools: Improve libbfd " Arnaldo Carvalho de Melo
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Jiri Olsa, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Ingo Molnar <mingo@kernel.org>

Before:

  Missing perl devel files. Disabling perl scripting support, consider installing perl-ExtUtils-Embed

After:

  Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev

Change the message to the standard 'please install' language and
adds Debian-ish package suggestion.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150228083909.GC31887@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index d3efeef58ded..aa2f0aa97e5e 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -531,7 +531,7 @@ else
   ifneq ($(feature-libperl), 1)
     CFLAGS += -DNO_LIBPERL
     NO_LIBPERL := 1
-    msg := $(warning Missing perl devel files. Disabling perl scripting support, consider installing perl-ExtUtils-Embed);
+    msg := $(warning Missing perl devel files. Disabling perl scripting support, please install perl-ExtUtils-Embed/libperl-dev);
   else
     LDFLAGS += $(PERL_EMBED_LDFLAGS)
     EXTLIBS += $(PERL_EMBED_LIBADD)
-- 
1.9.3


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

* [PATCH 12/20] perf tools: Improve libbfd detection message
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (10 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 11/20] perf tools: Improve libperl detection message Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 13/20] perf tools: Improve feature test debuggability Arnaldo Carvalho de Melo
                   ` (9 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Jiri Olsa, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Ingo Molnar <mingo@kernel.org>

Before:

  No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling

After:

  No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling

Change the message to the standard 'please install' language and also
add libiberty-dev suggestion for Ubuntu systems.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150228084610.GE31887@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index aa2f0aa97e5e..e2350ada6ccd 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -635,7 +635,7 @@ else
             EXTLIBS += -liberty
             CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
           else
-            msg := $(warning No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demangling)
+            msg := $(warning No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling)
             CFLAGS += -DNO_DEMANGLE
           endif
         endif
-- 
1.9.3


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

* [PATCH 13/20] perf tools: Improve feature test debuggability
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (11 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 12/20] perf tools: Improve libbfd " Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 14/20] perf tools: Improve 'libbabel' feature check failure message Arnaldo Carvalho de Melo
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Jiri Olsa, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Ingo Molnar <mingo@kernel.org>

Certain feature tests fail with link errors:

  triton:~/tip/tools/perf/config/feature-checks> make test-libbabeltrace.bin
  gcc -MD  -o test-libbabeltrace.bin test-libbabeltrace.c # -lbabeltrace provided by
  /tmp/cc6dRSqd.o: In function `main':
  test-libbabeltrace.c:(.text+0xf): undefined reference to `bt_ctf_stream_class_get_packet_context_type'

although they should already fail with a build error due to lack of a
proper prototype for the function. Due to this I first tried to find
which library was missing - while it was the whole feature that was
missing from the .h file already.

To solve this, propagate -Wall -Werror to all testcases and remove them
from testcase Makefile rules that used them explicitly.

A missing feature now outputs:

  triton:~/tip/tools/perf/config/feature-checks> make test-libbabeltrace.bin
  gcc -MD  -Wall -Werror -o test-libbabeltrace.bin test-libbabeltrace.c  # -lbabeltrace provided by
  test-libbabeltrace.c: In function ‘main’:
  test-libbabeltrace.c:6:2: error: implicit declaration of function ‘bt_ctf_stream_class_get_packet_context_type’ [-Werror=implicit-function-declaration]

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150228091627.GF31887@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/feature-checks/Makefile | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index 70c9aebe9da3..8fe067864957 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -39,24 +39,24 @@ PKG_CONFIG := $(CROSS_COMPILE)pkg-config
 
 all: $(FILES)
 
-BUILD = $(CC) $(CFLAGS) -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
+BUILD = $(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ $(patsubst %.bin,%.c,$@) $(LDFLAGS)
 
 ###############################
 
 test-all.bin:
-	$(BUILD) -Werror -fstack-protector-all -O2 -Werror -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -lbabeltrace
+	$(BUILD) -fstack-protector-all -O2 -D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lelf -laudit -I/usr/include/slang -lslang $(shell $(PKG_CONFIG) --libs --cflags gtk+-2.0 2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd -ldl -lz -lbabeltrace
 
 test-hello.bin:
 	$(BUILD)
 
 test-pthread-attr-setaffinity-np.bin:
-	$(BUILD) -D_GNU_SOURCE -Werror -lpthread
+	$(BUILD) -D_GNU_SOURCE -lpthread
 
 test-stackprotector-all.bin:
-	$(BUILD) -Werror -fstack-protector-all
+	$(BUILD) -fstack-protector-all
 
 test-fortify-source.bin:
-	$(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
+	$(BUILD) -O2 -D_FORTIFY_SOURCE=2
 
 test-bionic.bin:
 	$(BUILD)
@@ -119,10 +119,10 @@ test-libbfd.bin:
 	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl
 
 test-liberty.bin:
-	$(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
+	$(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
 
 test-liberty-z.bin:
-	$(CC) -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
+	$(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
 
 test-cplus-demangle.bin:
 	$(BUILD) -liberty
@@ -140,7 +140,7 @@ test-libbabeltrace.bin:
 	$(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace)
 
 test-sync-compare-and-swap.bin:
-	$(BUILD) -Werror
+	$(BUILD)
 
 test-compile-32.bin:
 	$(CC) -m32 -o $(OUTPUT)$@ test-compile.c
-- 
1.9.3


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

* [PATCH 14/20] perf tools: Improve 'libbabel' feature check failure message
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (12 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 13/20] perf tools: Improve feature test debuggability Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 15/20] perf probe: Warn if given uprobe event accesses memory on older kernel Arnaldo Carvalho de Melo
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, David Ahern, Jiri Olsa, Namhyung Kim,
	Peter Zijlstra, Arnaldo Carvalho de Melo

From: Ingo Molnar <mingo@kernel.org>

On Debian-ish systems libbabeltrace-dev should be suggested as a package
install as well.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <david.ahern@oracle.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150228091849.GA28959@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index e2350ada6ccd..d44c64d64465 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -706,7 +706,7 @@ endif
 
 ifndef NO_LIBBABELTRACE
   ifeq ($(feature-libbabeltrace), 0)
-    msg := $(warning No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-devel/libbabeltrace-ctf-dev);
+    msg := $(warning No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev);
     NO_LIBBABELTRACE := 1
   else
     CFLAGS += -DHAVE_LIBBABELTRACE_SUPPORT $(LIBBABELTRACE_CFLAGS)
-- 
1.9.3


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

* [PATCH 15/20] perf probe: Warn if given uprobe event accesses memory on older kernel
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (13 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 14/20] perf tools: Improve 'libbabel' feature check failure message Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 16/20] perf probe: Remove bias offset to find probe point by address Arnaldo Carvalho de Melo
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, David Ahern, Jiri Olsa,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Warn if given uprobe event accesses memory on older kernel.

Until 3.14, uprobe event only supports accessing registers so this warns
to upgrade kernel if uprobe-event returns -EINVAL and an argument of the
event accesses memory ($stack, @+offset, and +|-offs() symtax).

With this patch (on 3.10.0-123.13.2.el7.x86_64);
  -----
  # ./perf probe -x ./perf warn_uprobe_event_compat stack=-0\(%sp\)
  Added new event:
  Failed to write event: Invalid argument
  Please upgrade your kernel to at least 3.14 to have access to feature -0(%sp)
    Error: Failed to add events.
  -----

Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20150228025329.32106.70581.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 7c0e765fa2e3..1c570c2fa7cc 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -2199,6 +2199,27 @@ static int get_new_event_name(char *buf, size_t len, const char *base,
 	return ret;
 }
 
+/* Warn if the current kernel's uprobe implementation is old */
+static void warn_uprobe_event_compat(struct probe_trace_event *tev)
+{
+	int i;
+	char *buf = synthesize_probe_trace_command(tev);
+
+	/* Old uprobe event doesn't support memory dereference */
+	if (!tev->uprobes || tev->nargs == 0 || !buf)
+		goto out;
+
+	for (i = 0; i < tev->nargs; i++)
+		if (strglobmatch(tev->args[i].value, "[$@+-]*")) {
+			pr_warning("Please upgrade your kernel to at least "
+				   "3.14 to have access to feature %s\n",
+				   tev->args[i].value);
+			break;
+		}
+out:
+	free(buf);
+}
+
 static int __add_probe_trace_events(struct perf_probe_event *pev,
 				     struct probe_trace_event *tevs,
 				     int ntevs, bool allow_suffix)
@@ -2295,6 +2316,8 @@ static int __add_probe_trace_events(struct perf_probe_event *pev,
 		 */
 		allow_suffix = true;
 	}
+	if (ret == -EINVAL && pev->uprobes)
+		warn_uprobe_event_compat(tev);
 
 	/* Note that it is possible to skip all events because of blacklist */
 	if (ret >= 0 && tev->event) {
-- 
1.9.3


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

* [PATCH 16/20] perf probe: Remove bias offset to find probe point by address
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (14 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 15/20] perf probe: Warn if given uprobe event accesses memory on older kernel Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 17/20] perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test Arnaldo Carvalho de Melo
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, David Ahern, Jiri Olsa,
	Namhyung Kim, Naohiro Aota, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

Remove bias offset to find probe point by address.

Without this patch, probe points on kernel and executables are shown
correctly, but do not work with libraries:

  # ./perf probe -l
    probe:do_fork        (on do_fork@kernel/fork.c)
    probe_libc:malloc    (on malloc in /usr/lib64/libc-2.17.so)
    probe_perf:strlist__new (on strlist__new@util/strlist.c in /home/mhiramat/ksrc/linux-3/tools/perf/perf)

Removing bias allows it to show it as real place:

  # ./perf probe -l
    probe:do_fork        (on do_fork@kernel/fork.c)
    probe_libc:malloc    (on __libc_malloc@malloc/malloc.c in /usr/lib64/libc-2.17.so)
    probe_perf:strlist__new (on strlist__new@util/strlist.c in /home/mhiramat/ksrc/linux-3/tools/perf/perf)

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naohiro Aota <naota@elisp.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150302124946.9191.64085.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-finder.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index d14193518e4d..46f009aa486c 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -1345,11 +1345,8 @@ int debuginfo__find_probe_point(struct debuginfo *dbg, unsigned long addr,
 	const char *fname = NULL, *func = NULL, *basefunc = NULL, *tmp;
 	int baseline = 0, lineno = 0, ret = 0;
 
-	/* Adjust address with bias */
-	addr += dbg->bias;
-
 	/* Find cu die */
-	if (!dwarf_addrdie(dbg->dbg, (Dwarf_Addr)addr - dbg->bias, &cudie)) {
+	if (!dwarf_addrdie(dbg->dbg, (Dwarf_Addr)addr, &cudie)) {
 		pr_warning("Failed to find debug information for address %lx\n",
 			   addr);
 		ret = -EINVAL;
-- 
1.9.3


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

* [PATCH 17/20] perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (15 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 16/20] perf probe: Remove bias offset to find probe point by address Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 18/20] Revert "perf: Remove the extra validity check on nr_pages" Arnaldo Carvalho de Melo
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Adrian Hunter, H. Peter Anvin, Stephane Eranian,
	Thomas Gleixner, linux-tip-commits, Arnaldo Carvalho de Melo

From: Adrian Hunter <adrian.hunter@intel.com>

Feature tests are compiled but not executed, however it might avoid a
future uninitialized variable warning, so initialize the cpu set.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-tip-commits@vger.kernel.org
Link: http://lkml.kernel.org/r/54F41849.1010906@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
index 2b81b72eca23..fdada5e8d454 100644
--- a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
+++ b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c
@@ -1,5 +1,6 @@
 #include <stdint.h>
 #include <pthread.h>
+#include <sched.h>
 
 int main(void)
 {
@@ -8,7 +9,8 @@ int main(void)
 	cpu_set_t cs;
 
 	pthread_attr_init(&thread_attr);
-	/* don't care abt exact args, just the API itself in libpthread */
+	CPU_ZERO(&cs);
+
 	ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs);
 
 	return ret;
-- 
1.9.3


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

* [PATCH 18/20] Revert "perf: Remove the extra validity check on nr_pages"
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (16 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 17/20] perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  3:26 ` [PATCH 19/20] perf tools: Reference count struct thread Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Kan Liang, Andi Kleen, Kaixu Xia, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Kan Liang <kan.liang@intel.com>

This reverts commit 74390aa55678 ("perf: Remove the extra validity check
on nr_pages")

nr_pages equals to number of pages - 1 in perf_mmap. So nr_pages = 0 is
valid.

So the nr_pages != 0 && !is_power_of_2(nr_pages) are all
needed for checking. Otherwise, for example, perf test 6 failed.

 # perf test 6
  6: x86 rdpmc test                                         :Error:
 mmap() syscall returned with (Invalid argument)
 FAILED!

Signed-off-by: Kan Liang <kan.liang@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Kaixu Xia <xiakaixu@huawei.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1425280466-7830-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index af924bc38121..8bb20cc39a92 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4446,7 +4446,7 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma)
 	 * If we have rb pages ensure they're a power-of-two number, so we
 	 * can do bitmasks instead of modulo.
 	 */
-	if (!is_power_of_2(nr_pages))
+	if (nr_pages != 0 && !is_power_of_2(nr_pages))
 		return -EINVAL;
 
 	if (vma_size != PAGE_SIZE * (1 + nr_pages))
-- 
1.9.3


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

* [PATCH 19/20] perf tools: Reference count struct thread
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (17 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 18/20] Revert "perf: Remove the extra validity check on nr_pages" Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03 13:42   ` Namhyung Kim
  2015-03-03  3:26 ` [PATCH 20/20] perf sched: No need to keep the session around Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  21 siblings, 1 reply; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 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, Namhyung Kim, Stephane Eranian

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

We need to do that to stop accumulating entries in the dead_threads
linked list, i.e. we were keeping references to threads in struct hists
that continue to exist even after a thread exited and was removed from
the machine threads rbtree.

We still keep the dead_threads list, but just for debugging, allowing us
to iterate at any given point over the threads that still are referenced
by things like struct hist_entry.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-3ejvfyed0r7ue61dkurzjux4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c     |  2 +-
 tools/perf/builtin-trace.c     |  7 ++++++-
 tools/perf/ui/browsers/hists.c |  6 +++---
 tools/perf/util/build-id.c     |  5 +++--
 tools/perf/util/hist.c         |  2 ++
 tools/perf/util/hist.h         |  2 +-
 tools/perf/util/machine.c      | 44 ++++++++++++++++++++++--------------------
 tools/perf/util/machine.h      |  1 -
 tools/perf/util/session.c      |  6 ------
 tools/perf/util/thread.c       | 14 ++++++++++++++
 tools/perf/util/thread.h       | 13 +++++++++++++
 11 files changed, 66 insertions(+), 36 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 7ce296618717..e00e2eaf89da 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -831,7 +831,7 @@ static int thread_atoms_insert(struct perf_sched *sched, struct thread *thread)
 		return -1;
 	}
 
-	atoms->thread = thread;
+	atoms->thread = thread__get(thread);
 	INIT_LIST_HEAD(&atoms->work_list);
 	__thread_latency_insert(&sched->atom_root, atoms, &sched->cmp_pid);
 	return 0;
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index d95a8f4d988c..211614fba217 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1741,7 +1741,10 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel,
 	} else
 		ttrace->entry_pending = true;
 
-	trace->current = thread;
+	if (trace->current != thread) {
+		thread__put(trace->current);
+		trace->current = thread__get(thread);
+	}
 
 	return 0;
 }
@@ -2274,6 +2277,8 @@ next_event:
 	}
 
 out_disable:
+	thread__zput(trace->current);
+
 	perf_evlist__disable(evlist);
 
 	if (!err) {
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 788506eef567..ad312d91caed 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1467,7 +1467,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
 		perf_hpp__set_user_width(symbol_conf.col_width_list_str);
 
 	while (1) {
-		const struct thread *thread = NULL;
+		struct thread *thread = NULL;
 		const struct dso *dso = NULL;
 		int choice = 0,
 		    annotate = -2, zoom_dso = -2, zoom_thread = -2,
@@ -1754,13 +1754,13 @@ zoom_thread:
 				pstack__remove(fstack, &browser->hists->thread_filter);
 zoom_out_thread:
 				ui_helpline__pop();
-				browser->hists->thread_filter = NULL;
+				thread__zput(browser->hists->thread_filter);
 				perf_hpp__set_elide(HISTC_THREAD, false);
 			} else {
 				ui_helpline__fpush("To zoom out press <- or -> + \"Zoom out of %s(%d) thread\"",
 						   thread->comm_set ? thread__comm_str(thread) : "",
 						   thread->tid);
-				browser->hists->thread_filter = thread;
+				browser->hists->thread_filter = thread__get(thread);
 				perf_hpp__set_elide(HISTC_THREAD, false);
 				pstack__push(fstack, &browser->hists->thread_filter);
 			}
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index ffdc338df925..a19674666b4e 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -61,8 +61,9 @@ static int perf_event__exit_del_thread(struct perf_tool *tool __maybe_unused,
 
 	if (thread) {
 		rb_erase(&thread->rb_node, &machine->threads);
-		machine->last_match = NULL;
-		thread__delete(thread);
+		if (machine->last_match == thread)
+			thread__zput(machine->last_match);
+		thread__put(thread);
 	}
 
 	return 0;
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 70b48a65064c..95f5ab707b74 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -355,6 +355,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template,
 			callchain_init(he->callchain);
 
 		INIT_LIST_HEAD(&he->pairs.node);
+		thread__get(he->thread);
 	}
 
 	return he;
@@ -941,6 +942,7 @@ hist_entry__collapse(struct hist_entry *left, struct hist_entry *right)
 
 void hist_entry__delete(struct hist_entry *he)
 {
+	thread__zput(he->thread);
 	zfree(&he->branch_info);
 	zfree(&he->mem_info);
 	zfree(&he->stat_acc);
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 2b690d028907..e988c9fcd1bc 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -60,7 +60,7 @@ struct hists {
 	struct rb_root		entries_collapsed;
 	u64			nr_entries;
 	u64			nr_non_filtered_entries;
-	const struct thread	*thread_filter;
+	struct thread		*thread_filter;
 	const struct dso	*dso_filter;
 	const char		*uid_filter_str;
 	const char		*symbol_filter_str;
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 9e0f60a7e7b3..24f8c978cfd4 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -14,6 +14,8 @@
 #include "unwind.h"
 #include "linux/hash.h"
 
+static void machine__remove_thread(struct machine *machine, struct thread *th);
+
 static void dsos__init(struct dsos *dsos)
 {
 	INIT_LIST_HEAD(&dsos->head);
@@ -89,16 +91,6 @@ static void dsos__delete(struct dsos *dsos)
 	}
 }
 
-void machine__delete_dead_threads(struct machine *machine)
-{
-	struct thread *n, *t;
-
-	list_for_each_entry_safe(t, n, &machine->dead_threads, node) {
-		list_del(&t->node);
-		thread__delete(t);
-	}
-}
-
 void machine__delete_threads(struct machine *machine)
 {
 	struct rb_node *nd = rb_first(&machine->threads);
@@ -106,9 +98,8 @@ void machine__delete_threads(struct machine *machine)
 	while (nd) {
 		struct thread *t = rb_entry(nd, struct thread, rb_node);
 
-		rb_erase(&t->rb_node, &machine->threads);
 		nd = rb_next(nd);
-		thread__delete(t);
+		machine__remove_thread(machine, t);
 	}
 }
 
@@ -361,9 +352,13 @@ static struct thread *__machine__findnew_thread(struct machine *machine,
 	 * the full rbtree:
 	 */
 	th = machine->last_match;
-	if (th && th->tid == tid) {
-		machine__update_thread_pid(machine, th, pid);
-		return th;
+	if (th != NULL) {
+		if (th->tid == tid) {
+			machine__update_thread_pid(machine, th, pid);
+			return th;
+		}
+
+		thread__zput(machine->last_match);
 	}
 
 	while (*p != NULL) {
@@ -371,7 +366,7 @@ static struct thread *__machine__findnew_thread(struct machine *machine,
 		th = rb_entry(parent, struct thread, rb_node);
 
 		if (th->tid == tid) {
-			machine->last_match = th;
+			machine->last_match = thread__get(th);
 			machine__update_thread_pid(machine, th, pid);
 			return th;
 		}
@@ -403,8 +398,11 @@ static struct thread *__machine__findnew_thread(struct machine *machine,
 			thread__delete(th);
 			return NULL;
 		}
-
-		machine->last_match = th;
+		/*
+		 * It is now in the rbtree, get a ref
+		 */
+		thread__get(th);
+		machine->last_match = thread__get(th);
 	}
 
 	return th;
@@ -1238,13 +1236,17 @@ out_problem:
 
 static void machine__remove_thread(struct machine *machine, struct thread *th)
 {
-	machine->last_match = NULL;
+	if (machine->last_match == th)
+		thread__zput(machine->last_match);
+
 	rb_erase(&th->rb_node, &machine->threads);
 	/*
-	 * We may have references to this thread, for instance in some hist_entry
-	 * instances, so just move them to a separate list.
+	 * Move it first to the dead_threads list, then drop the reference,
+	 * if this is the last reference, then the thread__delete destructor
+	 * will be called and we will remove it from the dead_threads list.
 	 */
 	list_add_tail(&th->node, &machine->dead_threads);
+	thread__put(th);
 }
 
 int machine__process_fork_event(struct machine *machine, union perf_event *event,
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index e8b7779a0a3f..e2faf3b47e7b 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -118,7 +118,6 @@ void machines__set_comm_exec(struct machines *machines, bool comm_exec);
 struct machine *machine__new_host(void);
 int machine__init(struct machine *machine, const char *root_dir, pid_t pid);
 void machine__exit(struct machine *machine);
-void machine__delete_dead_threads(struct machine *machine);
 void machine__delete_threads(struct machine *machine);
 void machine__delete(struct machine *machine);
 
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index e4f166981ff0..ed4e5cf2bd9d 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -138,11 +138,6 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
 	return NULL;
 }
 
-static void perf_session__delete_dead_threads(struct perf_session *session)
-{
-	machine__delete_dead_threads(&session->machines.host);
-}
-
 static void perf_session__delete_threads(struct perf_session *session)
 {
 	machine__delete_threads(&session->machines.host);
@@ -167,7 +162,6 @@ static void perf_session_env__delete(struct perf_session_env *env)
 void perf_session__delete(struct perf_session *session)
 {
 	perf_session__destroy_kernel_maps(session);
-	perf_session__delete_dead_threads(session);
 	perf_session__delete_threads(session);
 	perf_session_env__delete(&session->header.env);
 	machines__exit(&session->machines);
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index 9ebc8b1f9be5..a5dbba95107f 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -82,6 +82,20 @@ void thread__delete(struct thread *thread)
 	free(thread);
 }
 
+struct thread *thread__get(struct thread *thread)
+{
+	++thread->refcnt;
+	return thread;
+}
+
+void thread__put(struct thread *thread)
+{
+	if (thread && --thread->refcnt == 0) {
+		list_del_init(&thread->node);
+		thread__delete(thread);
+	}
+}
+
 struct comm *thread__comm(const struct thread *thread)
 {
 	if (list_empty(&thread->comm_list))
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 160fd066a7d1..783b6688d2f7 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -20,6 +20,7 @@ struct thread {
 	pid_t			tid;
 	pid_t			ppid;
 	int			cpu;
+	int			refcnt;
 	char			shortname[3];
 	bool			comm_set;
 	bool			dead; /* if set thread has exited */
@@ -37,6 +38,18 @@ struct comm;
 struct thread *thread__new(pid_t pid, pid_t tid);
 int thread__init_map_groups(struct thread *thread, struct machine *machine);
 void thread__delete(struct thread *thread);
+
+struct thread *thread__get(struct thread *thread);
+void thread__put(struct thread *thread);
+
+static inline void __thread__zput(struct thread **thread)
+{
+	thread__put(*thread);
+	*thread = NULL;
+}
+
+#define thread__zput(thread) __thread__zput(&thread)
+
 static inline void thread__exited(struct thread *thread)
 {
 	thread->dead = true;
-- 
1.9.3


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

* [PATCH 20/20] perf sched: No need to keep the session around
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (18 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 19/20] perf tools: Reference count struct thread Arnaldo Carvalho de Melo
@ 2015-03-03  3:26 ` Arnaldo Carvalho de Melo
  2015-03-03  6:20 ` [GIT PULL 00/20] perf/core improvements and fixes Ingo Molnar
  2015-03-10 10:03 ` Ingo Molnar
  21 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03  3:26 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, Namhyung Kim, Stephane Eranian

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

We were keeping the session around just because we kept pointers to
struct thread instances, but now we reference count them, so no need
for deferring the perf_session__delete call to after we traverse the
work_list entries.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9agtck6jdr3rebdp39z1lo0e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-sched.c | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index e00e2eaf89da..a3ebf1d3c29d 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1439,8 +1439,7 @@ static int perf_sched__process_tracepoint_sample(struct perf_tool *tool __maybe_
 	return err;
 }
 
-static int perf_sched__read_events(struct perf_sched *sched,
-				   struct perf_session **psession)
+static int perf_sched__read_events(struct perf_sched *sched)
 {
 	const struct perf_evsel_str_handler handlers[] = {
 		{ "sched:sched_switch",	      process_sched_switch_event, },
@@ -1454,6 +1453,7 @@ static int perf_sched__read_events(struct perf_sched *sched,
 		.path = input_name,
 		.mode = PERF_DATA_MODE_READ,
 	};
+	int rc = -1;
 
 	session = perf_session__new(&file, false, &sched->tool);
 	if (session == NULL) {
@@ -1478,16 +1478,10 @@ static int perf_sched__read_events(struct perf_sched *sched,
 		sched->nr_lost_chunks = session->evlist->stats.nr_events[PERF_RECORD_LOST];
 	}
 
-	if (psession)
-		*psession = session;
-	else
-		perf_session__delete(session);
-
-	return 0;
-
+	rc = 0;
 out_delete:
 	perf_session__delete(session);
-	return -1;
+	return rc;
 }
 
 static void print_bad_events(struct perf_sched *sched)
@@ -1515,12 +1509,10 @@ static void print_bad_events(struct perf_sched *sched)
 static int perf_sched__lat(struct perf_sched *sched)
 {
 	struct rb_node *next;
-	struct perf_session *session;
 
 	setup_pager();
 
-	/* save session -- references to threads are held in work_list */
-	if (perf_sched__read_events(sched, &session))
+	if (perf_sched__read_events(sched))
 		return -1;
 
 	perf_sched__sort_lat(sched);
@@ -1537,6 +1529,7 @@ static int perf_sched__lat(struct perf_sched *sched)
 		work_list = rb_entry(next, struct work_atoms, node);
 		output_lat_thread(sched, work_list);
 		next = rb_next(next);
+		thread__zput(work_list->thread);
 	}
 
 	printf(" -----------------------------------------------------------------------------------------------------------------\n");
@@ -1548,7 +1541,6 @@ static int perf_sched__lat(struct perf_sched *sched)
 	print_bad_events(sched);
 	printf("\n");
 
-	perf_session__delete(session);
 	return 0;
 }
 
@@ -1557,7 +1549,7 @@ static int perf_sched__map(struct perf_sched *sched)
 	sched->max_cpu = sysconf(_SC_NPROCESSORS_CONF);
 
 	setup_pager();
-	if (perf_sched__read_events(sched, NULL))
+	if (perf_sched__read_events(sched))
 		return -1;
 	print_bad_events(sched);
 	return 0;
@@ -1572,7 +1564,7 @@ static int perf_sched__replay(struct perf_sched *sched)
 
 	test_calibrations(sched);
 
-	if (perf_sched__read_events(sched, NULL))
+	if (perf_sched__read_events(sched))
 		return -1;
 
 	printf("nr_run_events:        %ld\n", sched->nr_run_events);
-- 
1.9.3


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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (19 preceding siblings ...)
  2015-03-03  3:26 ` [PATCH 20/20] perf sched: No need to keep the session around Arnaldo Carvalho de Melo
@ 2015-03-03  6:20 ` Ingo Molnar
  2015-03-10 10:03 ` Ingo Molnar
  21 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2015-03-03  6:20 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	David Ahern, Don Zickus, Frederic Weisbecker, He Kuang,
	H . Peter Anvin, Jiri Olsa, Kaixu Xia, Kan Liang,
	Masami Hiramatsu, Namhyung Kim, Naohiro Aota, Peter Zijlstra,
	Stephane Eranian, Suzuki K . Poulose, Thomas Gleixner,
	Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	This one has the thread reference counting, that I tested using 'perf probe':
> 
>   perf probe -x ~/bin/perf 'thread__delete:4 thread refcnt=thread->refcnt tid=thread->tid'
>   perf probe -x ~/bin/perf 'thread__get:1 thread refcnt=thread->refcnt tid=thread->tid'
>   perf probe -x ~/bin/perf 'thread__put:6 thread refcnt=thread->refcnt tid=thread->tid'
>   perf record -o thread_refcnt.data -g -e probe_perf:thread__put,probe_perf:thread__get_1,probe_perf:thread__delete perf top
> 
> 	with that I checked and in the end the refcount reaches zero and
> thread__delete is called, as expected, using 'perf script', looking at the
> callchains, etc, did the same for 'perf sched lat' and 'trace' also seems to
> work.
> 
> 	David, Namhyung, please holler if you find something fishy with this
> thread refcnt stuff, as it is something that is related to previous/current
> work by you guys,
> 
> 	Ah, I also merged perf/urgent so that it is buildable in more systems.o
> 
> 	There is also the revert for that is_power_of_2 "simplification" in perf_mmap,
> that hasn't made it to perf/urgent nor upstream, its something only in perf/core, sorry
> about that one, should have caught that :-\
> 
> 	Please consider pulling,
> 
> - Arnaldo
> The following changes since commit 33be4ef116511f1079c4c3bf4b5547faf7439301:
> 
>   Merge 'tip/perf/urgent' into perf/core to pick fixes (2015-03-02 11:45:49 -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 ae536acfacb65a4a9858c32b12361e09f84f4157:
> 
>   perf sched: No need to keep the session around (2015-03-03 00:17:12 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Warn if given uprobe event accesses memory on older kernel (Masami Hiramatsu)
> 
> - 'perf record' Documentation fixes (Namhyung Kim)
> 
> - Report unsupported events properly in 'perf stat' (Suzuki K. Poulose)
> 
> Infrastructure:
> 
> - Avoid FORK after COMM when synthesizing records for pre-existing threads (Arnaldo Carvalho de Melo)
> 
> - Reference count struct thread (Arnaldo Carvalho de Melo)
> 
> - No need to keep the session around in 'perf sched', thread refcounting removes that need (Arnaldo Carvalho de Melo)
> 
> - Initialize cpu set in pthread_attr_setaffinity_np feature test (Adrian Hunter)
> 
> - Only include tsc file for x86 (David Ahern)
> 
> - Compare JOBS to 0 after grep (David Ahern)
> 
> - Improve feature detection messages (Ingo Molnar)
> 
> - Revert "perf: Remove the extra validity check on nr_pages" (Kan Liang)
> 
> - Remove bias offset to find probe point by address (Masami Hiramatsu)
> 
> - Fix build error on ARCH=i386/x86_64/sparc64 )Namhyung Kim)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test
> 
> Arnaldo Carvalho de Melo (3):
>       perf tools: Fix FORK after COMM when synthesizing records for pre-existing threads
>       perf tools: Reference count struct thread
>       perf sched: No need to keep the session around
> 
> David Ahern (2):
>       perf tools: Only include tsc file for x86
>       perf tools: Compare JOBS to 0 after grep
> 
> Ingo Molnar (7):
>       perf tools: Add PERF-FEATURES to the .gitignore file
>       perf tools: Remove annoying extra message from the features build
>       perf tools: Improve Python feature detection messages
>       perf tools: Improve libperl detection message
>       perf tools: Improve libbfd detection message
>       perf tools: Improve feature test debuggability
>       perf tools: Improve 'libbabel' feature check failure message
> 
> Kan Liang (1):
>       Revert "perf: Remove the extra validity check on nr_pages"
> 
> Masami Hiramatsu (2):
>       perf probe: Warn if given uprobe event accesses memory on older kernel
>       perf probe: Remove bias offset to find probe point by address
> 
> Namhyung Kim (3):
>       perf tools: Fix build error on ARCH=i386/x86_64/sparc64
>       perf record: Get rid of -l option from Documentation
>       perf record: Document --group option
> 
> Suzuki K. Poulose (1):
>       perf stat: Report unsupported events properly
> 
>  kernel/events/core.c                               |  2 +-
>  tools/perf/.gitignore                              |  1 +
>  tools/perf/Documentation/perf-record.txt           | 12 ++++--
>  tools/perf/Makefile                                |  2 +-
>  tools/perf/builtin-sched.c                         | 26 +++++--------
>  tools/perf/builtin-stat.c                          |  5 ++-
>  tools/perf/builtin-trace.c                         |  7 +++-
>  tools/perf/config/Makefile                         | 17 ++++-----
>  tools/perf/config/Makefile.arch                    | 27 +++----------
>  tools/perf/config/feature-checks/Makefile          | 16 ++++----
>  .../test-pthread-attr-setaffinity-np.c             |  4 +-
>  tools/perf/config/utilities.mak                    |  3 +-
>  tools/perf/ui/browsers/hists.c                     |  6 +--
>  tools/perf/util/Build                              |  2 +-
>  tools/perf/util/build-id.c                         |  5 ++-
>  tools/perf/util/event.c                            | 34 ++++++++++++-----
>  tools/perf/util/hist.c                             |  2 +
>  tools/perf/util/hist.h                             |  2 +-
>  tools/perf/util/machine.c                          | 44 +++++++++++-----------
>  tools/perf/util/machine.h                          |  1 -
>  tools/perf/util/probe-event.c                      | 23 +++++++++++
>  tools/perf/util/probe-finder.c                     |  5 +--
>  tools/perf/util/session.c                          |  6 ---
>  tools/perf/util/thread.c                           | 14 +++++++
>  tools/perf/util/thread.h                           | 13 +++++++
>  25 files changed, 164 insertions(+), 115 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [PATCH 19/20] perf tools: Reference count struct thread
  2015-03-03  3:26 ` [PATCH 19/20] perf tools: Reference count struct thread Arnaldo Carvalho de Melo
@ 2015-03-03 13:42   ` Namhyung Kim
  2015-03-03 13:57     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 48+ messages in thread
From: Namhyung Kim @ 2015-03-03 13:42 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo,
	Adrian Hunter, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, Jiri Olsa, Stephane Eranian

Hi Arnaldo,

On Tue, Mar 03, 2015 at 12:26:08AM -0300, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> We need to do that to stop accumulating entries in the dead_threads
> linked list, i.e. we were keeping references to threads in struct hists
> that continue to exist even after a thread exited and was removed from
> the machine threads rbtree.
> 
> We still keep the dead_threads list, but just for debugging, allowing us
> to iterate at any given point over the threads that still are referenced
> by things like struct hist_entry.

[SNIP]
> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> index 70b48a65064c..95f5ab707b74 100644
> --- a/tools/perf/util/hist.c
> +++ b/tools/perf/util/hist.c
> @@ -355,6 +355,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template,
>  			callchain_init(he->callchain);
>  
>  		INIT_LIST_HEAD(&he->pairs.node);
> +		thread__get(he->thread);
>  	}
>  
>  	return he;
> @@ -941,6 +942,7 @@ hist_entry__collapse(struct hist_entry *left, struct hist_entry *right)
>  
>  void hist_entry__delete(struct hist_entry *he)
>  {
> +	thread__zput(he->thread);
>  	zfree(&he->branch_info);
>  	zfree(&he->mem_info);
>  	zfree(&he->stat_acc);

[SNIP]
> diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
> index 9ebc8b1f9be5..a5dbba95107f 100644
> --- a/tools/perf/util/thread.c
> +++ b/tools/perf/util/thread.c
> @@ -82,6 +82,20 @@ void thread__delete(struct thread *thread)
>  	free(thread);
>  }
>  
> +struct thread *thread__get(struct thread *thread)
> +{
> +	++thread->refcnt;
> +	return thread;
> +}
> +
> +void thread__put(struct thread *thread)
> +{
> +	if (thread && --thread->refcnt == 0) {
> +		list_del_init(&thread->node);
> +		thread__delete(thread);
> +	}
> +}

I think we need to protect refcnt from concurrent accesses from
multiple threads.  Not to mention my multi-thread work, perf top
already uses two threads.

For perf top case, hist_entry__new() will be called from main thread
and hist_entry__delete() might be called from display thread.

Thanks,
Namhyung


> +
>  struct comm *thread__comm(const struct thread *thread)
>  {
>  	if (list_empty(&thread->comm_list))
> diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
> index 160fd066a7d1..783b6688d2f7 100644
> --- a/tools/perf/util/thread.h
> +++ b/tools/perf/util/thread.h
> @@ -20,6 +20,7 @@ struct thread {
>  	pid_t			tid;
>  	pid_t			ppid;
>  	int			cpu;
> +	int			refcnt;
>  	char			shortname[3];
>  	bool			comm_set;
>  	bool			dead; /* if set thread has exited */
> @@ -37,6 +38,18 @@ struct comm;
>  struct thread *thread__new(pid_t pid, pid_t tid);
>  int thread__init_map_groups(struct thread *thread, struct machine *machine);
>  void thread__delete(struct thread *thread);
> +
> +struct thread *thread__get(struct thread *thread);
> +void thread__put(struct thread *thread);
> +
> +static inline void __thread__zput(struct thread **thread)
> +{
> +	thread__put(*thread);
> +	*thread = NULL;
> +}
> +
> +#define thread__zput(thread) __thread__zput(&thread)
> +
>  static inline void thread__exited(struct thread *thread)
>  {
>  	thread->dead = true;
> -- 
> 1.9.3
> 

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

* Re: [PATCH 19/20] perf tools: Reference count struct thread
  2015-03-03 13:42   ` Namhyung Kim
@ 2015-03-03 13:57     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-03 13:57 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Ingo Molnar, linux-kernel, Adrian Hunter, Borislav Petkov,
	David Ahern, Don Zickus, Frederic Weisbecker, Jiri Olsa,
	Stephane Eranian

Em Tue, Mar 03, 2015 at 10:42:14PM +0900, Namhyung Kim escreveu:
> On Tue, Mar 03, 2015 at 12:26:08AM -0300, Arnaldo Carvalho de Melo wrote:
> > +++ b/tools/perf/util/thread.c
> > @@ -82,6 +82,20 @@ void thread__delete(struct thread *thread)

> > +struct thread *thread__get(struct thread *thread)
> > +{
> > +	++thread->refcnt;
> > +	return thread;
> > +}

> > +void thread__put(struct thread *thread)
> > +{
> > +	if (thread && --thread->refcnt == 0) {
> > +		list_del_init(&thread->node);
> > +		thread__delete(thread);
> > +	}
> > +}
 
> I think we need to protect refcnt from concurrent accesses from
> multiple threads.  Not to mention my multi-thread work, perf top
> already uses two threads.

Sure
 
> For perf top case, hist_entry__new() will be called from main thread
> and hist_entry__delete() might be called from display thread.

Reference counting is a step in that direction, as to if the integer
inc/dec is enough or is already surrounded by existing serialization
needs to be checked.

- Arnaldo

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (20 preceding siblings ...)
  2015-03-03  6:20 ` [GIT PULL 00/20] perf/core improvements and fixes Ingo Molnar
@ 2015-03-10 10:03 ` Ingo Molnar
  2015-03-10 14:03   ` Arnaldo Carvalho de Melo
  2015-03-23 22:18   ` [RFC] propagating symtab load errors. was: " Arnaldo Carvalho de Melo
  21 siblings, 2 replies; 48+ messages in thread
From: Ingo Molnar @ 2015-03-10 10:03 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	David Ahern, Don Zickus, Frederic Weisbecker, He Kuang,
	H . Peter Anvin, Jiri Olsa, Kaixu Xia, Kan Liang,
	Masami Hiramatsu, Namhyung Kim, Naohiro Aota, Peter Zijlstra,
	Stephane Eranian, Suzuki K . Poulose, Thomas Gleixner,
	Arnaldo Carvalho de Melo


So I got this error today:


                                                                  ┌─Warning:───────────────────────────┐
                                                                  │The vmlinux file can't be used.     │
                                                                  │Kernel samples will not be resolved.│
                                                                  │                                    │
                                                                  │                                    │
                                                                  │Press any key...                    │
                                                                  └────────────────────────────────────┘

... and sadly perf is being passive-aggressive again: being negative 
but refusing to say why! :-)

Is there a way to figure out why it did not like the vmlinux?

Thanks,

	Ingo

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2015-03-10 10:03 ` Ingo Molnar
@ 2015-03-10 14:03   ` Arnaldo Carvalho de Melo
  2015-03-10 14:37     ` Ingo Molnar
  2015-03-23 22:18   ` [RFC] propagating symtab load errors. was: " Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-10 14:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, He Kuang, H . Peter Anvin, Jiri Olsa,
	Kaixu Xia, Kan Liang, Masami Hiramatsu, Namhyung Kim,
	Naohiro Aota, Peter Zijlstra, Stephane Eranian,
	Suzuki K . Poulose, Thomas Gleixner

Em Tue, Mar 10, 2015 at 11:03:31AM +0100, Ingo Molnar escreveu:
> So I got this error today:
> 
>   ┌─Warning:───────────────────────────┐
>   │The vmlinux file can't be used.     │
>   │Kernel samples will not be resolved.│
>   │                                    │
>   │                                    │
>   │Press any key...                    │
>   └────────────────────────────────────┘
> 
> ... and sadly perf is being passive-aggressive again: being negative 
> but refusing to say why! :-)

> Is there a way to figure out why it did not like the vmlinux?

I'll check and improve the message.

But you must've noticed that perf is going to a therapist, aka improving
error messages... ;-)

- Arnaldo

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2015-03-10 14:03   ` Arnaldo Carvalho de Melo
@ 2015-03-10 14:37     ` Ingo Molnar
  0 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2015-03-10 14:37 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Don Zickus,
	Frederic Weisbecker, He Kuang, H . Peter Anvin, Jiri Olsa,
	Kaixu Xia, Kan Liang, Masami Hiramatsu, Namhyung Kim,
	Naohiro Aota, Peter Zijlstra, Stephane Eranian,
	Suzuki K . Poulose, Thomas Gleixner


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

> Em Tue, Mar 10, 2015 at 11:03:31AM +0100, Ingo Molnar escreveu:
> > So I got this error today:
> > 
> >   ┌─Warning:───────────────────────────┐
> >   │The vmlinux file can't be used.     │
> >   │Kernel samples will not be resolved.│
> >   │                                    │
> >   │                                    │
> >   │Press any key...                    │
> >   └────────────────────────────────────┘
> > 
> > ... and sadly perf is being passive-aggressive again: being negative 
> > but refusing to say why! :-)
> 
> > Is there a way to figure out why it did not like the vmlinux?
> 
> I'll check and improve the message.
> 
> But you must've noticed that perf is going to a therapist, aka 
> improving error messages... ;-)

Absolutely! ;-)

Also, on the positive side, today I was able to build and run perf on 
ancient user-space: a Fedora Core 6 installation, with very few hacks 
(see the attached hacks).

The HAVE_NEW_FLAX hack results in a non-working -e option.

Thanks,

	Ingo

Index: tip/tools/perf/util/parse-events.c
===================================================================
--- tip.orig/tools/perf/util/parse-events.c
+++ tip/tools/perf/util/parse-events.c
@@ -968,6 +968,13 @@ perf_pmu__parse_check(const char *name)
 	return r ? r->type : PMU_EVENT_SYMBOL_ERR;
 }
 
+#ifndef HAVE_NEW_FLEX
+static int parse_events_lex_init_extra(int start_token __maybe_unused, void **scanner __maybe_unused)
+{
+	return -1;
+}
+#endif
+
 static int parse_events__scanner(const char *str, void *data, int start_token)
 {
 	YY_BUFFER_STATE buffer;
Index: tip/tools/perf/util/symbol-elf.c
===================================================================
--- tip.orig/tools/perf/util/symbol-elf.c
+++ tip/tools/perf/util/symbol-elf.c
@@ -53,6 +53,13 @@ static int elf_getphdrnum(Elf *elf, size
 }
 #endif
 
+#ifndef HAVE_ELF_GETPHDRNUM
+static int elf_getphdrnum (Elf *__elf __maybe_unused, size_t *__dst __maybe_unused)
+{
+	return 1;
+}
+#endif
+
 #ifndef NT_GNU_BUILD_ID
 #define NT_GNU_BUILD_ID 3
 #endif

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

* [RFC] propagating symtab load errors. was: Re: [GIT PULL 00/20] perf/core improvements and fixes
  2015-03-10 10:03 ` Ingo Molnar
  2015-03-10 14:03   ` Arnaldo Carvalho de Melo
@ 2015-03-23 22:18   ` Arnaldo Carvalho de Melo
  2015-03-24 13:16     ` Jiri Olsa
  1 sibling, 1 reply; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-23 22:18 UTC (permalink / raw)
  To: Ingo Molnar, Jiri Olsa, Namhyung Kim
  Cc: linux-kernel, Adrian Hunter, Andi Kleen, Borislav Petkov,
	David Ahern, Don Zickus, Frederic Weisbecker, He Kuang,
	H . Peter Anvin, Kaixu Xia, Kan Liang, Masami Hiramatsu,
	Naohiro Aota, Peter Zijlstra, Stephane Eranian,
	Suzuki K . Poulose, Thomas Gleixner

Em Tue, Mar 10, 2015 at 11:03:31AM +0100, Ingo Molnar escreveu:
> So I got this error today:
> 
>                     ┌─Warning:───────────────────────────┐
>                     │The vmlinux file can't be used.     │
>                     │Kernel samples will not be resolved.│
>                     │                                    │
>                     │                                    │
>                     │Press any key...                    │
>                     └────────────────────────────────────┘
> ... and sadly perf is being passive-aggressive again: being negative 
> but refusing to say why! :-)
> 
> Is there a way to figure out why it did not like the vmlinux?

So, we need some infrastructure for that, i.e. a strerror like routine
like we have for other classes, because there are lots of things that
can go wrong while loading a file: ELF error, decompression stuff, you
name it, so, with the patch below it ends up as:


# perf top --vmlinux /dev/null

           ┌─Warning:───────────────────────────────────────────┐
           │The /tmp/passwd file can't be used: Invalid ELF file│
           │Kernel samples will not be resolved.                │
           │                                                    │
           │                                                    │
           │Press any key...                                    │
           └────────────────────────────────────────────────────┘


Basically save the errno, that may be an elf_errno (in this case I just came up
with a DSO_LOAD_ERRNO__INVALID_ELF), an errno or some other error that needs
propagating.

Just a heads up, I'll polish it a bit more before submitting, sounds OK?

Jiri, Namhyung, this would go down to the decompression code, etc.

Right now some of this can be obtained via the pr_debug calls, but that is too
ä passive aggressive, and we don't want to do the error report syncronously,
this is up for the tools/UI used, so saving it and providing a strerror routine
looks sane, right?

- Arnaldo

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 5fb8723c7128..1cb3436276d1 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -757,8 +757,10 @@ static void perf_event__process_sample(struct perf_tool *tool,
 		    al.map == machine->vmlinux_maps[MAP__FUNCTION] &&
 		    RB_EMPTY_ROOT(&al.map->dso->symbols[MAP__FUNCTION])) {
 			if (symbol_conf.vmlinux_name) {
-				ui__warning("The %s file can't be used.\n%s",
-					    symbol_conf.vmlinux_name, msg);
+				char serr[256];
+				dso__strerror_load(al.map->dso, serr, sizeof(serr));
+				ui__warning("The %s file can't be used: %s\n%s",
+					    symbol_conf.vmlinux_name, serr, msg);
 			} else {
 				ui__warning("A vmlinux file was not found.\n%s",
 					    msg);
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 0d3667f92023..4e33be8f92ba 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -1137,3 +1137,34 @@ enum dso_type dso__type(struct dso *dso, struct machine *machine)
 
 	return dso__type_fd(fd);
 }
+
+int dso__strerror_load(struct dso *dso, char *buf, size_t buflen)
+{
+	int idx, errnum = dso->load_errno;
+	/*
+	 * This must have a same ordering as the enum dso_load_errno.
+	 */
+	static const char *dso_load__error_str[] = {
+	"Internal tools/perf/ library error",
+	"Invalid ELF file",
+	"Decompression failure",
+	};
+
+	BUG_ON(buflen == 0);
+
+	if (errnum >= 0) {
+		const char *err = strerror_r(errnum, buf, buflen);
+
+		if (err != buf)
+			scnprintf(buf, buflen, "%s", err);
+
+		return 0;
+	}
+
+	if (errnum <  __DSO_LOAD_ERRNO__START || errnum >= __DSO_LOAD_ERRNO__END)
+		return -1;
+
+	idx = errnum - __DSO_LOAD_ERRNO__START;
+	scnprintf(buf, buflen, "%s", dso_load__error_str[idx]);
+	return 0;
+}
diff --git a/tools/perf/util/dso.h b/tools/perf/util/dso.h
index 88f345cc5be2..25f78bb15819 100644
--- a/tools/perf/util/dso.h
+++ b/tools/perf/util/dso.h
@@ -60,6 +60,29 @@ enum dso_type {
 	DSO__TYPE_X32BIT,
 };
 
+enum dso_load_errno {
+	DSO_LOAD_ERRNO__SUCCESS		= 0,
+
+	/*
+	 * Choose an arbitrary negative big number not to clash with standard
+	 * errno since SUS requires the errno has distinct positive values.
+	 * See 'Issue 6' in the link below.
+	 *
+	 * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
+	 */
+	__DSO_LOAD_ERRNO__START		= -10000,
+
+	DSO_LOAD_ERRNO__INTERNAL_ERROR	= __DSO_LOAD_ERRNO__START,
+
+	/* for symsrc__init() */
+	DSO_LOAD_ERRNO__INVALID_ELF,
+
+	/* for decompress_kmodule */
+	DSO_LOAD_ERRNO__DECOMPRESSION_FAILURE,
+
+	__DSO_LOAD_ERRNO__END,
+};
+
 #define DSO__SWAP(dso, type, val)			\
 ({							\
 	type ____r = val;				\
@@ -113,6 +136,7 @@ struct dso {
 	enum dso_swap_type	needs_swap;
 	enum dso_binary_type	symtab_type;
 	enum dso_binary_type	binary_type;
+	enum dso_load_errno	load_errno;
 	u8		 adjust_symbols:1;
 	u8		 has_build_id:1;
 	u8		 has_srcline:1;
@@ -294,4 +318,6 @@ void dso__free_a2l(struct dso *dso);
 
 enum dso_type dso__type(struct dso *dso, struct machine *machine);
 
+int dso__strerror_load(struct dso *dso, char *buf, size_t buflen);
+
 #endif /* __PERF_DSO */
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 78ffde9df9bf..2a464273a43b 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -595,10 +595,13 @@ static int decompress_kmodule(struct dso *dso, const char *name,
 		return -1;
 
 	fd = mkstemp(tmpbuf);
-	if (fd < 0)
+	if (fd < 0) {
+		dso->load_errno = errno;
 		goto out;
+	}
 
 	if (!decompress_to_file(m.ext, name, fd)) {
+		dso->load_errno = DSO_LOAD_ERRNO__DECOMPRESSION_FAILURE;
 		close(fd);
 		fd = -1;
 	}
@@ -635,27 +638,35 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
 	Elf *elf;
 	int fd;
 
-	if (dso__needs_decompress(dso))
+	if (dso__needs_decompress(dso)) {
 		fd = decompress_kmodule(dso, name, type);
-	else
+		if (fd < 0)
+			return -1;
+	} else {
 		fd = open(name, O_RDONLY);
-
-	if (fd < 0)
-		return -1;
+		if (fd < 0) {
+			dso->load_errno = errno;
+			return -1;
+		}
+	}
 
 	elf = elf_begin(fd, PERF_ELF_C_READ_MMAP, NULL);
 	if (elf == NULL) {
 		pr_debug("%s: cannot read %s ELF file.\n", __func__, name);
+		dso->load_errno = DSO_LOAD_ERRNO__INVALID_ELF;
 		goto out_close;
 	}
 
 	if (gelf_getehdr(elf, &ehdr) == NULL) {
+		dso->load_errno = DSO_LOAD_ERRNO__INVALID_ELF;
 		pr_debug("%s: cannot get elf header.\n", __func__);
 		goto out_elf_end;
 	}
 
-	if (dso__swap_init(dso, ehdr.e_ident[EI_DATA]))
+	if (dso__swap_init(dso, ehdr.e_ident[EI_DATA])) {
+		dso->load_errno = DSO_LOAD_ERRNO__INTERNAL_ERROR;
 		goto out_elf_end;
+	}
 
 	/* Always reject images with a mismatched build-id: */
 	if (dso->has_build_id) {
@@ -701,8 +712,10 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
 	}
 
 	ss->name   = strdup(name);
-	if (!ss->name)
+	if (!ss->name) {
+		dso->load_errno = errno;
 		goto out_elf_end;
+	}
 
 	ss->elf    = elf;
 	ss->fd     = fd;


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

* Re: [RFC] propagating symtab load errors. was: Re: [GIT PULL 00/20] perf/core improvements and fixes
  2015-03-23 22:18   ` [RFC] propagating symtab load errors. was: " Arnaldo Carvalho de Melo
@ 2015-03-24 13:16     ` Jiri Olsa
  2015-03-24 15:05       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 48+ messages in thread
From: Jiri Olsa @ 2015-03-24 13:16 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, Jiri Olsa, Namhyung Kim, linux-kernel,
	Adrian Hunter, Andi Kleen, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, He Kuang, H . Peter Anvin,
	Kaixu Xia, Kan Liang, Masami Hiramatsu, Naohiro Aota,
	Peter Zijlstra, Stephane Eranian, Suzuki K . Poulose,
	Thomas Gleixner

On Mon, Mar 23, 2015 at 07:18:37PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Mar 10, 2015 at 11:03:31AM +0100, Ingo Molnar escreveu:
> > So I got this error today:
> > 
> >                     ┌─Warning:───────────────────────────┐
> >                     │The vmlinux file can't be used.     │
> >                     │Kernel samples will not be resolved.│
> >                     │                                    │
> >                     │                                    │
> >                     │Press any key...                    │
> >                     └────────────────────────────────────┘
> > ... and sadly perf is being passive-aggressive again: being negative 
> > but refusing to say why! :-)
> > 
> > Is there a way to figure out why it did not like the vmlinux?
> 
> So, we need some infrastructure for that, i.e. a strerror like routine
> like we have for other classes, because there are lots of things that
> can go wrong while loading a file: ELF error, decompression stuff, you
> name it, so, with the patch below it ends up as:
> 
> 
> # perf top --vmlinux /dev/null
> 
>            ┌─Warning:───────────────────────────────────────────┐
>            │The /tmp/passwd file can't be used: Invalid ELF file│
>            │Kernel samples will not be resolved.                │
>            │                                                    │
>            │                                                    │
>            │Press any key...                                    │
>            └────────────────────────────────────────────────────┘
> 
> 
> Basically save the errno, that may be an elf_errno (in this case I just came up
> with a DSO_LOAD_ERRNO__INVALID_ELF), an errno or some other error that needs
> propagating.
> 
> Just a heads up, I'll polish it a bit more before submitting, sounds OK?
> 
> Jiri, Namhyung, this would go down to the decompression code, etc.
> 
> Right now some of this can be obtained via the pr_debug calls, but that is too
> ä passive aggressive, and we don't want to do the error report syncronously,
> this is up for the tools/UI used, so saving it and providing a strerror routine
> looks sane, right?

right, DSO_LOAD_ERRNO__DECOMPRESSION_FAILURE seems ok

jirka

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

* Re: [RFC] propagating symtab load errors. was: Re: [GIT PULL 00/20] perf/core improvements and fixes
  2015-03-24 13:16     ` Jiri Olsa
@ 2015-03-24 15:05       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-03-24 15:05 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Ingo Molnar, Jiri Olsa, Namhyung Kim, linux-kernel,
	Adrian Hunter, Andi Kleen, Borislav Petkov, David Ahern,
	Don Zickus, Frederic Weisbecker, He Kuang, H . Peter Anvin,
	Kaixu Xia, Kan Liang, Masami Hiramatsu, Naohiro Aota,
	Peter Zijlstra, Stephane Eranian, Suzuki K . Poulose,
	Thomas Gleixner

Em Tue, Mar 24, 2015 at 02:16:56PM +0100, Jiri Olsa escreveu:
> On Mon, Mar 23, 2015 at 07:18:37PM -0300, Arnaldo Carvalho de Melo wrote:
> > Right now some of this can be obtained via the pr_debug calls, but that is too
> > ä passive aggressive, and we don't want to do the error report syncronously,
> > this is up for the tools/UI used, so saving it and providing a strerror routine
> > looks sane, right?
 
> right, DSO_LOAD_ERRNO__DECOMPRESSION_FAILURE seems ok

Ok, set dso->load_errno in a few more places, introduced a couple of
build id errnos and sticked an "Acked-by: jirka" to it, thanks!

- Arnaldo

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2017-03-28  1:38 Arnaldo Carvalho de Melo
@ 2017-03-28  5:45 ` Ingo Molnar
  0 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2017-03-28  5:45 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin, Andi Kleen,
	David Ahern, Jiri Olsa, Kan Liang, Masami Hiramatsu,
	Milian Wolff, Namhyung Kim, Peter Zijlstra, Ravi Bangoria,
	Sukadev Bhattiprolu, Taeung Song, Tommi Rantala, 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 e3a6a62400520452fe39740dca90a1d0b94b8f92:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170324' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-24 19:37:40 +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.12-20170327
> 
> for you to fetch changes up to 55f77128e7652e537d6c226d5b56821cdb5c22de:
> 
>   perf utils: Readlink /proc/self/exe to find the perf binary (2017-03-27 15:37:54 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> New features:
> 
> - Handle inline functions in callchains (Jin Yao)
> 
> - Enable sorting by srcline as key (Milian Wolff)
> 
> Fixes:
> 
> - Fix no_size logic in addr_filter__resolve_kernel_syms() in the
>   auxtrace code (Adrian Hunter)
> 
> - Fix some thread refcount leaks in 'perf trace' (Arnaldo Carvalho de Melo)
> 
> - Fix divide by zero when calculating percent for an event in a group in
>   the annotate by source line code (Taeung Song)
> 
> - build-id files now aren't anymore symlinks, their parent directories
>   are, so readlink the later (Taeung Song)
> 
> - Assorted fixes for null termination problems, mostly related to
>   readlink, detected by valgrind (Tommi Rantala)
> 
> Infrastructure:
> 
> - Make vfs_getname probe point logic in 'perf trace' more robust
>   wrt length of pathname (Arnaldo Carvalho de Melo)
> 
> - Remove unused 'prefix' parameter from builtins main functions (Arnaldo Carvalho de Melo)
> 
> - Show 'perf list sdt' option in man page (Ravi Bangoria)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (1):
>       perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
> 
> Arnaldo Carvalho de Melo (4):
>       perf trace: Check for vfs_getname.pathname length
>       perf trace: Fix up error path indentation
>       perf trace: Fixup thread refcounting
>       perf tools: Remove unused 'prefix' from builtin functions
> 
> Jin Yao (5):
>       perf report: Refactor common code in srcline.c
>       perf report: Find the inline stack for a given address
>       perf report: Introduce --inline option
>       perf report: Show inline stack for stdio mode
>       perf report: Show inline stack for browser mode
> 
> Milian Wolff (1):
>       perf report: Enable sorting by srcline as key
> 
> Ravi Bangoria (1):
>       perf list sdt: Show option in man page
> 
> Taeung Song (2):
>       perf annotate: Fix a bug following symbolic link of a build-id file
>       perf annotate: Fix a bug of division by zero when calculating percent
> 
> Tommi Rantala (6):
>       perf buildid: Do not update SDT cache with null filename
>       perf buildid: Do not assume that readlink() returns a null terminated string
>       perf tests: Do not assume that readlink() returns a null terminated string
>       perf utils: use sizeof(buf) - 1 in readlink() call
>       perf utils: Null terminate buf in read_ftrace_printk()
>       perf utils: Readlink /proc/self/exe to find the perf binary
> 
>  tools/perf/Documentation/perf-list.txt   |   4 +-
>  tools/perf/Documentation/perf-report.txt |   5 +
>  tools/perf/bench/bench.h                 |  20 +--
>  tools/perf/bench/futex-hash.c            |   3 +-
>  tools/perf/bench/futex-lock-pi.c         |   3 +-
>  tools/perf/bench/futex-requeue.c         |   3 +-
>  tools/perf/bench/futex-wake-parallel.c   |   3 +-
>  tools/perf/bench/futex-wake.c            |   3 +-
>  tools/perf/bench/mem-functions.c         |   4 +-
>  tools/perf/bench/numa.c                  |   2 +-
>  tools/perf/bench/sched-messaging.c       |   3 +-
>  tools/perf/bench/sched-pipe.c            |   2 +-
>  tools/perf/builtin-annotate.c            |   2 +-
>  tools/perf/builtin-bench.c               |  12 +-
>  tools/perf/builtin-buildid-cache.c       |   3 +-
>  tools/perf/builtin-buildid-list.c        |   3 +-
>  tools/perf/builtin-c2c.c                 |   4 +-
>  tools/perf/builtin-config.c              |   2 +-
>  tools/perf/builtin-data.c                |   9 +-
>  tools/perf/builtin-diff.c                |   2 +-
>  tools/perf/builtin-evlist.c              |   2 +-
>  tools/perf/builtin-ftrace.c              |   2 +-
>  tools/perf/builtin-help.c                |   2 +-
>  tools/perf/builtin-inject.c              |   2 +-
>  tools/perf/builtin-kallsyms.c            |   2 +-
>  tools/perf/builtin-kmem.c                |   4 +-
>  tools/perf/builtin-kvm.c                 |  16 +-
>  tools/perf/builtin-list.c                |   2 +-
>  tools/perf/builtin-lock.c                |   6 +-
>  tools/perf/builtin-mem.c                 |   6 +-
>  tools/perf/builtin-probe.c               |   6 +-
>  tools/perf/builtin-record.c              |   2 +-
>  tools/perf/builtin-report.c              |   4 +-
>  tools/perf/builtin-sched.c               |   6 +-
>  tools/perf/builtin-script.c              |   4 +-
>  tools/perf/builtin-stat.c                |   2 +-
>  tools/perf/builtin-timechart.c           |   7 +-
>  tools/perf/builtin-top.c                 |   2 +-
>  tools/perf/builtin-trace.c               |  25 ++--
>  tools/perf/builtin-version.c             |   3 +-
>  tools/perf/builtin.h                     |  58 ++++----
>  tools/perf/perf.c                        |  11 +-
>  tools/perf/tests/builtin-test.c          |   2 +-
>  tools/perf/tests/sdt.c                   |   2 +-
>  tools/perf/ui/browsers/hists.c           | 181 ++++++++++++++++++++++-
>  tools/perf/ui/stdio/hist.c               |  86 ++++++++++-
>  tools/perf/util/annotate.c               |  23 ++-
>  tools/perf/util/auxtrace.c               |   4 +-
>  tools/perf/util/build-id.c               |   8 +-
>  tools/perf/util/callchain.c              |  52 ++++++-
>  tools/perf/util/callchain.h              |   3 +-
>  tools/perf/util/header.c                 |   8 +-
>  tools/perf/util/hist.c                   |   5 +
>  tools/perf/util/map.c                    |   3 +-
>  tools/perf/util/sort.c                   |  16 +-
>  tools/perf/util/sort.h                   |   1 +
>  tools/perf/util/srcline.c                | 246 +++++++++++++++++++++++++++----
>  tools/perf/util/symbol-elf.c             |   5 +
>  tools/perf/util/symbol-minimal.c         |   7 +
>  tools/perf/util/symbol.h                 |   5 +-
>  tools/perf/util/trace-event-read.c       |   4 +-
>  tools/perf/util/util.h                   |  20 ++-
>  62 files changed, 739 insertions(+), 208 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2017-03-28  1:38 Arnaldo Carvalho de Melo
  2017-03-28  5:45 ` Ingo Molnar
  0 siblings, 1 reply; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-03-28  1:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Andi Kleen, David Ahern, Jiri Olsa,
	Kan Liang, Masami Hiramatsu, Milian Wolff, Namhyung Kim,
	Peter Zijlstra, Ravi Bangoria, Sukadev Bhattiprolu, Taeung Song,
	Tommi Rantala, 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 e3a6a62400520452fe39740dca90a1d0b94b8f92:

  Merge tag 'perf-core-for-mingo-4.12-20170324' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-24 19:37:40 +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.12-20170327

for you to fetch changes up to 55f77128e7652e537d6c226d5b56821cdb5c22de:

  perf utils: Readlink /proc/self/exe to find the perf binary (2017-03-27 15:37:54 -0300)

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

New features:

- Handle inline functions in callchains (Jin Yao)

- Enable sorting by srcline as key (Milian Wolff)

Fixes:

- Fix no_size logic in addr_filter__resolve_kernel_syms() in the
  auxtrace code (Adrian Hunter)

- Fix some thread refcount leaks in 'perf trace' (Arnaldo Carvalho de Melo)

- Fix divide by zero when calculating percent for an event in a group in
  the annotate by source line code (Taeung Song)

- build-id files now aren't anymore symlinks, their parent directories
  are, so readlink the later (Taeung Song)

- Assorted fixes for null termination problems, mostly related to
  readlink, detected by valgrind (Tommi Rantala)

Infrastructure:

- Make vfs_getname probe point logic in 'perf trace' more robust
  wrt length of pathname (Arnaldo Carvalho de Melo)

- Remove unused 'prefix' parameter from builtins main functions (Arnaldo Carvalho de Melo)

- Show 'perf list sdt' option in man page (Ravi Bangoria)

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

----------------------------------------------------------------
Adrian Hunter (1):
      perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()

Arnaldo Carvalho de Melo (4):
      perf trace: Check for vfs_getname.pathname length
      perf trace: Fix up error path indentation
      perf trace: Fixup thread refcounting
      perf tools: Remove unused 'prefix' from builtin functions

Jin Yao (5):
      perf report: Refactor common code in srcline.c
      perf report: Find the inline stack for a given address
      perf report: Introduce --inline option
      perf report: Show inline stack for stdio mode
      perf report: Show inline stack for browser mode

Milian Wolff (1):
      perf report: Enable sorting by srcline as key

Ravi Bangoria (1):
      perf list sdt: Show option in man page

Taeung Song (2):
      perf annotate: Fix a bug following symbolic link of a build-id file
      perf annotate: Fix a bug of division by zero when calculating percent

Tommi Rantala (6):
      perf buildid: Do not update SDT cache with null filename
      perf buildid: Do not assume that readlink() returns a null terminated string
      perf tests: Do not assume that readlink() returns a null terminated string
      perf utils: use sizeof(buf) - 1 in readlink() call
      perf utils: Null terminate buf in read_ftrace_printk()
      perf utils: Readlink /proc/self/exe to find the perf binary

 tools/perf/Documentation/perf-list.txt   |   4 +-
 tools/perf/Documentation/perf-report.txt |   5 +
 tools/perf/bench/bench.h                 |  20 +--
 tools/perf/bench/futex-hash.c            |   3 +-
 tools/perf/bench/futex-lock-pi.c         |   3 +-
 tools/perf/bench/futex-requeue.c         |   3 +-
 tools/perf/bench/futex-wake-parallel.c   |   3 +-
 tools/perf/bench/futex-wake.c            |   3 +-
 tools/perf/bench/mem-functions.c         |   4 +-
 tools/perf/bench/numa.c                  |   2 +-
 tools/perf/bench/sched-messaging.c       |   3 +-
 tools/perf/bench/sched-pipe.c            |   2 +-
 tools/perf/builtin-annotate.c            |   2 +-
 tools/perf/builtin-bench.c               |  12 +-
 tools/perf/builtin-buildid-cache.c       |   3 +-
 tools/perf/builtin-buildid-list.c        |   3 +-
 tools/perf/builtin-c2c.c                 |   4 +-
 tools/perf/builtin-config.c              |   2 +-
 tools/perf/builtin-data.c                |   9 +-
 tools/perf/builtin-diff.c                |   2 +-
 tools/perf/builtin-evlist.c              |   2 +-
 tools/perf/builtin-ftrace.c              |   2 +-
 tools/perf/builtin-help.c                |   2 +-
 tools/perf/builtin-inject.c              |   2 +-
 tools/perf/builtin-kallsyms.c            |   2 +-
 tools/perf/builtin-kmem.c                |   4 +-
 tools/perf/builtin-kvm.c                 |  16 +-
 tools/perf/builtin-list.c                |   2 +-
 tools/perf/builtin-lock.c                |   6 +-
 tools/perf/builtin-mem.c                 |   6 +-
 tools/perf/builtin-probe.c               |   6 +-
 tools/perf/builtin-record.c              |   2 +-
 tools/perf/builtin-report.c              |   4 +-
 tools/perf/builtin-sched.c               |   6 +-
 tools/perf/builtin-script.c              |   4 +-
 tools/perf/builtin-stat.c                |   2 +-
 tools/perf/builtin-timechart.c           |   7 +-
 tools/perf/builtin-top.c                 |   2 +-
 tools/perf/builtin-trace.c               |  25 ++--
 tools/perf/builtin-version.c             |   3 +-
 tools/perf/builtin.h                     |  58 ++++----
 tools/perf/perf.c                        |  11 +-
 tools/perf/tests/builtin-test.c          |   2 +-
 tools/perf/tests/sdt.c                   |   2 +-
 tools/perf/ui/browsers/hists.c           | 181 ++++++++++++++++++++++-
 tools/perf/ui/stdio/hist.c               |  86 ++++++++++-
 tools/perf/util/annotate.c               |  23 ++-
 tools/perf/util/auxtrace.c               |   4 +-
 tools/perf/util/build-id.c               |   8 +-
 tools/perf/util/callchain.c              |  52 ++++++-
 tools/perf/util/callchain.h              |   3 +-
 tools/perf/util/header.c                 |   8 +-
 tools/perf/util/hist.c                   |   5 +
 tools/perf/util/map.c                    |   3 +-
 tools/perf/util/sort.c                   |  16 +-
 tools/perf/util/sort.h                   |   1 +
 tools/perf/util/srcline.c                | 246 +++++++++++++++++++++++++++----
 tools/perf/util/symbol-elf.c             |   5 +
 tools/perf/util/symbol-minimal.c         |   7 +
 tools/perf/util/symbol.h                 |   5 +-
 tools/perf/util/trace-event-read.c       |   4 +-
 tools/perf/util/util.h                   |  20 ++-
 62 files changed, 739 insertions(+), 208 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.
Where clang is available, it is also used to build perf with/without libelf.

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

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

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

  # dm
   1 alpine:3.4: Ok
   2 alpine:3.5: Ok
   3 alpine:edge: Ok
   4 android-ndk:r12b-arm: Ok
   5 archlinux:latest: Ok
   6 centos:5: Ok
   7 centos:6: Ok
   8 centos:7: Ok
   9 debian:7: Ok
  10 debian:8: Ok
  11 debian:9: Ok
  12 debian:experimental: Ok
  13 debian:experimental-x-arm64: Ok
  14 debian:experimental-x-mips: Ok
  15 debian:experimental-x-mips64: Ok
  16 debian:experimental-x-mipsel: Ok
  17 fedora:20: Ok
  18 fedora:21: Ok
  19 fedora:22: Ok
  20 fedora:23: Ok
  21 fedora:24: Ok
  22 fedora:24-x-ARC-uClibc: Ok
  23 fedora:25: Ok
  24 fedora:rawhide: Ok
  25 mageia:5: Ok
  26 opensuse:13.2: Ok
  27 opensuse:42.1: Ok
  28 opensuse:tumbleweed: Ok
  29 ubuntu:12.04.5: Ok
  30 ubuntu:14.04.4: Ok
  31 ubuntu:14.04.4-x-linaro-arm64: Ok
  32 ubuntu:15.10: Ok
  33 ubuntu:16.04: Ok
  34 ubuntu:16.04-x-arm: Ok
  35 ubuntu:16.04-x-arm64: Ok
  36 ubuntu:16.04-x-powerpc: Ok
  37 ubuntu:16.04-x-powerpc64: Ok
  38 ubuntu:16.04-x-s390: Ok
  39 ubuntu:16.10: Ok
  40 ubuntu:17.04: Ok
  # 
  # uname -a
  Linux jouet 4.11.0-rc2+ #5 SMP Mon Mar 20 18:12:29 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
  # This kernel lacks the fix by peterz for 'perf test tsc'
  #
  # 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                   : FAILED!
  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_clean_all_O: make clean all 
       make_util_pmu_bison_o_O: make util/pmu-bison.o 
           make_no_backtrace_O: make NO_BACKTRACE=1 
                make_install_O: make install 
            make_no_libaudit_O: make NO_LIBAUDIT=1 
         make_with_clangllvm_O: make LIBCLANGLLVM=1 
                   make_tags_O: make tags 
               make_no_slang_O: make NO_SLANG=1 
   make_install_prefix_slash_O: make install prefix=/tmp/krava/ 
                   make_pure_O: make 
         make_install_prefix_O: make install prefix=/tmp/krava 
            make_no_demangle_O: make NO_DEMANGLE=1 
                    make_doc_O: make doc 
                make_no_gtk2_O: make NO_GTK2=1 
                   make_help_O: make help 
                 make_static_O: make LDFLAGS=-static 
           make_no_libunwind_O: make NO_LIBUNWIND=1 
             make_util_map_o_O: make util/map.o 
           make_no_libpython_O: make NO_LIBPYTHON=1 
           make_no_libbionic_O: make NO_LIBBIONIC=1 
              make_no_libelf_O: make NO_LIBELF=1 
                  make_debug_O: make DEBUG=1 
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1 
                 make_perf_o_O: make perf.o 
                make_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_auxtrace_O: make NO_AUXTRACE=1 
             make_no_libperl_O: make NO_LIBPERL=1 
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1 
              make_no_libbpf_O: make NO_LIBBPF=1 
                make_no_newt_O: make NO_NEWT=1 
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1 
             make_no_libnuma_O: make NO_LIBNUMA=1 
        make_with_babeltrace_O: make LIBBABELTRACE=1 
            make_install_bin_O: make install-bin 
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2017-03-24 14:57 ` Arnaldo Carvalho de Melo
@ 2017-03-24 18:39   ` Ingo Molnar
  -1 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2017-03-24 18:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexis Berlemont, Andi Kleen, David Ahern, Hanjun Guo,
	Hemant Kumar, Jiri Olsa, John Shortt, Kefeng Wang,
	Madhavan Srinivasan, Masami Hiramatsu, Michael Ellerman,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria,
	Taeung Song, Wang Nan, linux-perf-users,
	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 267dd0a07eefbb37264fcfad984fffc8856898ad:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170320' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-21 07:41:29 +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.12-20170324
> 
> for you to fetch changes up to bf874fcf9f2fed58510dc83abcee388cee2b427e:
> 
>   perf list: Move extra details printing to new option (2017-03-23 11:42:31 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Allow suppressing 'uncore_' when specifying PMU events (Andi Kleen)
> 
> - Collapse identically named PMU events in 'perf stat', allow
>   not merging it via --no-merge (Andi Kleen)
> 
> Fixes:
> 
> - Use more precise 'grep -v' to suppress unwanted 'objdump -dS'
>   disassembly output to not ditch line:number lines needed by
>   'perf annotate --print-lines' logic (Taeung Song)
> 
> Infrastructure:
> 
> - SDT (Statically Defined Tracing)/uprobes_events arguments improvements
>   (Alexis Berlemont, Ravi Bangoria)
> 
> - Improvements for the handling of JSON described vendor events,
>   including having an expression parser to calculate metrics
>   from multiple vendor events (Andi Kleen)
> 
> - Update Intel JSON vendor event files (Andi Kleen)
> 
> - Restore error reporting in 'perf probe -d' when none of the events
>   requested to be deleted exist. (Kefeng Wang)
> 
> - Bump MAX_CMDLEN in 'perf probe' to match what the kernel accepts
>   (Ravi Bangoria)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alexis Berlemont (2):
>       perf sdt: Add scanning of sdt probes arguments
>       perf probe: Add sdt probes arguments into the uprobe cmd string
> 
> Andi Kleen (13):
>       perf stat: Factor out callback for collecting event values
>       perf stat: Collapse identically named events
>       perf stat: Handle partially bad results with merging
>       perf tools: Factor out PMU matching in parser
>       perf pmu: Expand PMU events by prefix match
>       perf pmu: Special case uncore_ prefix
>       perf tools: Add a simple expression parser for JSON
>       perf vendor events intel: Update Intel uncore JSON event files
>       perf pmu: Support MetricExpr header in JSON event list
>       perf stat: Output JSON MetricExpr metric
>       perf list: Support printing MetricExpr with --debug
>       perf pmu: Add support for MetricName JSON attribute
>       perf list: Move extra details printing to new option
> 
> Arnaldo Carvalho de Melo (1):
>       perf annotate: Add comment clarifying how the source code line is parsed
> 
> Kefeng Wang (1):
>       perf probe: Return errno when not hitting any event
> 
> Ravi Bangoria (2):
>       perf probe: Change MAX_CMDLEN
>       perf sdt x86: Add renaming logic for rNN and other registers
> 
> Taeung Song (1):
>       perf annotate: More exactly grep -v of the objdump command
> 
>  tools/perf/Documentation/perf-list.txt             |   4 +
>  tools/perf/Documentation/perf-stat.txt             |   3 +
>  tools/perf/arch/x86/util/perf_regs.c               | 103 +++++++++++
>  tools/perf/builtin-list.c                          |  14 +-
>  tools/perf/builtin-probe.c                         |   6 +-
>  tools/perf/builtin-stat.c                          | 146 ++++++++++++---
>  .../arch/x86/broadwellde/uncore-cache.json         |  28 +--
>  .../arch/x86/broadwellde/uncore-memory.json        |  26 ++-
>  .../arch/x86/broadwellde/uncore-power.json         |  26 ++-
>  .../arch/x86/broadwellx/uncore-cache.json          |  28 +--
>  .../arch/x86/broadwellx/uncore-interconnect.json   |   6 +-
>  .../arch/x86/broadwellx/uncore-memory.json         |  21 ++-
>  .../arch/x86/broadwellx/uncore-power.json          |  26 ++-
>  .../pmu-events/arch/x86/haswellx/uncore-cache.json |  28 +--
>  .../arch/x86/haswellx/uncore-interconnect.json     |   6 +-
>  .../arch/x86/haswellx/uncore-memory.json           |  21 ++-
>  .../pmu-events/arch/x86/haswellx/uncore-power.json |  26 ++-
>  .../pmu-events/arch/x86/ivytown/uncore-cache.json  |  22 +--
>  .../arch/x86/ivytown/uncore-interconnect.json      |  12 +-
>  .../pmu-events/arch/x86/ivytown/uncore-memory.json |  19 +-
>  .../pmu-events/arch/x86/ivytown/uncore-power.json  |  53 ++++--
>  .../pmu-events/arch/x86/jaketown/uncore-cache.json |  13 +-
>  .../arch/x86/jaketown/uncore-interconnect.json     |  12 +-
>  .../arch/x86/jaketown/uncore-memory.json           |  21 ++-
>  .../pmu-events/arch/x86/jaketown/uncore-power.json |  53 ++++--
>  tools/perf/pmu-events/jevents.c                    |  26 ++-
>  tools/perf/pmu-events/jevents.h                    |   3 +-
>  tools/perf/pmu-events/pmu-events.h                 |   2 +
>  tools/perf/tests/Build                             |   1 +
>  tools/perf/tests/builtin-test.c                    |   4 +
>  tools/perf/tests/expr.c                            |  56 ++++++
>  tools/perf/tests/tests.h                           |   1 +
>  tools/perf/util/Build                              |   6 +
>  tools/perf/util/annotate.c                         |   8 +-
>  tools/perf/util/evsel.c                            |   4 +
>  tools/perf/util/evsel.h                            |   5 +
>  tools/perf/util/expr.h                             |  25 +++
>  tools/perf/util/expr.y                             | 173 ++++++++++++++++++
>  tools/perf/util/parse-events.c                     |  78 +++++++-
>  tools/perf/util/parse-events.h                     |  10 +-
>  tools/perf/util/parse-events.y                     |  73 ++++----
>  tools/perf/util/perf_regs.c                        |   6 +
>  tools/perf/util/perf_regs.h                        |   6 +
>  tools/perf/util/pmu.c                              |  32 +++-
>  tools/perf/util/pmu.h                              |   6 +-
>  tools/perf/util/probe-event.c                      |   1 -
>  tools/perf/util/probe-file.c                       | 173 +++++++++++++++++-
>  tools/perf/util/stat-shadow.c                      | 197 +++++++++++++++++++++
>  tools/perf/util/stat.h                             |   2 +
>  tools/perf/util/symbol-elf.c                       |  25 ++-
>  tools/perf/util/symbol.h                           |   1 +
>  51 files changed, 1370 insertions(+), 277 deletions(-)
>  create mode 100644 tools/perf/tests/expr.c
>  create mode 100644 tools/perf/util/expr.h
>  create mode 100644 tools/perf/util/expr.y

Pulled, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
@ 2017-03-24 18:39   ` Ingo Molnar
  0 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2017-03-24 18:39 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Shishkin,
	Alexis Berlemont, Andi Kleen, David Ahern, Hanjun Guo,
	Hemant Kumar, Jiri Olsa, John Shortt, Kefeng Wang,
	Madhavan Srinivasan, Masami Hiramatsu, Michael Ellerman,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria,
	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 267dd0a07eefbb37264fcfad984fffc8856898ad:
> 
>   Merge tag 'perf-core-for-mingo-4.12-20170320' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-21 07:41:29 +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.12-20170324
> 
> for you to fetch changes up to bf874fcf9f2fed58510dc83abcee388cee2b427e:
> 
>   perf list: Move extra details printing to new option (2017-03-23 11:42:31 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Allow suppressing 'uncore_' when specifying PMU events (Andi Kleen)
> 
> - Collapse identically named PMU events in 'perf stat', allow
>   not merging it via --no-merge (Andi Kleen)
> 
> Fixes:
> 
> - Use more precise 'grep -v' to suppress unwanted 'objdump -dS'
>   disassembly output to not ditch line:number lines needed by
>   'perf annotate --print-lines' logic (Taeung Song)
> 
> Infrastructure:
> 
> - SDT (Statically Defined Tracing)/uprobes_events arguments improvements
>   (Alexis Berlemont, Ravi Bangoria)
> 
> - Improvements for the handling of JSON described vendor events,
>   including having an expression parser to calculate metrics
>   from multiple vendor events (Andi Kleen)
> 
> - Update Intel JSON vendor event files (Andi Kleen)
> 
> - Restore error reporting in 'perf probe -d' when none of the events
>   requested to be deleted exist. (Kefeng Wang)
> 
> - Bump MAX_CMDLEN in 'perf probe' to match what the kernel accepts
>   (Ravi Bangoria)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Alexis Berlemont (2):
>       perf sdt: Add scanning of sdt probes arguments
>       perf probe: Add sdt probes arguments into the uprobe cmd string
> 
> Andi Kleen (13):
>       perf stat: Factor out callback for collecting event values
>       perf stat: Collapse identically named events
>       perf stat: Handle partially bad results with merging
>       perf tools: Factor out PMU matching in parser
>       perf pmu: Expand PMU events by prefix match
>       perf pmu: Special case uncore_ prefix
>       perf tools: Add a simple expression parser for JSON
>       perf vendor events intel: Update Intel uncore JSON event files
>       perf pmu: Support MetricExpr header in JSON event list
>       perf stat: Output JSON MetricExpr metric
>       perf list: Support printing MetricExpr with --debug
>       perf pmu: Add support for MetricName JSON attribute
>       perf list: Move extra details printing to new option
> 
> Arnaldo Carvalho de Melo (1):
>       perf annotate: Add comment clarifying how the source code line is parsed
> 
> Kefeng Wang (1):
>       perf probe: Return errno when not hitting any event
> 
> Ravi Bangoria (2):
>       perf probe: Change MAX_CMDLEN
>       perf sdt x86: Add renaming logic for rNN and other registers
> 
> Taeung Song (1):
>       perf annotate: More exactly grep -v of the objdump command
> 
>  tools/perf/Documentation/perf-list.txt             |   4 +
>  tools/perf/Documentation/perf-stat.txt             |   3 +
>  tools/perf/arch/x86/util/perf_regs.c               | 103 +++++++++++
>  tools/perf/builtin-list.c                          |  14 +-
>  tools/perf/builtin-probe.c                         |   6 +-
>  tools/perf/builtin-stat.c                          | 146 ++++++++++++---
>  .../arch/x86/broadwellde/uncore-cache.json         |  28 +--
>  .../arch/x86/broadwellde/uncore-memory.json        |  26 ++-
>  .../arch/x86/broadwellde/uncore-power.json         |  26 ++-
>  .../arch/x86/broadwellx/uncore-cache.json          |  28 +--
>  .../arch/x86/broadwellx/uncore-interconnect.json   |   6 +-
>  .../arch/x86/broadwellx/uncore-memory.json         |  21 ++-
>  .../arch/x86/broadwellx/uncore-power.json          |  26 ++-
>  .../pmu-events/arch/x86/haswellx/uncore-cache.json |  28 +--
>  .../arch/x86/haswellx/uncore-interconnect.json     |   6 +-
>  .../arch/x86/haswellx/uncore-memory.json           |  21 ++-
>  .../pmu-events/arch/x86/haswellx/uncore-power.json |  26 ++-
>  .../pmu-events/arch/x86/ivytown/uncore-cache.json  |  22 +--
>  .../arch/x86/ivytown/uncore-interconnect.json      |  12 +-
>  .../pmu-events/arch/x86/ivytown/uncore-memory.json |  19 +-
>  .../pmu-events/arch/x86/ivytown/uncore-power.json  |  53 ++++--
>  .../pmu-events/arch/x86/jaketown/uncore-cache.json |  13 +-
>  .../arch/x86/jaketown/uncore-interconnect.json     |  12 +-
>  .../arch/x86/jaketown/uncore-memory.json           |  21 ++-
>  .../pmu-events/arch/x86/jaketown/uncore-power.json |  53 ++++--
>  tools/perf/pmu-events/jevents.c                    |  26 ++-
>  tools/perf/pmu-events/jevents.h                    |   3 +-
>  tools/perf/pmu-events/pmu-events.h                 |   2 +
>  tools/perf/tests/Build                             |   1 +
>  tools/perf/tests/builtin-test.c                    |   4 +
>  tools/perf/tests/expr.c                            |  56 ++++++
>  tools/perf/tests/tests.h                           |   1 +
>  tools/perf/util/Build                              |   6 +
>  tools/perf/util/annotate.c                         |   8 +-
>  tools/perf/util/evsel.c                            |   4 +
>  tools/perf/util/evsel.h                            |   5 +
>  tools/perf/util/expr.h                             |  25 +++
>  tools/perf/util/expr.y                             | 173 ++++++++++++++++++
>  tools/perf/util/parse-events.c                     |  78 +++++++-
>  tools/perf/util/parse-events.h                     |  10 +-
>  tools/perf/util/parse-events.y                     |  73 ++++----
>  tools/perf/util/perf_regs.c                        |   6 +
>  tools/perf/util/perf_regs.h                        |   6 +
>  tools/perf/util/pmu.c                              |  32 +++-
>  tools/perf/util/pmu.h                              |   6 +-
>  tools/perf/util/probe-event.c                      |   1 -
>  tools/perf/util/probe-file.c                       | 173 +++++++++++++++++-
>  tools/perf/util/stat-shadow.c                      | 197 +++++++++++++++++++++
>  tools/perf/util/stat.h                             |   2 +
>  tools/perf/util/symbol-elf.c                       |  25 ++-
>  tools/perf/util/symbol.h                           |   1 +
>  51 files changed, 1370 insertions(+), 277 deletions(-)
>  create mode 100644 tools/perf/tests/expr.c
>  create mode 100644 tools/perf/util/expr.h
>  create mode 100644 tools/perf/util/expr.y

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2017-03-24 14:57 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-03-24 14:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexis Berlemont, Andi Kleen, David Ahern,
	Hanjun Guo, Hemant Kumar, Jiri Olsa, John Shortt, Kefeng Wang,
	Madhavan Srinivasan, Masami Hiramatsu, Michael Ellerman,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria,
	Taeung Song, Wang Nan, linux-perf-users,
	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 267dd0a07eefbb37264fcfad984fffc8856898ad:

  Merge tag 'perf-core-for-mingo-4.12-20170320' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-21 07:41:29 +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.12-20170324

for you to fetch changes up to bf874fcf9f2fed58510dc83abcee388cee2b427e:

  perf list: Move extra details printing to new option (2017-03-23 11:42:31 -0300)

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

User visible:

- Allow suppressing 'uncore_' when specifying PMU events (Andi Kleen)

- Collapse identically named PMU events in 'perf stat', allow
  not merging it via --no-merge (Andi Kleen)

Fixes:

- Use more precise 'grep -v' to suppress unwanted 'objdump -dS'
  disassembly output to not ditch line:number lines needed by
  'perf annotate --print-lines' logic (Taeung Song)

Infrastructure:

- SDT (Statically Defined Tracing)/uprobes_events arguments improvements
  (Alexis Berlemont, Ravi Bangoria)

- Improvements for the handling of JSON described vendor events,
  including having an expression parser to calculate metrics
  from multiple vendor events (Andi Kleen)

- Update Intel JSON vendor event files (Andi Kleen)

- Restore error reporting in 'perf probe -d' when none of the events
  requested to be deleted exist. (Kefeng Wang)

- Bump MAX_CMDLEN in 'perf probe' to match what the kernel accepts
  (Ravi Bangoria)

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

----------------------------------------------------------------
Alexis Berlemont (2):
      perf sdt: Add scanning of sdt probes arguments
      perf probe: Add sdt probes arguments into the uprobe cmd string

Andi Kleen (13):
      perf stat: Factor out callback for collecting event values
      perf stat: Collapse identically named events
      perf stat: Handle partially bad results with merging
      perf tools: Factor out PMU matching in parser
      perf pmu: Expand PMU events by prefix match
      perf pmu: Special case uncore_ prefix
      perf tools: Add a simple expression parser for JSON
      perf vendor events intel: Update Intel uncore JSON event files
      perf pmu: Support MetricExpr header in JSON event list
      perf stat: Output JSON MetricExpr metric
      perf list: Support printing MetricExpr with --debug
      perf pmu: Add support for MetricName JSON attribute
      perf list: Move extra details printing to new option

Arnaldo Carvalho de Melo (1):
      perf annotate: Add comment clarifying how the source code line is parsed

Kefeng Wang (1):
      perf probe: Return errno when not hitting any event

Ravi Bangoria (2):
      perf probe: Change MAX_CMDLEN
      perf sdt x86: Add renaming logic for rNN and other registers

Taeung Song (1):
      perf annotate: More exactly grep -v of the objdump command

 tools/perf/Documentation/perf-list.txt             |   4 +
 tools/perf/Documentation/perf-stat.txt             |   3 +
 tools/perf/arch/x86/util/perf_regs.c               | 103 +++++++++++
 tools/perf/builtin-list.c                          |  14 +-
 tools/perf/builtin-probe.c                         |   6 +-
 tools/perf/builtin-stat.c                          | 146 ++++++++++++---
 .../arch/x86/broadwellde/uncore-cache.json         |  28 +--
 .../arch/x86/broadwellde/uncore-memory.json        |  26 ++-
 .../arch/x86/broadwellde/uncore-power.json         |  26 ++-
 .../arch/x86/broadwellx/uncore-cache.json          |  28 +--
 .../arch/x86/broadwellx/uncore-interconnect.json   |   6 +-
 .../arch/x86/broadwellx/uncore-memory.json         |  21 ++-
 .../arch/x86/broadwellx/uncore-power.json          |  26 ++-
 .../pmu-events/arch/x86/haswellx/uncore-cache.json |  28 +--
 .../arch/x86/haswellx/uncore-interconnect.json     |   6 +-
 .../arch/x86/haswellx/uncore-memory.json           |  21 ++-
 .../pmu-events/arch/x86/haswellx/uncore-power.json |  26 ++-
 .../pmu-events/arch/x86/ivytown/uncore-cache.json  |  22 +--
 .../arch/x86/ivytown/uncore-interconnect.json      |  12 +-
 .../pmu-events/arch/x86/ivytown/uncore-memory.json |  19 +-
 .../pmu-events/arch/x86/ivytown/uncore-power.json  |  53 ++++--
 .../pmu-events/arch/x86/jaketown/uncore-cache.json |  13 +-
 .../arch/x86/jaketown/uncore-interconnect.json     |  12 +-
 .../arch/x86/jaketown/uncore-memory.json           |  21 ++-
 .../pmu-events/arch/x86/jaketown/uncore-power.json |  53 ++++--
 tools/perf/pmu-events/jevents.c                    |  26 ++-
 tools/perf/pmu-events/jevents.h                    |   3 +-
 tools/perf/pmu-events/pmu-events.h                 |   2 +
 tools/perf/tests/Build                             |   1 +
 tools/perf/tests/builtin-test.c                    |   4 +
 tools/perf/tests/expr.c                            |  56 ++++++
 tools/perf/tests/tests.h                           |   1 +
 tools/perf/util/Build                              |   6 +
 tools/perf/util/annotate.c                         |   8 +-
 tools/perf/util/evsel.c                            |   4 +
 tools/perf/util/evsel.h                            |   5 +
 tools/perf/util/expr.h                             |  25 +++
 tools/perf/util/expr.y                             | 173 ++++++++++++++++++
 tools/perf/util/parse-events.c                     |  78 +++++++-
 tools/perf/util/parse-events.h                     |  10 +-
 tools/perf/util/parse-events.y                     |  73 ++++----
 tools/perf/util/perf_regs.c                        |   6 +
 tools/perf/util/perf_regs.h                        |   6 +
 tools/perf/util/pmu.c                              |  32 +++-
 tools/perf/util/pmu.h                              |   6 +-
 tools/perf/util/probe-event.c                      |   1 -
 tools/perf/util/probe-file.c                       | 173 +++++++++++++++++-
 tools/perf/util/stat-shadow.c                      | 197 +++++++++++++++++++++
 tools/perf/util/stat.h                             |   2 +
 tools/perf/util/symbol-elf.c                       |  25 ++-
 tools/perf/util/symbol.h                           |   1 +
 51 files changed, 1370 insertions(+), 277 deletions(-)
 create mode 100644 tools/perf/tests/expr.c
 create mode 100644 tools/perf/util/expr.h
 create mode 100644 tools/perf/util/expr.y

Test results:

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

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

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

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

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

  # uname -a
  Linux felicio.ghostprotocols.net 4.11.0-rc3+ #1 SMP Thu Mar 23 14:32:00 BRT 2017 x86_64 x86_64 x86_64 GNU/Linux
  # Has peterz's fix for 'perf test tsc'
  # 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_install_O: make install 
            make_install_bin_O: make install-bin 
         make_with_clangllvm_O: make LIBCLANGLLVM=1 
                   make_pure_O: make 
           make_no_libbionic_O: make NO_LIBBIONIC=1 
           make_no_backtrace_O: make NO_BACKTRACE=1 
                make_no_newt_O: make NO_NEWT=1 
                  make_debug_O: make DEBUG=1 
                    make_doc_O: make doc 
               make_no_slang_O: make NO_SLANG=1 
                 make_static_O: make LDFLAGS=-static 
                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_libbpf_O: make NO_LIBBPF=1 
       make_util_pmu_bison_o_O: make util/pmu-bison.o 
                 make_perf_o_O: make perf.o 
             make_no_libnuma_O: make NO_LIBNUMA=1 
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1 
            make_no_demangle_O: make NO_DEMANGLE=1 
            make_no_auxtrace_O: make NO_AUXTRACE=1 
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1 
                   make_help_O: make help 
             make_util_map_o_O: make util/map.o 
             make_no_libperl_O: make NO_LIBPERL=1 
                make_no_gtk2_O: make NO_GTK2=1 
         make_install_prefix_O: make install prefix=/tmp/krava 
              make_clean_all_O: make clean all 
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1 
           make_no_libunwind_O: make NO_LIBUNWIND=1 
           make_no_libpython_O: make NO_LIBPYTHON=1 
            make_no_libaudit_O: make NO_LIBAUDIT=1 
                   make_tags_O: make tags 
        make_with_babeltrace_O: make LIBBABELTRACE=1 
              make_no_libelf_O: make NO_LIBELF=1 
   make_install_prefix_slash_O: make install prefix=/tmp/krava/ 
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2017-03-24 14:57 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-03-24 14:57 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Shishkin, Alexis Berlemont, Andi Kleen, David Ahern,
	Hanjun Guo, Hemant Kumar, Jiri Olsa, John Shortt, Kefeng Wang,
	Madhavan Srinivasan, Masami Hiramatsu, Michael Ellerman,
	Namhyung Kim, Naveen N . Rao, Peter Zijlstra, Ravi Bangoria

Hi Ingo,

	Please consider pulling,

- Arnaldo

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

The following changes since commit 267dd0a07eefbb37264fcfad984fffc8856898ad:

  Merge tag 'perf-core-for-mingo-4.12-20170320' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-03-21 07:41:29 +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.12-20170324

for you to fetch changes up to bf874fcf9f2fed58510dc83abcee388cee2b427e:

  perf list: Move extra details printing to new option (2017-03-23 11:42:31 -0300)

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

User visible:

- Allow suppressing 'uncore_' when specifying PMU events (Andi Kleen)

- Collapse identically named PMU events in 'perf stat', allow
  not merging it via --no-merge (Andi Kleen)

Fixes:

- Use more precise 'grep -v' to suppress unwanted 'objdump -dS'
  disassembly output to not ditch line:number lines needed by
  'perf annotate --print-lines' logic (Taeung Song)

Infrastructure:

- SDT (Statically Defined Tracing)/uprobes_events arguments improvements
  (Alexis Berlemont, Ravi Bangoria)

- Improvements for the handling of JSON described vendor events,
  including having an expression parser to calculate metrics
  from multiple vendor events (Andi Kleen)

- Update Intel JSON vendor event files (Andi Kleen)

- Restore error reporting in 'perf probe -d' when none of the events
  requested to be deleted exist. (Kefeng Wang)

- Bump MAX_CMDLEN in 'perf probe' to match what the kernel accepts
  (Ravi Bangoria)

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

----------------------------------------------------------------
Alexis Berlemont (2):
      perf sdt: Add scanning of sdt probes arguments
      perf probe: Add sdt probes arguments into the uprobe cmd string

Andi Kleen (13):
      perf stat: Factor out callback for collecting event values
      perf stat: Collapse identically named events
      perf stat: Handle partially bad results with merging
      perf tools: Factor out PMU matching in parser
      perf pmu: Expand PMU events by prefix match
      perf pmu: Special case uncore_ prefix
      perf tools: Add a simple expression parser for JSON
      perf vendor events intel: Update Intel uncore JSON event files
      perf pmu: Support MetricExpr header in JSON event list
      perf stat: Output JSON MetricExpr metric
      perf list: Support printing MetricExpr with --debug
      perf pmu: Add support for MetricName JSON attribute
      perf list: Move extra details printing to new option

Arnaldo Carvalho de Melo (1):
      perf annotate: Add comment clarifying how the source code line is parsed

Kefeng Wang (1):
      perf probe: Return errno when not hitting any event

Ravi Bangoria (2):
      perf probe: Change MAX_CMDLEN
      perf sdt x86: Add renaming logic for rNN and other registers

Taeung Song (1):
      perf annotate: More exactly grep -v of the objdump command

 tools/perf/Documentation/perf-list.txt             |   4 +
 tools/perf/Documentation/perf-stat.txt             |   3 +
 tools/perf/arch/x86/util/perf_regs.c               | 103 +++++++++++
 tools/perf/builtin-list.c                          |  14 +-
 tools/perf/builtin-probe.c                         |   6 +-
 tools/perf/builtin-stat.c                          | 146 ++++++++++++---
 .../arch/x86/broadwellde/uncore-cache.json         |  28 +--
 .../arch/x86/broadwellde/uncore-memory.json        |  26 ++-
 .../arch/x86/broadwellde/uncore-power.json         |  26 ++-
 .../arch/x86/broadwellx/uncore-cache.json          |  28 +--
 .../arch/x86/broadwellx/uncore-interconnect.json   |   6 +-
 .../arch/x86/broadwellx/uncore-memory.json         |  21 ++-
 .../arch/x86/broadwellx/uncore-power.json          |  26 ++-
 .../pmu-events/arch/x86/haswellx/uncore-cache.json |  28 +--
 .../arch/x86/haswellx/uncore-interconnect.json     |   6 +-
 .../arch/x86/haswellx/uncore-memory.json           |  21 ++-
 .../pmu-events/arch/x86/haswellx/uncore-power.json |  26 ++-
 .../pmu-events/arch/x86/ivytown/uncore-cache.json  |  22 +--
 .../arch/x86/ivytown/uncore-interconnect.json      |  12 +-
 .../pmu-events/arch/x86/ivytown/uncore-memory.json |  19 +-
 .../pmu-events/arch/x86/ivytown/uncore-power.json  |  53 ++++--
 .../pmu-events/arch/x86/jaketown/uncore-cache.json |  13 +-
 .../arch/x86/jaketown/uncore-interconnect.json     |  12 +-
 .../arch/x86/jaketown/uncore-memory.json           |  21 ++-
 .../pmu-events/arch/x86/jaketown/uncore-power.json |  53 ++++--
 tools/perf/pmu-events/jevents.c                    |  26 ++-
 tools/perf/pmu-events/jevents.h                    |   3 +-
 tools/perf/pmu-events/pmu-events.h                 |   2 +
 tools/perf/tests/Build                             |   1 +
 tools/perf/tests/builtin-test.c                    |   4 +
 tools/perf/tests/expr.c                            |  56 ++++++
 tools/perf/tests/tests.h                           |   1 +
 tools/perf/util/Build                              |   6 +
 tools/perf/util/annotate.c                         |   8 +-
 tools/perf/util/evsel.c                            |   4 +
 tools/perf/util/evsel.h                            |   5 +
 tools/perf/util/expr.h                             |  25 +++
 tools/perf/util/expr.y                             | 173 ++++++++++++++++++
 tools/perf/util/parse-events.c                     |  78 +++++++-
 tools/perf/util/parse-events.h                     |  10 +-
 tools/perf/util/parse-events.y                     |  73 ++++----
 tools/perf/util/perf_regs.c                        |   6 +
 tools/perf/util/perf_regs.h                        |   6 +
 tools/perf/util/pmu.c                              |  32 +++-
 tools/perf/util/pmu.h                              |   6 +-
 tools/perf/util/probe-event.c                      |   1 -
 tools/perf/util/probe-file.c                       | 173 +++++++++++++++++-
 tools/perf/util/stat-shadow.c                      | 197 +++++++++++++++++++++
 tools/perf/util/stat.h                             |   2 +
 tools/perf/util/symbol-elf.c                       |  25 ++-
 tools/perf/util/symbol.h                           |   1 +
 51 files changed, 1370 insertions(+), 277 deletions(-)
 create mode 100644 tools/perf/tests/expr.c
 create mode 100644 tools/perf/util/expr.h
 create mode 100644 tools/perf/util/expr.y

Test results:

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

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

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

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

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

  # uname -a
  Linux felicio.ghostprotocols.net 4.11.0-rc3+ #1 SMP Thu Mar 23 14:32:00 BRT 2017 x86_64 x86_64 x86_64 GNU/Linux
  # Has peterz's fix for 'perf test tsc'
  # 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_install_O: make install 
            make_install_bin_O: make install-bin 
         make_with_clangllvm_O: make LIBCLANGLLVM=1 
                   make_pure_O: make 
           make_no_libbionic_O: make NO_LIBBIONIC=1 
           make_no_backtrace_O: make NO_BACKTRACE=1 
                make_no_newt_O: make NO_NEWT=1 
                  make_debug_O: make DEBUG=1 
                    make_doc_O: make doc 
               make_no_slang_O: make NO_SLANG=1 
                 make_static_O: make LDFLAGS=-static 
                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_libbpf_O: make NO_LIBBPF=1 
       make_util_pmu_bison_o_O: make util/pmu-bison.o 
                 make_perf_o_O: make perf.o 
             make_no_libnuma_O: make NO_LIBNUMA=1 
             make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1 
            make_no_demangle_O: make NO_DEMANGLE=1 
            make_no_auxtrace_O: make NO_AUXTRACE=1 
  make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1 
                   make_help_O: make help 
             make_util_map_o_O: make util/map.o 
             make_no_libperl_O: make NO_LIBPERL=1 
                make_no_gtk2_O: make NO_GTK2=1 
         make_install_prefix_O: make install prefix=/tmp/krava 
              make_clean_all_O: make clean all 
                  make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1 
           make_no_libunwind_O: make NO_LIBUNWIND=1 
           make_no_libpython_O: make NO_LIBPYTHON=1 
            make_no_libaudit_O: make NO_LIBAUDIT=1 
                   make_tags_O: make tags 
        make_with_babeltrace_O: make LIBBABELTRACE=1 
              make_no_libelf_O: make NO_LIBELF=1 
   make_install_prefix_slash_O: make install prefix=/tmp/krava/ 
  OK
  make: Leaving directory '/home/acme/git/linux/tools/perf'
  $

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2016-12-05 21:37 Arnaldo Carvalho de Melo
@ 2016-12-06  8:17 ` Ingo Molnar
  0 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2016-12-06  8:17 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Alexander Shishkin, Alexei Starovoitov,
	Chris Riyder, David Ahern, He Kuang, Jiri Olsa, Joe Stringer,
	Kim Phillips, linuxppc-dev, Markus Trippelsdorf,
	Masami Hiramatsu, Michael Ellerman, Namhyung Kim, Naveen N . Rao,
	Peter Foley, Peter Zijlstra, Ravi Bangoria, Taeung Song,
	Wang Nan, Zefan Li, pi3orama, 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 e7af7b15121ca08c31a0ab9df71a41b4c53365b4:
> 
>   Merge tag 'perf-core-for-mingo-20161201' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-12-02 10:08:03 +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-20161205
> 
> for you to fetch changes up to bec60e50af83741cde1786ab475d4bf472aed6f9:
> 
>   perf annotate: Show raw form for jump instruction with indirect target (2016-12-05 17:21:57 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Fixes:
> 
> - Do not show a bogus target address in 'perf annotate' for targetless powerpc
>   jump instructions such as 'bctr' (Ravi Bangoria)
> 
> - tools/build fixes related to race conditions with the fixdep utility (Jiri Olsa)
> 
> - Fix building objtool with clang (Peter Foley)
> 
> Infrastructure:
> 
> - Support linking perf with clang and LLVM libraries, initially statically, but
>   this limitation will be lifted and shared libraries, when available, will
>   be preferred to the static build, that should, as with other features, be
>   enabled explicitly (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Jiri Olsa (7):
>       tools build: Make fixdep parsing wait for last target
>       tools build: Make the .cmd file more readable
>       tools build: Move tabs to spaces where suitable
>       perf tools: Move install-gtk target into rules area
>       perf tools: Move python/perf.so target into rules area
>       perf tools: Cleanup build directory before each test
>       perf tools: Add non config targets
> 
> Peter Foley (1):
>       tools build: Fix objtool build with clang
> 
> Ravi Bangoria (1):
>       perf annotate: Show raw form for jump instruction with indirect target
> 
> Wang Nan (11):
>       perf tools: Pass context to perf hook functions
>       perf llvm: Extract helpers in llvm-utils.c
>       tools build: Add feature detection for LLVM
>       tools build: Add feature detection for clang
>       perf build: Add clang and llvm compile and linking support
>       perf clang: Add builtin clang support ant test case
>       perf clang: Use real file system for #include
>       perf clang: Allow passing CFLAGS to builtin clang
>       perf clang: Update test case to use real BPF script
>       perf clang: Support compile IR to BPF object and add testcase
>       perf clang: Compile BPF script using builtin clang support
> 
>  tools/build/Build.include          |  20 ++--
>  tools/build/Makefile.feature       | 138 +++++++++++++-------------
>  tools/build/feature/Makefile       | 120 +++++++++++++----------
>  tools/build/feature/test-clang.cpp |  21 ++++
>  tools/build/feature/test-llvm.cpp  |   8 ++
>  tools/build/fixdep.c               |   5 +-
>  tools/perf/Makefile.config         |  62 +++++++++---
>  tools/perf/Makefile.perf           |  56 +++++++----
>  tools/perf/tests/Build             |   1 +
>  tools/perf/tests/builtin-test.c    |   9 ++
>  tools/perf/tests/clang.c           |  46 +++++++++
>  tools/perf/tests/llvm.h            |   7 ++
>  tools/perf/tests/make              |   4 +-
>  tools/perf/tests/perf-hooks.c      |  14 ++-
>  tools/perf/tests/tests.h           |   3 +
>  tools/perf/util/Build              |   2 +
>  tools/perf/util/annotate.c         |   3 +
>  tools/perf/util/bpf-loader.c       |  19 +++-
>  tools/perf/util/c++/Build          |   2 +
>  tools/perf/util/c++/clang-c.h      |  43 ++++++++
>  tools/perf/util/c++/clang-test.cpp |  62 ++++++++++++
>  tools/perf/util/c++/clang.cpp      | 195 +++++++++++++++++++++++++++++++++++++
>  tools/perf/util/c++/clang.h        |  26 +++++
>  tools/perf/util/llvm-utils.c       |  76 +++++++++++----
>  tools/perf/util/llvm-utils.h       |   6 ++
>  tools/perf/util/perf-hooks.c       |  10 +-
>  tools/perf/util/perf-hooks.h       |   6 +-
>  tools/perf/util/util-cxx.h         |  26 +++++
>  28 files changed, 795 insertions(+), 195 deletions(-)
>  create mode 100644 tools/build/feature/test-clang.cpp
>  create mode 100644 tools/build/feature/test-llvm.cpp
>  create mode 100644 tools/perf/tests/clang.c
>  create mode 100644 tools/perf/util/c++/Build
>  create mode 100644 tools/perf/util/c++/clang-c.h
>  create mode 100644 tools/perf/util/c++/clang-test.cpp
>  create mode 100644 tools/perf/util/c++/clang.cpp
>  create mode 100644 tools/perf/util/c++/clang.h
>  create mode 100644 tools/perf/util/util-cxx.h
> 
>   # uname -a
>   Linux jouet 4.8.8-300.fc25.x86_64 #1 SMP Tue Nov 15 18:10:06 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 event definition strings             : Ok
>    6: PERF_RECORD_* events & perf_sample fields  : Ok
>    7: Parse perf pmu format                      : Ok
>    8: DSO data read                              : Ok
>    9: DSO data cache                             : Ok
>   10: DSO data reopen                            : Ok
>   11: Roundtrip evsel->name                      : Ok
>   12: Parse sched tracepoints fields             : Ok
>   13: syscalls:sys_enter_openat event fields     : Ok
>   14: Setup struct perf_event_attr               : Ok
>   15: Match and link multiple hists              : Ok
>   16: 'import perf' in python                    : Ok
>   17: Breakpoint overflow signal handler         : Ok
>   18: Breakpoint overflow sampling               : Ok
>   19: Number of exit events of a simple workload : Ok
>   20: Software clock events period values        : Ok
>   21: Object code reading                        : Ok
>   22: Sample parsing                             : Ok
>   23: Use a dummy software event to keep tracking: Ok
>   24: Parse with no sample_id_all bit set        : Ok
>   25: Filter hist entries                        : Ok
>   26: Lookup mmap thread                         : Ok
>   27: Share thread mg                            : Ok
>   28: Sort output of hist entries                : Ok
>   29: Cumulate child hist entries                : Ok
>   30: Track with sched_switch                    : Ok
>   31: Filter fds with revents mask in a fdarray  : Ok
>   32: Add fd to a fdarray, making it autogrow    : Ok
>   33: kmod_path__parse                           : Ok
>   34: Thread map                                 : Ok
>   35: LLVM search and compile                    :
>   35.1: Basic BPF llvm compile                    : Ok
>   35.2: kbuild searching                          : Ok
>   35.3: Compile source for BPF prologue generation: Ok
>   35.4: Compile source for BPF relocation         : Ok
>   36: Session topology                           : Ok
>   37: BPF filter                                 :
>   37.1: Basic BPF filtering                      : Ok
>   37.2: BPF prologue generation                  : Ok
>   37.3: BPF relocation checker                   : Ok
>   38: Synthesize thread map                      : Ok
>   39: Synthesize cpu map                         : Ok
>   40: Synthesize stat config                     : Ok
>   41: Synthesize stat                            : Ok
>   42: Synthesize stat round                      : Ok
>   43: Synthesize attr update                     : Ok
>   44: Event times                                : Ok
>   45: Read backward ring buffer                  : Ok
>   46: Print cpu map                              : Ok
>   47: Probe SDT events                           : Ok
>   48: is_printable_array                         : Ok
>   49: Print bitmap                               : Ok
>   50: perf hooks                                 : Ok
>   51: builtin clang support                      : Skip (not compiled in)
>   52: x86 rdpmc                                  : Ok
>   53: Convert perf time to TSC                   : Ok
>   54: DWARF unwind                               : Ok
>   55: x86 instruction decoder - new instructions : Ok
>   56: Intel cqm nmi context read                 : Skip
>   # 
>   # time dm
>    1 alpine:3.4: Ok
>    2 android-ndk:r12b-arm: Ok
>    3 archlinux:latest: Ok
>    4 centos:5: Ok
>    5 centos:6: Ok
>    6 centos:7: Ok
>    7 debian:7: Ok
>    8 debian:8: Ok
>    9 debian:experimental: Ok
>   10 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:25: Ok
>   17 fedora:rawhide: Ok
>   18 mageia:5: Ok
>   19 opensuse:13.2: Ok
>   20 opensuse:42.1: Ok
>   21 opensuse:tumbleweed: Ok
>   22 ubuntu:12.04.5: Ok
>   23 ubuntu:14.04.4-x-linaro-arm64: Ok
>   24 ubuntu:16.04: Ok
>   25 ubuntu:16.04-x-arm: Ok
>   26 ubuntu:16.04-x-arm64: Ok
>   27 ubuntu:16.04-x-powerpc: Ok
>   28 ubuntu:16.04-x-powerpc64: Ok
>   29 ubuntu:16.04-x-powerpc64el: Ok
>   30 ubuntu:16.04-x-s390: Ok
>   31 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_backtrace_O: make NO_BACKTRACE=1
>                 make_no_gtk2_O: make NO_GTK2=1
>                  make_static_O: make LDFLAGS=-static
>              make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
>                   make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
>                  make_perf_o_O: make perf.o
>                make_no_slang_O: make NO_SLANG=1
>          make_install_prefix_O: make install prefix=/tmp/krava
>            make_no_libpython_O: make NO_LIBPYTHON=1
>                 make_no_newt_O: make NO_NEWT=1
>                   make_debug_O: make DEBUG=1
>                    make_tags_O: make tags
>            make_no_libbionic_O: make NO_LIBBIONIC=1
>                    make_help_O: make help
>                 make_install_O: make install
>            make_no_libunwind_O: make NO_LIBUNWIND=1
>                    make_pure_O: make
>                 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_libperl_O: make NO_LIBPERL=1
>               make_no_libbpf_O: make NO_LIBBPF=1
>   make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
>                     make_doc_O: make doc
>             make_no_libaudit_O: make NO_LIBAUDIT=1
>               make_clean_all_O: make clean all
>         make_with_babeltrace_O: make LIBBABELTRACE=1
>              make_no_libnuma_O: make NO_LIBNUMA=1
>              make_util_map_o_O: make util/map.o
>             make_install_bin_O: make install-bin
>             make_no_demangle_O: make NO_DEMANGLE=1
>               make_no_libelf_O: make NO_LIBELF=1
>             make_no_auxtrace_O: make NO_AUXTRACE=1
>        make_util_pmu_bison_o_O: make util/pmu-bison.o
>    make_install_prefix_slash_O: make install prefix=/tmp/krava/
>          make_with_clangllvm_O: make LIBCLANGLLVM=1
>   OK
>   make: Leaving directory '/home/acme/git/linux/tools/perf'
>   $

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2016-12-05 21:37 Arnaldo Carvalho de Melo
  2016-12-06  8:17 ` Ingo Molnar
  0 siblings, 1 reply; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-12-05 21:37 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Alexei Starovoitov, Chris Riyder, David Ahern, He Kuang,
	Jiri Olsa, Joe Stringer, Kim Phillips, linuxppc-dev,
	Markus Trippelsdorf, Masami Hiramatsu, Michael Ellerman,
	Namhyung Kim, Naveen N . Rao, Peter Foley, Peter Zijlstra,
	Ravi Bangoria, Taeung Song, Wang Nan, Zefan Li, pi3orama,
	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 e7af7b15121ca08c31a0ab9df71a41b4c53365b4:

  Merge tag 'perf-core-for-mingo-20161201' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2016-12-02 10:08:03 +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-20161205

for you to fetch changes up to bec60e50af83741cde1786ab475d4bf472aed6f9:

  perf annotate: Show raw form for jump instruction with indirect target (2016-12-05 17:21:57 -0300)

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

Fixes:

- Do not show a bogus target address in 'perf annotate' for targetless powerpc
  jump instructions such as 'bctr' (Ravi Bangoria)

- tools/build fixes related to race conditions with the fixdep utility (Jiri Olsa)

- Fix building objtool with clang (Peter Foley)

Infrastructure:

- Support linking perf with clang and LLVM libraries, initially statically, but
  this limitation will be lifted and shared libraries, when available, will
  be preferred to the static build, that should, as with other features, be
  enabled explicitly (Wang Nan)

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

----------------------------------------------------------------
Jiri Olsa (7):
      tools build: Make fixdep parsing wait for last target
      tools build: Make the .cmd file more readable
      tools build: Move tabs to spaces where suitable
      perf tools: Move install-gtk target into rules area
      perf tools: Move python/perf.so target into rules area
      perf tools: Cleanup build directory before each test
      perf tools: Add non config targets

Peter Foley (1):
      tools build: Fix objtool build with clang

Ravi Bangoria (1):
      perf annotate: Show raw form for jump instruction with indirect target

Wang Nan (11):
      perf tools: Pass context to perf hook functions
      perf llvm: Extract helpers in llvm-utils.c
      tools build: Add feature detection for LLVM
      tools build: Add feature detection for clang
      perf build: Add clang and llvm compile and linking support
      perf clang: Add builtin clang support ant test case
      perf clang: Use real file system for #include
      perf clang: Allow passing CFLAGS to builtin clang
      perf clang: Update test case to use real BPF script
      perf clang: Support compile IR to BPF object and add testcase
      perf clang: Compile BPF script using builtin clang support

 tools/build/Build.include          |  20 ++--
 tools/build/Makefile.feature       | 138 +++++++++++++-------------
 tools/build/feature/Makefile       | 120 +++++++++++++----------
 tools/build/feature/test-clang.cpp |  21 ++++
 tools/build/feature/test-llvm.cpp  |   8 ++
 tools/build/fixdep.c               |   5 +-
 tools/perf/Makefile.config         |  62 +++++++++---
 tools/perf/Makefile.perf           |  56 +++++++----
 tools/perf/tests/Build             |   1 +
 tools/perf/tests/builtin-test.c    |   9 ++
 tools/perf/tests/clang.c           |  46 +++++++++
 tools/perf/tests/llvm.h            |   7 ++
 tools/perf/tests/make              |   4 +-
 tools/perf/tests/perf-hooks.c      |  14 ++-
 tools/perf/tests/tests.h           |   3 +
 tools/perf/util/Build              |   2 +
 tools/perf/util/annotate.c         |   3 +
 tools/perf/util/bpf-loader.c       |  19 +++-
 tools/perf/util/c++/Build          |   2 +
 tools/perf/util/c++/clang-c.h      |  43 ++++++++
 tools/perf/util/c++/clang-test.cpp |  62 ++++++++++++
 tools/perf/util/c++/clang.cpp      | 195 +++++++++++++++++++++++++++++++++++++
 tools/perf/util/c++/clang.h        |  26 +++++
 tools/perf/util/llvm-utils.c       |  76 +++++++++++----
 tools/perf/util/llvm-utils.h       |   6 ++
 tools/perf/util/perf-hooks.c       |  10 +-
 tools/perf/util/perf-hooks.h       |   6 +-
 tools/perf/util/util-cxx.h         |  26 +++++
 28 files changed, 795 insertions(+), 195 deletions(-)
 create mode 100644 tools/build/feature/test-clang.cpp
 create mode 100644 tools/build/feature/test-llvm.cpp
 create mode 100644 tools/perf/tests/clang.c
 create mode 100644 tools/perf/util/c++/Build
 create mode 100644 tools/perf/util/c++/clang-c.h
 create mode 100644 tools/perf/util/c++/clang-test.cpp
 create mode 100644 tools/perf/util/c++/clang.cpp
 create mode 100644 tools/perf/util/c++/clang.h
 create mode 100644 tools/perf/util/util-cxx.h

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

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2014-09-17 21:24 ` Arnaldo Carvalho de Melo
@ 2014-09-19  5:15   ` Ingo Molnar
  -1 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2014-09-19  5:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Yarygin, Anton Blanchard,
	Avi Kivity, Chanho Park, Christian Borntraeger, Corey Ashford,
	David Ahern, david lerner, Don Zickus, Frederic Weisbecker,
	Jean Pihet, Jiri Olsa, John Spencer, Kyle McMartin,
	linux-perf-users, Masami Hiramatsu, Michael Ellerman,
	Mike Galbraith, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	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 c88f2096136416b261bd3647cc260935f6e95805:
> 
>   perf: Do not check PERF_EVENT_STATE_EXIT on syscall read path (2014-09-16 10:30:36 +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 e5685730e2c620f97bc12380e9370e857e5bd7a7:
> 
>   perf record: Use ring buffer consume method to look like other tools (2014-09-17 18:01:43 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> o Add +field argument support for --sort option (Jiri Olsa)
> 
> o Do not access kallsyms when analyzing user binaries with 'probe' (Masami Hiramatsu)
> 
> o Ignore stripped vmlinux and fallback to kallsyms (Anton Blanchard)
> 
> o Add path to Ubuntu kernel debuginfo file (Anton Blanchard)
> 
> o Disable kernel symbol demangling by default (Avi Kivity)
> 
> Infrastructure:
> 
> o More intel PT prep work, from Adrian Hunter, including:
> 
>   - Let a user specify a PMU event without any config terms
>   - Add perf-with-kcore script
>   - Let default config be defined for a PMU
>   - Add perf_pmu__scan_file()
> 
> o "perf kvm stat report" improvements by Alexander Yarygin:
>   o  Save pid string in opts.target.pid
>   o  Enable the target.system_wide flag
>   o  Unify the title bar output
> 
> o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
> 
> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
> 
> o Fix build on ARM (Stephane Eranian)
> 
> o Fix build on powerpc when DWARF support is disabled (Anton Blanchard)
> 
> o Don't include sys/poll.h directly (Arnaldo Carvalho de Melo)
> 
> o Use ring buffer consume method to look like other tools (Arnaldo Carvalho de Melo)
> 
> Chanho Park (1):
>   perf tools: define _DEFAULT_SOURCE for glibc_2.20
> 
> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
> 
> o Fix GNU-only grep usage in Makefile (John Spencer)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (4):
>       perf tools: Let a user specify a PMU event without any config terms
>       perf tools: Add perf-with-kcore script
>       perf tools: Let default config be defined for a PMU
>       perf tools: Add perf_pmu__scan_file()
> 
> Alexander Yarygin (3):
>       perf kvm stat report: Save pid string in opts.target.pid
>       perf kvm stat report: Enable the target.system_wide flag
>       perf kvm stat report: Unify the title bar output
> 
> Anton Blanchard (3):
>       perf tools powerpc: Fix build issue when DWARF support is disabled
>       perf symbols: Ignore stripped vmlinux and fallback to kallsyms
>       perf symbols: Add path to Ubuntu kernel debuginfo file
> 
> Arnaldo Carvalho de Melo (2):
>       perf tools: Don't include sys/poll.h directly
>       perf record: Use ring buffer consume method to look like other tools
> 
> Avi Kivity (1):
>       perf tools: Disable kernel symbol demangling by default
> 
> Chanho Park (1):
>       perf tools: define _DEFAULT_SOURCE for glibc_2.20
> 
> Jiri Olsa (2):
>       perf tools: Add +field argument support for --sort option
>       perf tools: Allow to specify lib compile variable for spec usage
> 
> John Spencer (1):
>       perf tools: Fix GNU-only grep usage in Makefile
> 
> Masami Hiramatsu (2):
>       perf probe: Do not access kallsyms when analyzing user binaries
>       perf probe: Do not use dwfl_module_addrsym if dwarf_diename finds symbol name
> 
> Stephane Eranian (1):
>       perf tool: fix compilation for ARM
> 
>  tools/perf/.gitignore                       |   1 +
>  tools/perf/Documentation/perf-probe.txt     |   3 +
>  tools/perf/Documentation/perf-report.txt    |   3 +
>  tools/perf/Documentation/perf-top.txt       |   3 +
>  tools/perf/Makefile.perf                    |   5 +-
>  tools/perf/arch/arm/tests/dwarf-unwind.c    |   1 +
>  tools/perf/arch/arm/util/unwind-libunwind.c |   1 +
>  tools/perf/arch/powerpc/Makefile            |   2 +-
>  tools/perf/bench/sched-messaging.c          |   2 +-
>  tools/perf/builtin-kvm.c                    |  23 +--
>  tools/perf/builtin-probe.c                  |   5 +-
>  tools/perf/builtin-record.c                 |   8 +-
>  tools/perf/builtin-report.c                 |   2 +
>  tools/perf/builtin-top.c                    |   4 +-
>  tools/perf/config/Makefile                  |  12 +-
>  tools/perf/config/utilities.mak             |   2 +-
>  tools/perf/perf-with-kcore.sh               | 259 ++++++++++++++++++++++++++++
>  tools/perf/tests/pmu.c                      |   2 +-
>  tools/perf/util/kvm-stat.h                  |   1 -
>  tools/perf/util/parse-events.c              |  13 +-
>  tools/perf/util/parse-events.y              |  10 ++
>  tools/perf/util/pmu.c                       |  79 +++++++--
>  tools/perf/util/pmu.h                       |  12 +-
>  tools/perf/util/probe-event.c               |   9 +-
>  tools/perf/util/probe-event.h               |   3 +-
>  tools/perf/util/probe-finder.c              |  16 +-
>  tools/perf/util/sort.c                      |  37 +++-
>  tools/perf/util/symbol-elf.c                |  15 +-
>  tools/perf/util/symbol.c                    |   9 +-
>  tools/perf/util/symbol.h                    |   1 +
>  tools/perf/util/util.h                      |   4 +-
>  31 files changed, 487 insertions(+), 60 deletions(-)
>  create mode 100644 tools/perf/perf-with-kcore.sh

Pulled into tip:perf/core, thanks a lot Arnaldo!

	Ingo

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
@ 2014-09-19  5:15   ` Ingo Molnar
  0 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2014-09-19  5:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexander Yarygin, Anton Blanchard,
	Avi Kivity, Chanho Park, Christian Borntraeger, Corey Ashford,
	David Ahern, david lerner, Don Zickus, Frederic Weisbecker,
	Jean Pihet, Jiri Olsa, John Spencer, Kyle McMartin,
	linux-perf-users, Masami Hiramatsu, Michael Ellerman,
	Mike Galbraith, Namhyung Kim, Paul Mackerras, Peter Zijlstra


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit c88f2096136416b261bd3647cc260935f6e95805:
> 
>   perf: Do not check PERF_EVENT_STATE_EXIT on syscall read path (2014-09-16 10:30:36 +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 e5685730e2c620f97bc12380e9370e857e5bd7a7:
> 
>   perf record: Use ring buffer consume method to look like other tools (2014-09-17 18:01:43 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> o Add +field argument support for --sort option (Jiri Olsa)
> 
> o Do not access kallsyms when analyzing user binaries with 'probe' (Masami Hiramatsu)
> 
> o Ignore stripped vmlinux and fallback to kallsyms (Anton Blanchard)
> 
> o Add path to Ubuntu kernel debuginfo file (Anton Blanchard)
> 
> o Disable kernel symbol demangling by default (Avi Kivity)
> 
> Infrastructure:
> 
> o More intel PT prep work, from Adrian Hunter, including:
> 
>   - Let a user specify a PMU event without any config terms
>   - Add perf-with-kcore script
>   - Let default config be defined for a PMU
>   - Add perf_pmu__scan_file()
> 
> o "perf kvm stat report" improvements by Alexander Yarygin:
>   o  Save pid string in opts.target.pid
>   o  Enable the target.system_wide flag
>   o  Unify the title bar output
> 
> o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)
> 
> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
> 
> o Fix build on ARM (Stephane Eranian)
> 
> o Fix build on powerpc when DWARF support is disabled (Anton Blanchard)
> 
> o Don't include sys/poll.h directly (Arnaldo Carvalho de Melo)
> 
> o Use ring buffer consume method to look like other tools (Arnaldo Carvalho de Melo)
> 
> Chanho Park (1):
>   perf tools: define _DEFAULT_SOURCE for glibc_2.20
> 
> o Allow to specify lib compile variable for spec usage (Jiri Olsa)
> 
> o Fix GNU-only grep usage in Makefile (John Spencer)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (4):
>       perf tools: Let a user specify a PMU event without any config terms
>       perf tools: Add perf-with-kcore script
>       perf tools: Let default config be defined for a PMU
>       perf tools: Add perf_pmu__scan_file()
> 
> Alexander Yarygin (3):
>       perf kvm stat report: Save pid string in opts.target.pid
>       perf kvm stat report: Enable the target.system_wide flag
>       perf kvm stat report: Unify the title bar output
> 
> Anton Blanchard (3):
>       perf tools powerpc: Fix build issue when DWARF support is disabled
>       perf symbols: Ignore stripped vmlinux and fallback to kallsyms
>       perf symbols: Add path to Ubuntu kernel debuginfo file
> 
> Arnaldo Carvalho de Melo (2):
>       perf tools: Don't include sys/poll.h directly
>       perf record: Use ring buffer consume method to look like other tools
> 
> Avi Kivity (1):
>       perf tools: Disable kernel symbol demangling by default
> 
> Chanho Park (1):
>       perf tools: define _DEFAULT_SOURCE for glibc_2.20
> 
> Jiri Olsa (2):
>       perf tools: Add +field argument support for --sort option
>       perf tools: Allow to specify lib compile variable for spec usage
> 
> John Spencer (1):
>       perf tools: Fix GNU-only grep usage in Makefile
> 
> Masami Hiramatsu (2):
>       perf probe: Do not access kallsyms when analyzing user binaries
>       perf probe: Do not use dwfl_module_addrsym if dwarf_diename finds symbol name
> 
> Stephane Eranian (1):
>       perf tool: fix compilation for ARM
> 
>  tools/perf/.gitignore                       |   1 +
>  tools/perf/Documentation/perf-probe.txt     |   3 +
>  tools/perf/Documentation/perf-report.txt    |   3 +
>  tools/perf/Documentation/perf-top.txt       |   3 +
>  tools/perf/Makefile.perf                    |   5 +-
>  tools/perf/arch/arm/tests/dwarf-unwind.c    |   1 +
>  tools/perf/arch/arm/util/unwind-libunwind.c |   1 +
>  tools/perf/arch/powerpc/Makefile            |   2 +-
>  tools/perf/bench/sched-messaging.c          |   2 +-
>  tools/perf/builtin-kvm.c                    |  23 +--
>  tools/perf/builtin-probe.c                  |   5 +-
>  tools/perf/builtin-record.c                 |   8 +-
>  tools/perf/builtin-report.c                 |   2 +
>  tools/perf/builtin-top.c                    |   4 +-
>  tools/perf/config/Makefile                  |  12 +-
>  tools/perf/config/utilities.mak             |   2 +-
>  tools/perf/perf-with-kcore.sh               | 259 ++++++++++++++++++++++++++++
>  tools/perf/tests/pmu.c                      |   2 +-
>  tools/perf/util/kvm-stat.h                  |   1 -
>  tools/perf/util/parse-events.c              |  13 +-
>  tools/perf/util/parse-events.y              |  10 ++
>  tools/perf/util/pmu.c                       |  79 +++++++--
>  tools/perf/util/pmu.h                       |  12 +-
>  tools/perf/util/probe-event.c               |   9 +-
>  tools/perf/util/probe-event.h               |   3 +-
>  tools/perf/util/probe-finder.c              |  16 +-
>  tools/perf/util/sort.c                      |  37 +++-
>  tools/perf/util/symbol-elf.c                |  15 +-
>  tools/perf/util/symbol.c                    |   9 +-
>  tools/perf/util/symbol.h                    |   1 +
>  tools/perf/util/util.h                      |   4 +-
>  31 files changed, 487 insertions(+), 60 deletions(-)
>  create mode 100644 tools/perf/perf-with-kcore.sh

Pulled into tip:perf/core, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2014-09-17 21:24 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-17 21:24 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Yarygin, Anton Blanchard, Avi Kivity, Chanho Park,
	Christian Borntraeger, Corey Ashford, David Ahern, david lerner,
	Don Zickus, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	John Spencer, Kyle McMartin, linux-perf-users, Masami Hiramatsu,
	Michael Ellerman, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, Sukadev Bhattiprolu,
	yrl.pp-manager.tt, Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit c88f2096136416b261bd3647cc260935f6e95805:

  perf: Do not check PERF_EVENT_STATE_EXIT on syscall read path (2014-09-16 10:30:36 +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 e5685730e2c620f97bc12380e9370e857e5bd7a7:

  perf record: Use ring buffer consume method to look like other tools (2014-09-17 18:01:43 -0300)

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

User visible:

o Add +field argument support for --sort option (Jiri Olsa)

o Do not access kallsyms when analyzing user binaries with 'probe' (Masami Hiramatsu)

o Ignore stripped vmlinux and fallback to kallsyms (Anton Blanchard)

o Add path to Ubuntu kernel debuginfo file (Anton Blanchard)

o Disable kernel symbol demangling by default (Avi Kivity)

Infrastructure:

o More intel PT prep work, from Adrian Hunter, including:

  - Let a user specify a PMU event without any config terms
  - Add perf-with-kcore script
  - Let default config be defined for a PMU
  - Add perf_pmu__scan_file()

o "perf kvm stat report" improvements by Alexander Yarygin:
  o  Save pid string in opts.target.pid
  o  Enable the target.system_wide flag
  o  Unify the title bar output

o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)

o Allow to specify lib compile variable for spec usage (Jiri Olsa)

o Fix build on ARM (Stephane Eranian)

o Fix build on powerpc when DWARF support is disabled (Anton Blanchard)

o Don't include sys/poll.h directly (Arnaldo Carvalho de Melo)

o Use ring buffer consume method to look like other tools (Arnaldo Carvalho de Melo)

Chanho Park (1):
  perf tools: define _DEFAULT_SOURCE for glibc_2.20

o Allow to specify lib compile variable for spec usage (Jiri Olsa)

o Fix GNU-only grep usage in Makefile (John Spencer)

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

----------------------------------------------------------------
Adrian Hunter (4):
      perf tools: Let a user specify a PMU event without any config terms
      perf tools: Add perf-with-kcore script
      perf tools: Let default config be defined for a PMU
      perf tools: Add perf_pmu__scan_file()

Alexander Yarygin (3):
      perf kvm stat report: Save pid string in opts.target.pid
      perf kvm stat report: Enable the target.system_wide flag
      perf kvm stat report: Unify the title bar output

Anton Blanchard (3):
      perf tools powerpc: Fix build issue when DWARF support is disabled
      perf symbols: Ignore stripped vmlinux and fallback to kallsyms
      perf symbols: Add path to Ubuntu kernel debuginfo file

Arnaldo Carvalho de Melo (2):
      perf tools: Don't include sys/poll.h directly
      perf record: Use ring buffer consume method to look like other tools

Avi Kivity (1):
      perf tools: Disable kernel symbol demangling by default

Chanho Park (1):
      perf tools: define _DEFAULT_SOURCE for glibc_2.20

Jiri Olsa (2):
      perf tools: Add +field argument support for --sort option
      perf tools: Allow to specify lib compile variable for spec usage

John Spencer (1):
      perf tools: Fix GNU-only grep usage in Makefile

Masami Hiramatsu (2):
      perf probe: Do not access kallsyms when analyzing user binaries
      perf probe: Do not use dwfl_module_addrsym if dwarf_diename finds symbol name

Stephane Eranian (1):
      perf tool: fix compilation for ARM

 tools/perf/.gitignore                       |   1 +
 tools/perf/Documentation/perf-probe.txt     |   3 +
 tools/perf/Documentation/perf-report.txt    |   3 +
 tools/perf/Documentation/perf-top.txt       |   3 +
 tools/perf/Makefile.perf                    |   5 +-
 tools/perf/arch/arm/tests/dwarf-unwind.c    |   1 +
 tools/perf/arch/arm/util/unwind-libunwind.c |   1 +
 tools/perf/arch/powerpc/Makefile            |   2 +-
 tools/perf/bench/sched-messaging.c          |   2 +-
 tools/perf/builtin-kvm.c                    |  23 +--
 tools/perf/builtin-probe.c                  |   5 +-
 tools/perf/builtin-record.c                 |   8 +-
 tools/perf/builtin-report.c                 |   2 +
 tools/perf/builtin-top.c                    |   4 +-
 tools/perf/config/Makefile                  |  12 +-
 tools/perf/config/utilities.mak             |   2 +-
 tools/perf/perf-with-kcore.sh               | 259 ++++++++++++++++++++++++++++
 tools/perf/tests/pmu.c                      |   2 +-
 tools/perf/util/kvm-stat.h                  |   1 -
 tools/perf/util/parse-events.c              |  13 +-
 tools/perf/util/parse-events.y              |  10 ++
 tools/perf/util/pmu.c                       |  79 +++++++--
 tools/perf/util/pmu.h                       |  12 +-
 tools/perf/util/probe-event.c               |   9 +-
 tools/perf/util/probe-event.h               |   3 +-
 tools/perf/util/probe-finder.c              |  16 +-
 tools/perf/util/sort.c                      |  37 +++-
 tools/perf/util/symbol-elf.c                |  15 +-
 tools/perf/util/symbol.c                    |   9 +-
 tools/perf/util/symbol.h                    |   1 +
 tools/perf/util/util.h                      |   4 +-
 31 files changed, 487 insertions(+), 60 deletions(-)
 create mode 100644 tools/perf/perf-with-kcore.sh

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2014-09-17 21:24 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-09-17 21:24 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexander Yarygin, Anton Blanchard, Avi Kivity, Chanho Park,
	Christian Borntraeger, Corey Ashford, David Ahern, david lerner,
	Don Zickus, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	John Spencer, Kyle McMartin, linux-perf-users, Masami Hiramatsu,
	Michael Ellerman, Mike Galbraith, Namhyung Kim, Paul Mackerras

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit c88f2096136416b261bd3647cc260935f6e95805:

  perf: Do not check PERF_EVENT_STATE_EXIT on syscall read path (2014-09-16 10:30:36 +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 e5685730e2c620f97bc12380e9370e857e5bd7a7:

  perf record: Use ring buffer consume method to look like other tools (2014-09-17 18:01:43 -0300)

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

User visible:

o Add +field argument support for --sort option (Jiri Olsa)

o Do not access kallsyms when analyzing user binaries with 'probe' (Masami Hiramatsu)

o Ignore stripped vmlinux and fallback to kallsyms (Anton Blanchard)

o Add path to Ubuntu kernel debuginfo file (Anton Blanchard)

o Disable kernel symbol demangling by default (Avi Kivity)

Infrastructure:

o More intel PT prep work, from Adrian Hunter, including:

  - Let a user specify a PMU event without any config terms
  - Add perf-with-kcore script
  - Let default config be defined for a PMU
  - Add perf_pmu__scan_file()

o "perf kvm stat report" improvements by Alexander Yarygin:
  o  Save pid string in opts.target.pid
  o  Enable the target.system_wide flag
  o  Unify the title bar output

o Fix build issue on powerpc when DWARF support is disabled (Anton Blanchard)

o Allow to specify lib compile variable for spec usage (Jiri Olsa)

o Fix build on ARM (Stephane Eranian)

o Fix build on powerpc when DWARF support is disabled (Anton Blanchard)

o Don't include sys/poll.h directly (Arnaldo Carvalho de Melo)

o Use ring buffer consume method to look like other tools (Arnaldo Carvalho de Melo)

Chanho Park (1):
  perf tools: define _DEFAULT_SOURCE for glibc_2.20

o Allow to specify lib compile variable for spec usage (Jiri Olsa)

o Fix GNU-only grep usage in Makefile (John Spencer)

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

----------------------------------------------------------------
Adrian Hunter (4):
      perf tools: Let a user specify a PMU event without any config terms
      perf tools: Add perf-with-kcore script
      perf tools: Let default config be defined for a PMU
      perf tools: Add perf_pmu__scan_file()

Alexander Yarygin (3):
      perf kvm stat report: Save pid string in opts.target.pid
      perf kvm stat report: Enable the target.system_wide flag
      perf kvm stat report: Unify the title bar output

Anton Blanchard (3):
      perf tools powerpc: Fix build issue when DWARF support is disabled
      perf symbols: Ignore stripped vmlinux and fallback to kallsyms
      perf symbols: Add path to Ubuntu kernel debuginfo file

Arnaldo Carvalho de Melo (2):
      perf tools: Don't include sys/poll.h directly
      perf record: Use ring buffer consume method to look like other tools

Avi Kivity (1):
      perf tools: Disable kernel symbol demangling by default

Chanho Park (1):
      perf tools: define _DEFAULT_SOURCE for glibc_2.20

Jiri Olsa (2):
      perf tools: Add +field argument support for --sort option
      perf tools: Allow to specify lib compile variable for spec usage

John Spencer (1):
      perf tools: Fix GNU-only grep usage in Makefile

Masami Hiramatsu (2):
      perf probe: Do not access kallsyms when analyzing user binaries
      perf probe: Do not use dwfl_module_addrsym if dwarf_diename finds symbol name

Stephane Eranian (1):
      perf tool: fix compilation for ARM

 tools/perf/.gitignore                       |   1 +
 tools/perf/Documentation/perf-probe.txt     |   3 +
 tools/perf/Documentation/perf-report.txt    |   3 +
 tools/perf/Documentation/perf-top.txt       |   3 +
 tools/perf/Makefile.perf                    |   5 +-
 tools/perf/arch/arm/tests/dwarf-unwind.c    |   1 +
 tools/perf/arch/arm/util/unwind-libunwind.c |   1 +
 tools/perf/arch/powerpc/Makefile            |   2 +-
 tools/perf/bench/sched-messaging.c          |   2 +-
 tools/perf/builtin-kvm.c                    |  23 +--
 tools/perf/builtin-probe.c                  |   5 +-
 tools/perf/builtin-record.c                 |   8 +-
 tools/perf/builtin-report.c                 |   2 +
 tools/perf/builtin-top.c                    |   4 +-
 tools/perf/config/Makefile                  |  12 +-
 tools/perf/config/utilities.mak             |   2 +-
 tools/perf/perf-with-kcore.sh               | 259 ++++++++++++++++++++++++++++
 tools/perf/tests/pmu.c                      |   2 +-
 tools/perf/util/kvm-stat.h                  |   1 -
 tools/perf/util/parse-events.c              |  13 +-
 tools/perf/util/parse-events.y              |  10 ++
 tools/perf/util/pmu.c                       |  79 +++++++--
 tools/perf/util/pmu.h                       |  12 +-
 tools/perf/util/probe-event.c               |   9 +-
 tools/perf/util/probe-event.h               |   3 +-
 tools/perf/util/probe-finder.c              |  16 +-
 tools/perf/util/sort.c                      |  37 +++-
 tools/perf/util/symbol-elf.c                |  15 +-
 tools/perf/util/symbol.c                    |   9 +-
 tools/perf/util/symbol.h                    |   1 +
 tools/perf/util/util.h                      |   4 +-
 31 files changed, 487 insertions(+), 60 deletions(-)
 create mode 100644 tools/perf/perf-with-kcore.sh

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2013-12-13 15:11 Arnaldo Carvalho de Melo
@ 2013-12-16 13:54 ` Ingo Molnar
  0 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2013-12-16 13:54 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Andi Kleen, Borislav Petkov, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Ramkumar Ramachandra, Stephane Eranian,
	Steven Rostedt, Arnaldo Carvalho de Melo


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

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> Regards,
> 
> - Arnaldo
> 
> The following changes since commit c7f2e3cd6c1f4932ccc4135d050eae3f7c7aef63:
> 
>   perf: Optimize ring-buffer write by depending on control dependencies (2013-12-11 15:53:22 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 41e12e580a7b0c151199f927193548b84d3e874c:
> 
>   tools lib traceevent: Refactor pevent_filter_match() to get rid of die() (2013-12-13 10:30:22 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> Fixes:
> 
> . Fix inverted error verification bug in thread__fork, from David Ahern.
> 
> New features:
> 
> . Shell completion for 'perf kvm', from Ramkumar Ramachandra.
> 
> Refactorings:
> 
> . Get rid of panic() like calls in libtraceevent, from Namyung Kim.
> 
> . Start carving out symbol parsing routines from perf, just moving routines to
>   topic files in tools/lib/symbol/, tools that want to use it need to integrate
>   it directly, i.e. no tools/lib/symbol/Makefile is provided.
> 
> . Assorted refactoring patches, moving code around and adding
>   utility evlist methods that will be used in the IPT patchset,
>   from Adrian Hunter.
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Adrian Hunter (5):
>       perf tools: Add perf_event_paranoid()
>       perf header: Allow header->data_offset to be predetermined
>       perf evlist: Add can_select_event() method
>       perf tools: Move mem_bswap32/64 to util.c
>       perf evlist: Add perf_evlist__to_front()
> 
> Arnaldo Carvalho de Melo (1):
>       tools lib symbol: Start carving out symbol parsing routines from perf
> 
> David Ahern (1):
>       perf tools: Fix inverted error verification bug in thread__fork
> 
> Namhyung Kim (12):
>       tools lib traceevent: Get rid of malloc_or_die() in show_error()
>       tools lib traceevent: Get rid of die in add_filter_type()
>       tools lib traceevent: Get rid of malloc_or_die() allocate_arg()
>       tools lib traceevent: Get rid of malloc_or_die() in read_token()
>       tools lib traceevent: Get rid of malloc_or_die() in find_event()
>       tools lib traceevent: Get rid of die() in add_right()
>       tools lib traceevent: Make add_left() return pevent_errno
>       tools lib traceevent: Get rid of die() in reparent_op_arg()
>       tools lib traceevent: Refactor create_arg_item()
>       tools lib traceevent: Refactor process_filter()
>       tools lib traceevent: Make pevent_filter_add_filter_str() return pevent_errno
>       tools lib traceevent: Refactor pevent_filter_match() to get rid of die()
> 
> Ramkumar Ramachandra (1):
>       perf completion: Complete 'perf kvm'
> 
>  tools/lib/symbol/kallsyms.c         |  58 +++++
>  tools/lib/symbol/kallsyms.h         |  24 ++
>  tools/lib/traceevent/event-parse.h  |  43 ++-
>  tools/lib/traceevent/parse-filter.c | 507 ++++++++++++++++++++++--------------
>  tools/perf/MANIFEST                 |   2 +
>  tools/perf/Makefile.perf            |   5 +
>  tools/perf/perf-completion.sh       |   4 +
>  tools/perf/util/event.c             |   1 +
>  tools/perf/util/evlist.c            |  20 +-
>  tools/perf/util/evlist.h            |   5 +
>  tools/perf/util/header.c            |   3 +-
>  tools/perf/util/machine.c           |   1 +
>  tools/perf/util/record.c            |  37 +++
>  tools/perf/util/session.c           |  21 --
>  tools/perf/util/session.h           |   2 -
>  tools/perf/util/symbol-elf.c        |   1 +
>  tools/perf/util/symbol.c            |  69 +----
>  tools/perf/util/symbol.h            |   3 -
>  tools/perf/util/thread.c            |   2 +-
>  tools/perf/util/util.c              |  41 +++
>  tools/perf/util/util.h              |   4 +
>  21 files changed, 550 insertions(+), 303 deletions(-)
>  create mode 100644 tools/lib/symbol/kallsyms.c
>  create mode 100644 tools/lib/symbol/kallsyms.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2013-12-13 15:11 Arnaldo Carvalho de Melo
  2013-12-16 13:54 ` Ingo Molnar
  0 siblings, 1 reply; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-12-13 15:11 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, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Ramkumar Ramachandra, Stephane Eranian,
	Steven Rostedt, Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>

Hi Ingo,

	Please consider pulling,

Regards,

- Arnaldo

The following changes since commit c7f2e3cd6c1f4932ccc4135d050eae3f7c7aef63:

  perf: Optimize ring-buffer write by depending on control dependencies (2013-12-11 15:53:22 +0100)

are available in the git repository at:

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

for you to fetch changes up to 41e12e580a7b0c151199f927193548b84d3e874c:

  tools lib traceevent: Refactor pevent_filter_match() to get rid of die() (2013-12-13 10:30:22 -0300)

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

Fixes:

. Fix inverted error verification bug in thread__fork, from David Ahern.

New features:

. Shell completion for 'perf kvm', from Ramkumar Ramachandra.

Refactorings:

. Get rid of panic() like calls in libtraceevent, from Namyung Kim.

. Start carving out symbol parsing routines from perf, just moving routines to
  topic files in tools/lib/symbol/, tools that want to use it need to integrate
  it directly, i.e. no tools/lib/symbol/Makefile is provided.

. Assorted refactoring patches, moving code around and adding
  utility evlist methods that will be used in the IPT patchset,
  from Adrian Hunter.

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

----------------------------------------------------------------
Adrian Hunter (5):
      perf tools: Add perf_event_paranoid()
      perf header: Allow header->data_offset to be predetermined
      perf evlist: Add can_select_event() method
      perf tools: Move mem_bswap32/64 to util.c
      perf evlist: Add perf_evlist__to_front()

Arnaldo Carvalho de Melo (1):
      tools lib symbol: Start carving out symbol parsing routines from perf

David Ahern (1):
      perf tools: Fix inverted error verification bug in thread__fork

Namhyung Kim (12):
      tools lib traceevent: Get rid of malloc_or_die() in show_error()
      tools lib traceevent: Get rid of die in add_filter_type()
      tools lib traceevent: Get rid of malloc_or_die() allocate_arg()
      tools lib traceevent: Get rid of malloc_or_die() in read_token()
      tools lib traceevent: Get rid of malloc_or_die() in find_event()
      tools lib traceevent: Get rid of die() in add_right()
      tools lib traceevent: Make add_left() return pevent_errno
      tools lib traceevent: Get rid of die() in reparent_op_arg()
      tools lib traceevent: Refactor create_arg_item()
      tools lib traceevent: Refactor process_filter()
      tools lib traceevent: Make pevent_filter_add_filter_str() return pevent_errno
      tools lib traceevent: Refactor pevent_filter_match() to get rid of die()

Ramkumar Ramachandra (1):
      perf completion: Complete 'perf kvm'

 tools/lib/symbol/kallsyms.c         |  58 +++++
 tools/lib/symbol/kallsyms.h         |  24 ++
 tools/lib/traceevent/event-parse.h  |  43 ++-
 tools/lib/traceevent/parse-filter.c | 507 ++++++++++++++++++++++--------------
 tools/perf/MANIFEST                 |   2 +
 tools/perf/Makefile.perf            |   5 +
 tools/perf/perf-completion.sh       |   4 +
 tools/perf/util/event.c             |   1 +
 tools/perf/util/evlist.c            |  20 +-
 tools/perf/util/evlist.h            |   5 +
 tools/perf/util/header.c            |   3 +-
 tools/perf/util/machine.c           |   1 +
 tools/perf/util/record.c            |  37 +++
 tools/perf/util/session.c           |  21 --
 tools/perf/util/session.h           |   2 -
 tools/perf/util/symbol-elf.c        |   1 +
 tools/perf/util/symbol.c            |  69 +----
 tools/perf/util/symbol.h            |   3 -
 tools/perf/util/thread.c            |   2 +-
 tools/perf/util/util.c              |  41 +++
 tools/perf/util/util.h              |   4 +
 21 files changed, 550 insertions(+), 303 deletions(-)
 create mode 100644 tools/lib/symbol/kallsyms.c
 create mode 100644 tools/lib/symbol/kallsyms.h

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2012-09-11 23:52 Arnaldo Carvalho de Melo
@ 2012-09-13 15:15 ` Ingo Molnar
  0 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2012-09-13 15:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Irina Tirdea,
	Jiri Olsa, Mike Galbraith, Namhyung Kim, Namhyung Kim,
	Paul Mackerras, Pekka Enberg, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt, arnaldo.melo, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> Best Regards,
> 
> - Arnaldo
> 
> The following changes since commit d5cb2aef4fda355fbafe8db4f425b73ea94d2019:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-09-09 10:39:14 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 9ec3f4e437ede2f3b5087d412abe16a0219b3b99:
> 
>   perf sched: Don't read all tracepoint variables in advance (2012-09-11 20:39:19 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes
> 
> . Remove die()/exit() calls from several tools.
> 
> . Add missing perf_regs.h file to MANIFEST
> 
> . Clean up and improve 'perf sched' performance by elliminating lots of
>   needless calls to libtraceevent.
> 
> . More patches to make perf build on Android, from Irina Tirdea
> 
> . Resolve vdso callchains, from Jiri Olsa
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (9):
>       perf test: Remove die() calls
>       perf sched: Remove die() calls
>       perf kmem: Remove die() calls
>       perf tools: Add missing perf_regs.h file to MANIFEST
>       perf sched: Remove unused thread parameter
>       perf sched: Use perf_tool as ancestor
>       perf evsel: Introduce perf_evsel__{str,int}val methods
>       perf sched: Use perf_evsel__{int,str}val
>       perf sched: Don't read all tracepoint variables in advance
> 
> Irina Tirdea (5):
>       perf tools: include wrapper for magic.h
>       perf tools: Update types definitions for Android
>       perf tools: include __WORDSIZE definition
>       perf tools: fix ALIGN redefinition in system headers
>       perf tools: Use __maybe_used for unused variables
> 
> Jiri Olsa (4):
>       perf tools: Do backtrace post unwind only if we regs and stack were captured
>       perf tools: Add memdup function
>       perf symbols: Make dsos__find function globally available
>       perf tools: Back [vdso] DSO with real data
> 
>  tools/lib/traceevent/event-parse.c                 |    8 +-
>  tools/lib/traceevent/event-parse.h                 |    4 +-
>  tools/perf/MANIFEST                                |    1 +
>  tools/perf/Makefile                                |    3 +
>  tools/perf/bench/bench.h                           |    3 +-
>  tools/perf/bench/mem-memcpy.c                      |    2 +-
>  tools/perf/bench/mem-memset.c                      |    2 +-
>  tools/perf/bench/sched-messaging.c                 |    2 +-
>  tools/perf/bench/sched-pipe.c                      |    6 +-
>  tools/perf/builtin-annotate.c                      |    2 +-
>  tools/perf/builtin-bench.c                         |    2 +-
>  tools/perf/builtin-buildid-cache.c                 |   10 +-
>  tools/perf/builtin-buildid-list.c                  |    3 +-
>  tools/perf/builtin-diff.c                          |    4 +-
>  tools/perf/builtin-evlist.c                        |    2 +-
>  tools/perf/builtin-help.c                          |    2 +-
>  tools/perf/builtin-inject.c                        |   24 +-
>  tools/perf/builtin-kmem.c                          |  130 +-
>  tools/perf/builtin-kvm.c                           |    2 +-
>  tools/perf/builtin-list.c                          |    2 +-
>  tools/perf/builtin-lock.c                          |    4 +-
>  tools/perf/builtin-probe.c                         |   24 +-
>  tools/perf/builtin-record.c                        |   10 +-
>  tools/perf/builtin-report.c                        |   11 +-
>  tools/perf/builtin-sched.c                         | 1446 +++++++++-----------
>  tools/perf/builtin-script.c                        |   29 +-
>  tools/perf/builtin-stat.c                          |   40 +-
>  tools/perf/builtin-test.c                          |   23 +-
>  tools/perf/builtin-timechart.c                     |   30 +-
>  tools/perf/builtin-top.c                           |    7 +-
>  tools/perf/ui/browser.c                            |    7 +-
>  tools/perf/ui/browsers/annotate.c                  |    6 +-
>  tools/perf/ui/gtk/browser.c                        |    5 +-
>  tools/perf/ui/gtk/setup.c                          |    2 +-
>  tools/perf/ui/gtk/util.c                           |    4 +-
>  tools/perf/ui/helpline.c                           |    2 +-
>  tools/perf/ui/helpline.h                           |    8 +-
>  tools/perf/ui/hist.c                               |   21 +-
>  tools/perf/ui/tui/setup.c                          |    4 +-
>  tools/perf/util/alias.c                            |    3 +-
>  tools/perf/util/annotate.c                         |    6 +-
>  tools/perf/util/annotate.h                         |   13 +-
>  tools/perf/util/build-id.c                         |   11 +-
>  tools/perf/util/cache.h                            |    6 +-
>  tools/perf/util/callchain.c                        |    6 +-
>  tools/perf/util/cgroup.c                           |    4 +-
>  tools/perf/util/config.c                           |    6 +-
>  tools/perf/util/debug.h                            |    9 +-
>  tools/perf/util/event.c                            |   29 +-
>  tools/perf/util/event.h                            |    2 +-
>  tools/perf/util/evsel.c                            |   35 +
>  tools/perf/util/evsel.h                            |    7 +
>  tools/perf/util/header.c                           |  177 ++-
>  tools/perf/util/header.h                           |    2 +-
>  tools/perf/util/help.c                             |    3 +-
>  tools/perf/util/hist.c                             |    2 +-
>  tools/perf/util/hist.h                             |   32 +-
>  tools/perf/util/include/linux/bitops.h             |    4 +
>  tools/perf/util/include/linux/compiler.h           |    8 +-
>  tools/perf/util/include/linux/kernel.h             |   13 +-
>  tools/perf/util/include/linux/magic.h              |   12 +
>  tools/perf/util/include/linux/string.h             |    2 +
>  tools/perf/util/include/linux/types.h              |    8 +
>  tools/perf/util/intlist.c                          |    4 +-
>  tools/perf/util/map.c                              |   12 +-
>  tools/perf/util/map.h                              |    2 +-
>  tools/perf/util/parse-events-test.c                |    6 +-
>  tools/perf/util/parse-events.c                     |    7 +-
>  tools/perf/util/parse-events.l                     |    2 +-
>  tools/perf/util/parse-events.y                     |    4 +-
>  tools/perf/util/parse-options.c                    |    3 +-
>  tools/perf/util/perf_regs.h                        |    2 +-
>  tools/perf/util/pmu.y                              |    6 +-
>  tools/perf/util/probe-event.c                      |   21 +-
>  tools/perf/util/probe-finder.c                     |    4 +-
>  tools/perf/util/python.c                           |    8 +-
>  .../perf/util/scripting-engines/trace-event-perl.c |    8 +-
>  .../util/scripting-engines/trace-event-python.c    |   10 +-
>  tools/perf/util/session.c                          |   61 +-
>  tools/perf/util/sort.c                             |   14 +-
>  tools/perf/util/string.c                           |   18 +-
>  tools/perf/util/symbol-minimal.c                   |   28 +-
>  tools/perf/util/symbol.c                           |    6 +-
>  tools/perf/util/symbol.h                           |    8 +-
>  tools/perf/util/trace-event-parse.c                |    4 +-
>  tools/perf/util/trace-event-scripting.c            |   33 +-
>  tools/perf/util/unwind.c                           |   36 +-
>  tools/perf/util/unwind.h                           |   11 +-
>  tools/perf/util/util.h                             |    2 +-
>  tools/perf/util/vdso.c                             |  111 ++
>  tools/perf/util/vdso.h                             |   18 +
>  tools/perf/util/wrapper.c                          |    3 +-
>  92 files changed, 1518 insertions(+), 1231 deletions(-)
>  create mode 100644 tools/perf/util/include/linux/magic.h
>  create mode 100644 tools/perf/util/vdso.c
>  create mode 100644 tools/perf/util/vdso.h

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2012-09-11 23:52 Arnaldo Carvalho de Melo
  2012-09-13 15:15 ` Ingo Molnar
  0 siblings, 1 reply; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-11 23:52 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Irina Tirdea, Jiri Olsa, Mike Galbraith,
	Namhyung Kim, Namhyung Kim, Paul Mackerras, Pekka Enberg,
	Peter Zijlstra, Stephane Eranian, Steven Rostedt, arnaldo.melo,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

Best Regards,

- Arnaldo

The following changes since commit d5cb2aef4fda355fbafe8db4f425b73ea94d2019:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2012-09-09 10:39:14 +0200)

are available in the git repository at:


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

for you to fetch changes up to 9ec3f4e437ede2f3b5087d412abe16a0219b3b99:

  perf sched: Don't read all tracepoint variables in advance (2012-09-11 20:39:19 -0300)

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

. Remove die()/exit() calls from several tools.

. Add missing perf_regs.h file to MANIFEST

. Clean up and improve 'perf sched' performance by elliminating lots of
  needless calls to libtraceevent.

. More patches to make perf build on Android, from Irina Tirdea

. Resolve vdso callchains, from Jiri Olsa

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (9):
      perf test: Remove die() calls
      perf sched: Remove die() calls
      perf kmem: Remove die() calls
      perf tools: Add missing perf_regs.h file to MANIFEST
      perf sched: Remove unused thread parameter
      perf sched: Use perf_tool as ancestor
      perf evsel: Introduce perf_evsel__{str,int}val methods
      perf sched: Use perf_evsel__{int,str}val
      perf sched: Don't read all tracepoint variables in advance

Irina Tirdea (5):
      perf tools: include wrapper for magic.h
      perf tools: Update types definitions for Android
      perf tools: include __WORDSIZE definition
      perf tools: fix ALIGN redefinition in system headers
      perf tools: Use __maybe_used for unused variables

Jiri Olsa (4):
      perf tools: Do backtrace post unwind only if we regs and stack were captured
      perf tools: Add memdup function
      perf symbols: Make dsos__find function globally available
      perf tools: Back [vdso] DSO with real data

 tools/lib/traceevent/event-parse.c                 |    8 +-
 tools/lib/traceevent/event-parse.h                 |    4 +-
 tools/perf/MANIFEST                                |    1 +
 tools/perf/Makefile                                |    3 +
 tools/perf/bench/bench.h                           |    3 +-
 tools/perf/bench/mem-memcpy.c                      |    2 +-
 tools/perf/bench/mem-memset.c                      |    2 +-
 tools/perf/bench/sched-messaging.c                 |    2 +-
 tools/perf/bench/sched-pipe.c                      |    6 +-
 tools/perf/builtin-annotate.c                      |    2 +-
 tools/perf/builtin-bench.c                         |    2 +-
 tools/perf/builtin-buildid-cache.c                 |   10 +-
 tools/perf/builtin-buildid-list.c                  |    3 +-
 tools/perf/builtin-diff.c                          |    4 +-
 tools/perf/builtin-evlist.c                        |    2 +-
 tools/perf/builtin-help.c                          |    2 +-
 tools/perf/builtin-inject.c                        |   24 +-
 tools/perf/builtin-kmem.c                          |  130 +-
 tools/perf/builtin-kvm.c                           |    2 +-
 tools/perf/builtin-list.c                          |    2 +-
 tools/perf/builtin-lock.c                          |    4 +-
 tools/perf/builtin-probe.c                         |   24 +-
 tools/perf/builtin-record.c                        |   10 +-
 tools/perf/builtin-report.c                        |   11 +-
 tools/perf/builtin-sched.c                         | 1446 +++++++++-----------
 tools/perf/builtin-script.c                        |   29 +-
 tools/perf/builtin-stat.c                          |   40 +-
 tools/perf/builtin-test.c                          |   23 +-
 tools/perf/builtin-timechart.c                     |   30 +-
 tools/perf/builtin-top.c                           |    7 +-
 tools/perf/ui/browser.c                            |    7 +-
 tools/perf/ui/browsers/annotate.c                  |    6 +-
 tools/perf/ui/gtk/browser.c                        |    5 +-
 tools/perf/ui/gtk/setup.c                          |    2 +-
 tools/perf/ui/gtk/util.c                           |    4 +-
 tools/perf/ui/helpline.c                           |    2 +-
 tools/perf/ui/helpline.h                           |    8 +-
 tools/perf/ui/hist.c                               |   21 +-
 tools/perf/ui/tui/setup.c                          |    4 +-
 tools/perf/util/alias.c                            |    3 +-
 tools/perf/util/annotate.c                         |    6 +-
 tools/perf/util/annotate.h                         |   13 +-
 tools/perf/util/build-id.c                         |   11 +-
 tools/perf/util/cache.h                            |    6 +-
 tools/perf/util/callchain.c                        |    6 +-
 tools/perf/util/cgroup.c                           |    4 +-
 tools/perf/util/config.c                           |    6 +-
 tools/perf/util/debug.h                            |    9 +-
 tools/perf/util/event.c                            |   29 +-
 tools/perf/util/event.h                            |    2 +-
 tools/perf/util/evsel.c                            |   35 +
 tools/perf/util/evsel.h                            |    7 +
 tools/perf/util/header.c                           |  177 ++-
 tools/perf/util/header.h                           |    2 +-
 tools/perf/util/help.c                             |    3 +-
 tools/perf/util/hist.c                             |    2 +-
 tools/perf/util/hist.h                             |   32 +-
 tools/perf/util/include/linux/bitops.h             |    4 +
 tools/perf/util/include/linux/compiler.h           |    8 +-
 tools/perf/util/include/linux/kernel.h             |   13 +-
 tools/perf/util/include/linux/magic.h              |   12 +
 tools/perf/util/include/linux/string.h             |    2 +
 tools/perf/util/include/linux/types.h              |    8 +
 tools/perf/util/intlist.c                          |    4 +-
 tools/perf/util/map.c                              |   12 +-
 tools/perf/util/map.h                              |    2 +-
 tools/perf/util/parse-events-test.c                |    6 +-
 tools/perf/util/parse-events.c                     |    7 +-
 tools/perf/util/parse-events.l                     |    2 +-
 tools/perf/util/parse-events.y                     |    4 +-
 tools/perf/util/parse-options.c                    |    3 +-
 tools/perf/util/perf_regs.h                        |    2 +-
 tools/perf/util/pmu.y                              |    6 +-
 tools/perf/util/probe-event.c                      |   21 +-
 tools/perf/util/probe-finder.c                     |    4 +-
 tools/perf/util/python.c                           |    8 +-
 .../perf/util/scripting-engines/trace-event-perl.c |    8 +-
 .../util/scripting-engines/trace-event-python.c    |   10 +-
 tools/perf/util/session.c                          |   61 +-
 tools/perf/util/sort.c                             |   14 +-
 tools/perf/util/string.c                           |   18 +-
 tools/perf/util/symbol-minimal.c                   |   28 +-
 tools/perf/util/symbol.c                           |    6 +-
 tools/perf/util/symbol.h                           |    8 +-
 tools/perf/util/trace-event-parse.c                |    4 +-
 tools/perf/util/trace-event-scripting.c            |   33 +-
 tools/perf/util/unwind.c                           |   36 +-
 tools/perf/util/unwind.h                           |   11 +-
 tools/perf/util/util.h                             |    2 +-
 tools/perf/util/vdso.c                             |  111 ++
 tools/perf/util/vdso.h                             |   18 +
 tools/perf/util/wrapper.c                          |    3 +-
 92 files changed, 1518 insertions(+), 1231 deletions(-)
 create mode 100644 tools/perf/util/include/linux/magic.h
 create mode 100644 tools/perf/util/vdso.c
 create mode 100644 tools/perf/util/vdso.h

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

* Re: [GIT PULL 00/20] perf/core improvements and fixes
  2012-07-05 15:44 Arnaldo Carvalho de Melo
@ 2012-07-06  8:22 ` Ingo Molnar
  0 siblings, 0 replies; 48+ messages in thread
From: Ingo Molnar @ 2012-07-06  8:22 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Borislav Petkov, Corey Ashford, David Ahern,
	Frederic Weisbecker, Jiri Olsa, Johannes Berg, Namhyung Kim,
	Namhyung Kim, Namhyung Kim, Paul Mackerras, Peter Huewe,
	Peter Zijlstra, Stephane Eranian, Steven Rostedt, Ulrich Drepper,
	Wolfgang Mauerer, arnaldo.melo, Arnaldo Carvalho de Melo


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

> Hi Ingo,
> 
> 	Please consider pulling, this one contains my first 
> merge, a pull request by Namhyung, please check if everything 
> is OK,
> 
> Thanks,
> 
> - Arnaldo
> 
> The following changes since commit 17d7a1123f0f6d532830152564cc812cc73db2f3:
> 
>   perf bench: Fix confused variable namings and descriptions in mem subsystem (2012-07-02 14:35:45 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
> 
> for you to fetch changes up to 81e9b994bb20716d1f6c47e048e4ae4a43de2f83:
> 
>   Merge tag 'libtraceevent-core-for-acme' of git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf into perf/core (2012-07-05 12:16:32 -0300)
> 
> ----------------------------------------------------------------
> 
> perf/core improvements and fixes:
> 
> . Preparatory patches to use hw events in PMU syntax, from Jiri Olsa
> 
> . Remaining backport of trace-cmd's libparseevent, from Namhyung Kim
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Arnaldo Carvalho de Melo (1):
>       Merge tag 'libtraceevent-core-for-acme' of git://git.kernel.org/.../namhyung/linux-perf into perf/core
> 
> Jiri Olsa (4):
>       perf test: Use ARRAY_SIZE in parse events tests
>       perf tools: Add empty rule for new line in event syntax parsing
>       perf tools: Split out PE_VALUE_SYM parsing token to SW and HW tokens
>       perf tools: Split event symbols arrays to hw and sw parts
> 
> Namhyung Kim (10):
>       tools lib traceevent: Fix printk_cmp()
>       tools lib traceevent: Introduce extend_token()
>       tools lib traceevent: Handle strdup failure cases
>       tools lib traceevent: Handle realloc() failure path
>       tools lib traceevent: Pass string type argument to args
>       tools lib traceevent: Do not call add_event() again if allocation failed
>       tools lib traceevent: Fix some comments
>       tools lib traceevent: Check result of malloc() during reading token
>       tools lib traceevent: Check return value of arg_to_str()
>       tools lib traceevent: Cleanup realloc use
> 
> Peter Huewe (1):
>       tools lib traceevent: Add missing break in make_bprint_args
> 
> Steven Rostedt (4):
>       tools lib traceevent: Let filtering numbers by string use function names
>       tools lib traceevent: Add support for "%.*s" in bprintk events
>       tools lib traceevent: Add support to show migrate disable counter
>       tools lib traceevent: Fix %pM print format arg handling
> 
> Wolfgang Mauerer (1):
>       tools lib traceevent: Fix trace_printk for long integers
> 
>  tools/lib/traceevent/event-parse.c  |  287 +++++++++++++++++++++++------------
>  tools/lib/traceevent/parse-filter.c |   86 +++++++----
>  tools/perf/util/parse-events-test.c |   29 ++--
>  tools/perf/util/parse-events.c      |  174 ++++++++++++++-------
>  tools/perf/util/parse-events.l      |    3 +-
>  tools/perf/util/parse-events.y      |   15 +-
>  6 files changed, 391 insertions(+), 203 deletions(-)

Pulled, thanks a lot Arnaldo! The commits from Namhyung Kim are 
looking good as well.

Thanks,

	Ingo

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

* [GIT PULL 00/20] perf/core improvements and fixes
@ 2012-07-05 15:44 Arnaldo Carvalho de Melo
  2012-07-06  8:22 ` Ingo Molnar
  0 siblings, 1 reply; 48+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-07-05 15:44 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Borislav Petkov,
	Corey Ashford, David Ahern, Frederic Weisbecker, Jiri Olsa,
	Johannes Berg, Namhyung Kim, Namhyung Kim, Namhyung Kim,
	Paul Mackerras, Peter Huewe, Peter Zijlstra, Stephane Eranian,
	Steven Rostedt, Ulrich Drepper, Wolfgang Mauerer, arnaldo.melo,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling, this one contains my first merge, a pull
request by Namhyung, please check if everything is OK,

Thanks,

- Arnaldo

The following changes since commit 17d7a1123f0f6d532830152564cc812cc73db2f3:

  perf bench: Fix confused variable namings and descriptions in mem subsystem (2012-07-02 14:35:45 -0300)

are available in the git repository at:

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

for you to fetch changes up to 81e9b994bb20716d1f6c47e048e4ae4a43de2f83:

  Merge tag 'libtraceevent-core-for-acme' of git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf into perf/core (2012-07-05 12:16:32 -0300)

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

perf/core improvements and fixes:

. Preparatory patches to use hw events in PMU syntax, from Jiri Olsa

. Remaining backport of trace-cmd's libparseevent, from Namhyung Kim

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

----------------------------------------------------------------
Arnaldo Carvalho de Melo (1):
      Merge tag 'libtraceevent-core-for-acme' of git://git.kernel.org/.../namhyung/linux-perf into perf/core

Jiri Olsa (4):
      perf test: Use ARRAY_SIZE in parse events tests
      perf tools: Add empty rule for new line in event syntax parsing
      perf tools: Split out PE_VALUE_SYM parsing token to SW and HW tokens
      perf tools: Split event symbols arrays to hw and sw parts

Namhyung Kim (10):
      tools lib traceevent: Fix printk_cmp()
      tools lib traceevent: Introduce extend_token()
      tools lib traceevent: Handle strdup failure cases
      tools lib traceevent: Handle realloc() failure path
      tools lib traceevent: Pass string type argument to args
      tools lib traceevent: Do not call add_event() again if allocation failed
      tools lib traceevent: Fix some comments
      tools lib traceevent: Check result of malloc() during reading token
      tools lib traceevent: Check return value of arg_to_str()
      tools lib traceevent: Cleanup realloc use

Peter Huewe (1):
      tools lib traceevent: Add missing break in make_bprint_args

Steven Rostedt (4):
      tools lib traceevent: Let filtering numbers by string use function names
      tools lib traceevent: Add support for "%.*s" in bprintk events
      tools lib traceevent: Add support to show migrate disable counter
      tools lib traceevent: Fix %pM print format arg handling

Wolfgang Mauerer (1):
      tools lib traceevent: Fix trace_printk for long integers

 tools/lib/traceevent/event-parse.c  |  287 +++++++++++++++++++++++------------
 tools/lib/traceevent/parse-filter.c |   86 +++++++----
 tools/perf/util/parse-events-test.c |   29 ++--
 tools/perf/util/parse-events.c      |  174 ++++++++++++++-------
 tools/perf/util/parse-events.l      |    3 +-
 tools/perf/util/parse-events.y      |   15 +-
 6 files changed, 391 insertions(+), 203 deletions(-)

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

end of thread, other threads:[~2017-03-28  5:46 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03  3:25 [GIT PULL 00/20] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 01/20] perf tools: Only include tsc file for x86 Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 02/20] perf tools: Compare JOBS to 0 after grep Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 03/20] perf stat: Report unsupported events properly Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 04/20] perf tools: Fix FORK after COMM when synthesizing records for pre-existing threads Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 05/20] perf tools: Fix build error on ARCH=i386/x86_64/sparc64 Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 06/20] perf record: Get rid of -l option from Documentation Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 07/20] perf record: Document --group option Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 08/20] perf tools: Add PERF-FEATURES to the .gitignore file Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 09/20] perf tools: Remove annoying extra message from the features build Arnaldo Carvalho de Melo
2015-03-03  3:25 ` [PATCH 10/20] perf tools: Improve Python feature detection messages Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 11/20] perf tools: Improve libperl detection message Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 12/20] perf tools: Improve libbfd " Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 13/20] perf tools: Improve feature test debuggability Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 14/20] perf tools: Improve 'libbabel' feature check failure message Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 15/20] perf probe: Warn if given uprobe event accesses memory on older kernel Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 16/20] perf probe: Remove bias offset to find probe point by address Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 17/20] perf tools: Initialize cpu set in pthread_attr_setaffinity_np feature test Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 18/20] Revert "perf: Remove the extra validity check on nr_pages" Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 19/20] perf tools: Reference count struct thread Arnaldo Carvalho de Melo
2015-03-03 13:42   ` Namhyung Kim
2015-03-03 13:57     ` Arnaldo Carvalho de Melo
2015-03-03  3:26 ` [PATCH 20/20] perf sched: No need to keep the session around Arnaldo Carvalho de Melo
2015-03-03  6:20 ` [GIT PULL 00/20] perf/core improvements and fixes Ingo Molnar
2015-03-10 10:03 ` Ingo Molnar
2015-03-10 14:03   ` Arnaldo Carvalho de Melo
2015-03-10 14:37     ` Ingo Molnar
2015-03-23 22:18   ` [RFC] propagating symtab load errors. was: " Arnaldo Carvalho de Melo
2015-03-24 13:16     ` Jiri Olsa
2015-03-24 15:05       ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2017-03-28  1:38 Arnaldo Carvalho de Melo
2017-03-28  5:45 ` Ingo Molnar
2017-03-24 14:57 Arnaldo Carvalho de Melo
2017-03-24 14:57 ` Arnaldo Carvalho de Melo
2017-03-24 18:39 ` Ingo Molnar
2017-03-24 18:39   ` Ingo Molnar
2016-12-05 21:37 Arnaldo Carvalho de Melo
2016-12-06  8:17 ` Ingo Molnar
2014-09-17 21:24 Arnaldo Carvalho de Melo
2014-09-17 21:24 ` Arnaldo Carvalho de Melo
2014-09-19  5:15 ` Ingo Molnar
2014-09-19  5:15   ` Ingo Molnar
2013-12-13 15:11 Arnaldo Carvalho de Melo
2013-12-16 13:54 ` Ingo Molnar
2012-09-11 23:52 Arnaldo Carvalho de Melo
2012-09-13 15:15 ` Ingo Molnar
2012-07-05 15:44 Arnaldo Carvalho de Melo
2012-07-06  8:22 ` Ingo Molnar

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.