Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1286031 > unrolled thread

[GIT PULL 00/14] perf/core improvements and fixes

Started byArnaldo Carvalho de Melo <acme@kernel.org>
First post2015-12-07 23:30 +0100
Last post2015-12-08 05:30 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [GIT PULL 00/14] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-07 23:30 +0100
    [PATCH 11/14] perf stat: Use perf_evlist__enable in handle_initial_delay Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-07 23:30 +0100
    [PATCH 10/14] perf evlist: Factor perf_evlist__(enable|disable) functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-07 23:30 +0100
    [PATCH 08/14] perf evsel: Use event maps directly in perf_evsel__enable Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-12-07 23:30 +0100
    Re: [GIT PULL 00/14] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-12-08 05:30 +0100

#1286031 — [GIT PULL 00/14] perf/core improvements and fixes

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-12-07 23:30 +0100
Subject[GIT PULL 00/14] perf/core improvements and fixes
Message-ID<qDcit-2cp-3@gated-at.bofh.it>
From: Arnaldo Carvalho de Melo <acme@redhat.com>

Hi Ingo,

	Please consider pulling, will continue processing the backlog tomorrow,

Thanks,

- Arnaldo

The following changes since commit f1ad44884a4c421ceaa9a4a8242aeeee6f686670:

  perf/x86: Remove old MSR perf tracing code (2015-12-06 12:56:14 +0100)

are available in the git repository at:

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

for you to fetch changes up to cfef25b8daf7e4b49c84e174a904af9d89dc7c46:

  perf annotate: ARM support (2015-12-07 18:13:00 -0300)

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

User visible:

- Fixes and improvements for supporting annotating ARM binaries, support ARM
  call and jump instructions, more work needed to have arch specific stuff
  separated into tools/perf/arch/*/annotate/ (Russell King)

- Fix several 'perf test' entries broken by recent perf/core changes (Jiri Olsa)

Infrastructure:

- Consolidate perf_ev{list,sel}__{enable,disable}() calls (Jiri Olsa)

- Pass correct string to dso__adjust_kmod_long_name (Wang Nan)

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

----------------------------------------------------------------
Jiri Olsa (12):
      perf test: Use machine__new_host in dwarf unwind test
      perf test: Use machine__new_host in mmap thread lookup test
      perf test: Use machine__new_host in mmap thread code reading test
      perf test: Fix cpus and thread maps reference in error path
      perf test: Prevent using bpf-output event in round trip name test
      perf test: Create kernel maps properly for hist entries test
      perf evsel: Use event maps directly in perf_evsel__enable
      perf evsel: Introduce disable() method
      perf evlist: Factor perf_evlist__(enable|disable) functions
      perf stat: Use perf_evlist__enable in handle_initial_delay
      perf stat: Create events as disabled
      perf stat: Move enable_on_exec setup under earlier code

Russell King (1):
      perf annotate: ARM support

Wang Nan (1):
      perf machine: Pass correct string to dso__adjust_kmod_long_name

 tools/perf/builtin-stat.c               | 44 ++++++++++++++++++++-------------
 tools/perf/tests/code-reading.c         | 14 +++++++----
 tools/perf/tests/dwarf-unwind.c         |  8 ++----
 tools/perf/tests/evsel-roundtrip-name.c |  3 ++-
 tools/perf/tests/hists_common.c         |  5 ++++
 tools/perf/tests/mmap-thread-lookup.c   |  6 ++---
 tools/perf/util/annotate.c              | 23 +++++++++++++++++
 tools/perf/util/evlist.c                | 32 ++++++------------------
 tools/perf/util/evsel.c                 | 15 ++++++++++-
 tools/perf/util/evsel.h                 |  3 ++-
 tools/perf/util/machine.c               |  2 +-
 11 files changed, 95 insertions(+), 60 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1286034 — [PATCH 11/14] perf stat: Use perf_evlist__enable in handle_initial_delay

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-12-07 23:30 +0100
Subject[PATCH 11/14] perf stat: Use perf_evlist__enable in handle_initial_delay
Message-ID<qDcsb-2fH-33@gated-at.bofh.it>
In reply to#1286031
From: Jiri Olsa <jolsa@kernel.org>

No need to mimic the behaviour of perf_evlist__enable, we can use it
directly.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1449133606-14429-5-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-stat.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 813c52ad9303..8ca40deaa728 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -253,12 +253,9 @@ static void process_interval(void)
 
 static void handle_initial_delay(void)
 {
-	struct perf_evsel *counter;
-
 	if (initial_delay) {
 		usleep(initial_delay * 1000);
-		evlist__for_each(evsel_list, counter)
-			perf_evsel__enable(counter);
+		perf_evlist__enable(evsel_list);
 	}
 }
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1286035 — [PATCH 10/14] perf evlist: Factor perf_evlist__(enable|disable) functions

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-12-07 23:30 +0100
Subject[PATCH 10/14] perf evlist: Factor perf_evlist__(enable|disable) functions
Message-ID<qDcsb-2fH-37@gated-at.bofh.it>
In reply to#1286031
From: Jiri Olsa <jolsa@kernel.org>

Use perf_evsel__(enable|disable) functions in perf_evlist__(enable|disable)
functions in order to centralize ioctl enable/disable calls. This way we
eliminate 2 places calling directly ioctl.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1449133606-14429-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evlist.c | 32 ++++++++------------------------
 1 file changed, 8 insertions(+), 24 deletions(-)

diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index d1392194a9a9..d1b6c206bb93 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -336,20 +336,12 @@ static int perf_evlist__nr_threads(struct perf_evlist *evlist,
 
 void perf_evlist__disable(struct perf_evlist *evlist)
 {
-	int cpu, thread;
 	struct perf_evsel *pos;
-	int nr_cpus = cpu_map__nr(evlist->cpus);
-	int nr_threads;
 
-	for (cpu = 0; cpu < nr_cpus; cpu++) {
-		evlist__for_each(evlist, pos) {
-			if (!perf_evsel__is_group_leader(pos) || !pos->fd)
-				continue;
-			nr_threads = perf_evlist__nr_threads(evlist, pos);
-			for (thread = 0; thread < nr_threads; thread++)
-				ioctl(FD(pos, cpu, thread),
-				      PERF_EVENT_IOC_DISABLE, 0);
-		}
+	evlist__for_each(evlist, pos) {
+		if (!perf_evsel__is_group_leader(pos) || !pos->fd)
+			continue;
+		perf_evsel__disable(pos);
 	}
 
 	evlist->enabled = false;
@@ -357,20 +349,12 @@ void perf_evlist__disable(struct perf_evlist *evlist)
 
 void perf_evlist__enable(struct perf_evlist *evlist)
 {
-	int cpu, thread;
 	struct perf_evsel *pos;
-	int nr_cpus = cpu_map__nr(evlist->cpus);
-	int nr_threads;
 
-	for (cpu = 0; cpu < nr_cpus; cpu++) {
-		evlist__for_each(evlist, pos) {
-			if (!perf_evsel__is_group_leader(pos) || !pos->fd)
-				continue;
-			nr_threads = perf_evlist__nr_threads(evlist, pos);
-			for (thread = 0; thread < nr_threads; thread++)
-				ioctl(FD(pos, cpu, thread),
-				      PERF_EVENT_IOC_ENABLE, 0);
-		}
+	evlist__for_each(evlist, pos) {
+		if (!perf_evsel__is_group_leader(pos) || !pos->fd)
+			continue;
+		perf_evsel__enable(pos);
 	}
 
 	evlist->enabled = true;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1286040 — [PATCH 08/14] perf evsel: Use event maps directly in perf_evsel__enable

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2015-12-07 23:30 +0100
Subject[PATCH 08/14] perf evsel: Use event maps directly in perf_evsel__enable
Message-ID<qDcsb-2fH-47@gated-at.bofh.it>
In reply to#1286031
From: Jiri Olsa <jolsa@kernel.org>

All events now share proper cpu and thread maps. There's no need to pass
those maps from evlist, it's safe to use evsel maps for enabling event.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1449133606-14429-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-stat.c | 5 +----
 tools/perf/util/evsel.c   | 5 ++++-
 tools/perf/util/evsel.h   | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index df2fbf046ee2..813c52ad9303 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -256,12 +256,9 @@ static void handle_initial_delay(void)
 	struct perf_evsel *counter;
 
 	if (initial_delay) {
-		const int ncpus = cpu_map__nr(evsel_list->cpus),
-			nthreads = thread_map__nr(evsel_list->threads);
-
 		usleep(initial_delay * 1000);
 		evlist__for_each(evsel_list, counter)
-			perf_evsel__enable(counter, ncpus, nthreads);
+			perf_evsel__enable(counter);
 	}
 }
 
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 0a1f4d9e52fc..3a9b5068667d 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -981,8 +981,11 @@ int perf_evsel__append_filter(struct perf_evsel *evsel,
 	return -1;
 }
 
-int perf_evsel__enable(struct perf_evsel *evsel, int ncpus, int nthreads)
+int perf_evsel__enable(struct perf_evsel *evsel)
 {
+	int nthreads = thread_map__nr(evsel->threads);
+	int ncpus = cpu_map__nr(evsel->cpus);
+
 	return perf_evsel__run_ioctl(evsel, ncpus, nthreads,
 				     PERF_EVENT_IOC_ENABLE,
 				     0);
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 0e49bd742c63..a721592a3200 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -227,7 +227,7 @@ int perf_evsel__append_filter(struct perf_evsel *evsel,
 			      const char *op, const char *filter);
 int perf_evsel__apply_filter(struct perf_evsel *evsel, int ncpus, int nthreads,
 			     const char *filter);
-int perf_evsel__enable(struct perf_evsel *evsel, int ncpus, int nthreads);
+int perf_evsel__enable(struct perf_evsel *evsel);
 
 int perf_evsel__open_per_cpu(struct perf_evsel *evsel,
 			     struct cpu_map *cpus);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1286202

FromIngo Molnar <mingo@kernel.org>
Date2015-12-08 05:30 +0100
Message-ID<qDi4y-5SE-15@gated-at.bofh.it>
In reply to#1286031
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
> 	Please consider pulling, will continue processing the backlog tomorrow,
> 
> Thanks,
> 
> - Arnaldo
> 
> The following changes since commit f1ad44884a4c421ceaa9a4a8242aeeee6f686670:
> 
>   perf/x86: Remove old MSR perf tracing code (2015-12-06 12:56:14 +0100)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to cfef25b8daf7e4b49c84e174a904af9d89dc7c46:
> 
>   perf annotate: ARM support (2015-12-07 18:13:00 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fixes and improvements for supporting annotating ARM binaries, support ARM
>   call and jump instructions, more work needed to have arch specific stuff
>   separated into tools/perf/arch/*/annotate/ (Russell King)
> 
> - Fix several 'perf test' entries broken by recent perf/core changes (Jiri Olsa)
> 
> Infrastructure:
> 
> - Consolidate perf_ev{list,sel}__{enable,disable}() calls (Jiri Olsa)
> 
> - Pass correct string to dso__adjust_kmod_long_name (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Jiri Olsa (12):
>       perf test: Use machine__new_host in dwarf unwind test
>       perf test: Use machine__new_host in mmap thread lookup test
>       perf test: Use machine__new_host in mmap thread code reading test
>       perf test: Fix cpus and thread maps reference in error path
>       perf test: Prevent using bpf-output event in round trip name test
>       perf test: Create kernel maps properly for hist entries test
>       perf evsel: Use event maps directly in perf_evsel__enable
>       perf evsel: Introduce disable() method
>       perf evlist: Factor perf_evlist__(enable|disable) functions
>       perf stat: Use perf_evlist__enable in handle_initial_delay
>       perf stat: Create events as disabled
>       perf stat: Move enable_on_exec setup under earlier code
> 
> Russell King (1):
>       perf annotate: ARM support
> 
> Wang Nan (1):
>       perf machine: Pass correct string to dso__adjust_kmod_long_name
> 
>  tools/perf/builtin-stat.c               | 44 ++++++++++++++++++++-------------
>  tools/perf/tests/code-reading.c         | 14 +++++++----
>  tools/perf/tests/dwarf-unwind.c         |  8 ++----
>  tools/perf/tests/evsel-roundtrip-name.c |  3 ++-
>  tools/perf/tests/hists_common.c         |  5 ++++
>  tools/perf/tests/mmap-thread-lookup.c   |  6 ++---
>  tools/perf/util/annotate.c              | 23 +++++++++++++++++
>  tools/perf/util/evlist.c                | 32 ++++++------------------
>  tools/perf/util/evsel.c                 | 15 ++++++++++-
>  tools/perf/util/evsel.h                 |  3 ++-
>  tools/perf/util/machine.c               |  2 +-
>  11 files changed, 95 insertions(+), 60 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web