linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] perf test: Fixes
@ 2015-12-03  8:34 Jiri Olsa
  2015-12-03  8:34 ` [PATCH 1/7] perf test: Use machine__new_host in dwarf unwind test Jiri Olsa
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
	HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

hi,
we've got many failing tests, mainly due to commit:
  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

and recent bpf changes, sending fixes.

I think we should force running 'perf test' little more ;-)

thanks,
jirka


---
Jiri Olsa (7):
      perf test: Use machine__new_host in dwarf unwind test
      perf test: Use machine__new_host in mma thread lookup test
      perf test: Use machine__new_host in mma thread code reading test
      perf test: Fix cpus and thread maps refference in error path
      perf test: Prevent using bpf-output event in round trip name test
      perf test: Use machine__new_host in thread mg sharing test
      perf test: Create kernel maps properly for hist entries test

 tools/perf/tests/code-reading.c         | 14 +++++++++-----
 tools/perf/tests/dwarf-unwind.c         |  8 ++------
 tools/perf/tests/evsel-roundtrip-name.c | 11 +++++------
 tools/perf/tests/hists_common.c         |  7 +++++++
 tools/perf/tests/mmap-thread-lookup.c   |  6 ++----
 tools/perf/tests/thread-mg-share.c      |  7 +++----
 6 files changed, 28 insertions(+), 25 deletions(-)

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

* [PATCH 1/7] perf test: Use machine__new_host in dwarf unwind test
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
@ 2015-12-03  8:34 ` Jiri Olsa
  2015-12-08  4:31   ` [tip:perf/core] " tip-bot for Jiri Olsa
  2015-12-03  8:34 ` [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test Jiri Olsa
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
	HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

This is more straightforward than what we have now.

It also fixes segfault within machine__exit, that's caused
but not creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Link: http://lkml.kernel.org/n/tip-h20rqr6nyuqvcjqdmixvy9fn@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/dwarf-unwind.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c
index 3cce13b19cbb..1c5c0221cea2 100644
--- a/tools/perf/tests/dwarf-unwind.c
+++ b/tools/perf/tests/dwarf-unwind.c
@@ -160,14 +160,11 @@ static int krava_1(struct thread *thread)
 
 int test__dwarf_unwind(int subtest __maybe_unused)
 {
-	struct machines machines;
 	struct machine *machine;
 	struct thread *thread;
 	int err = -1;
 
-	machines__init(&machines);
-
-	machine = machines__find(&machines, HOST_KERNEL_ID);
+	machine = machine__new_host();
 	if (!machine) {
 		pr_err("Could not get machine\n");
 		return -1;
@@ -199,7 +196,6 @@ int test__dwarf_unwind(int subtest __maybe_unused)
 
  out:
 	machine__delete_threads(machine);
-	machine__exit(machine);
-	machines__exit(&machines);
+	machine__delete(machine);
 	return err;
 }
-- 
2.4.3


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

* [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
  2015-12-03  8:34 ` [PATCH 1/7] perf test: Use machine__new_host in dwarf unwind test Jiri Olsa
@ 2015-12-03  8:34 ` Jiri Olsa
  2015-12-04 13:22   ` Namhyung Kim
  2015-12-08  4:31   ` [tip:perf/core] perf test: Use machine__new_host in mmap " tip-bot for Jiri Olsa
  2015-12-03  8:34 ` [PATCH 3/7] perf test: Use machine__new_host in mma thread code reading test Jiri Olsa
                   ` (6 subsequent siblings)
  8 siblings, 2 replies; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
	HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

This is more straightforward than what we have now.

It also fixes segfault within machine__exit, that's caused
but not creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Link: http://lkml.kernel.org/n/tip-h20rqr6nyuqvcjqdmixvy9fn@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/mmap-thread-lookup.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c
index 6cdb97579c45..0c5ce44f723f 100644
--- a/tools/perf/tests/mmap-thread-lookup.c
+++ b/tools/perf/tests/mmap-thread-lookup.c
@@ -149,7 +149,6 @@ static int synth_process(struct machine *machine)
 
 static int mmap_events(synth_cb synth)
 {
-	struct machines machines;
 	struct machine *machine;
 	int err, i;
 
@@ -162,8 +161,7 @@ static int mmap_events(synth_cb synth)
 	 */
 	TEST_ASSERT_VAL("failed to create threads", !threads_create());
 
-	machines__init(&machines);
-	machine = &machines.host;
+	machine = machine__new_host();
 
 	dump_trace = verbose > 1 ? 1 : 0;
 
@@ -203,7 +201,7 @@ static int mmap_events(synth_cb synth)
 	}
 
 	machine__delete_threads(machine);
-	machines__exit(&machines);
+	machine__delete(machine);
 	return err;
 }
 
-- 
2.4.3


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

* [PATCH 3/7] perf test: Use machine__new_host in mma thread code reading test
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
  2015-12-03  8:34 ` [PATCH 1/7] perf test: Use machine__new_host in dwarf unwind test Jiri Olsa
  2015-12-03  8:34 ` [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test Jiri Olsa
@ 2015-12-03  8:34 ` Jiri Olsa
  2015-12-08  4:31   ` [tip:perf/core] perf test: Use machine__new_host in mmap " tip-bot for Jiri Olsa
  2015-12-03  8:34 ` [PATCH 4/7] perf test: Fix cpus and thread maps refference in error path Jiri Olsa
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
	HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

This is more straightforward than what we have now.

It also fixes segfault within machine__exit, that's caused
but not creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Link: http://lkml.kernel.org/n/tip-nztnkpyc65keceyenixkb21r@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/code-reading.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 4417b6a079f0..26182ffcea75 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -433,7 +433,6 @@ enum {
 
 static int do_test_code_reading(bool try_kcore)
 {
-	struct machines machines;
 	struct machine *machine;
 	struct thread *thread;
 	struct record_opts opts = {
@@ -459,8 +458,7 @@ static int do_test_code_reading(bool try_kcore)
 
 	pid = getpid();
 
-	machines__init(&machines);
-	machine = &machines.host;
+	machine = machine__new_host();
 
 	ret = machine__create_kernel_maps(machine);
 	if (ret < 0) {
@@ -594,9 +592,8 @@ out_err:
 		cpu_map__put(cpus);
 		thread_map__put(threads);
 	}
-	machines__destroy_kernel_maps(&machines);
 	machine__delete_threads(machine);
-	machines__exit(&machines);
+	machine__delete(machine);
 
 	return err;
 }
-- 
2.4.3


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

* [PATCH 4/7] perf test: Fix cpus and thread maps refference in error path
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
                   ` (2 preceding siblings ...)
  2015-12-03  8:34 ` [PATCH 3/7] perf test: Use machine__new_host in mma thread code reading test Jiri Olsa
@ 2015-12-03  8:34 ` Jiri Olsa
  2015-12-08  4:32   ` [tip:perf/core] perf test: Fix cpus and thread maps reference " tip-bot for Jiri Olsa
  2015-12-03  8:34 ` [PATCH 5/7] perf test: Prevent using bpf-output event in round trip name test Jiri Olsa
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
	HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

In error path to try user space event, both cpus and threads map
now owned by evlist and freed by perf_evlist__set_maps call.
Getting reference to keep them alive.

Link: http://lkml.kernel.org/n/tip-koezjafs5le3zd95crpz6d85@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/code-reading.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 26182ffcea75..313a48c6b2bc 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -547,6 +547,13 @@ static int do_test_code_reading(bool try_kcore)
 		if (ret < 0) {
 			if (!excl_kernel) {
 				excl_kernel = true;
+				/*
+				 * Both cpus and threads are now owned by evlist
+				 * and will be freed by following perf_evlist__set_maps
+				 * call. Getting refference to keep them alive.
+				 */
+				cpu_map__get(cpus);
+				thread_map__get(threads);
 				perf_evlist__set_maps(evlist, NULL, NULL);
 				perf_evlist__delete(evlist);
 				evlist = NULL;
-- 
2.4.3


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

* [PATCH 5/7] perf test: Prevent using bpf-output event in round trip name test
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
                   ` (3 preceding siblings ...)
  2015-12-03  8:34 ` [PATCH 4/7] perf test: Fix cpus and thread maps refference in error path Jiri Olsa
@ 2015-12-03  8:34 ` Jiri Olsa
  2015-12-08  4:32   ` [tip:perf/core] " tip-bot for Jiri Olsa
  2015-12-03  8:34 ` [PATCH 6/7] perf test: Use machine__new_host in thread mg sharing test Jiri Olsa
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
	HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

The bpf-output is added under software events, but is not
parse-able within parse_events, which is what round trip
test is expecting.

Checking software events only until dummy event.

Link: http://lkml.kernel.org/n/tip-oyz0zo99of6gd9axi5f99szm@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/evsel-roundtrip-name.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c
index 1da92e1159ee..97f3b7268a85 100644
--- a/tools/perf/tests/evsel-roundtrip-name.c
+++ b/tools/perf/tests/evsel-roundtrip-name.c
@@ -61,7 +61,7 @@ static int perf_evsel__roundtrip_cache_name_test(void)
 	return ret;
 }
 
-static int __perf_evsel__name_array_test(const char *names[], int nr_names)
+static int perf_evsel__name_array_test(const char *names[], int nr_names)
 {
 	int i, err;
 	struct perf_evsel *evsel;
@@ -92,18 +92,17 @@ out_delete_evlist:
 	return err;
 }
 
-#define perf_evsel__name_array_test(names) \
-	__perf_evsel__name_array_test(names, ARRAY_SIZE(names))
-
 int test__perf_evsel__roundtrip_name_test(int subtest __maybe_unused)
 {
 	int err = 0, ret = 0;
 
-	err = perf_evsel__name_array_test(perf_evsel__hw_names);
+	err = perf_evsel__name_array_test(perf_evsel__hw_names,
+					  ARRAY_SIZE(perf_evsel__hw_names));
 	if (err)
 		ret = err;
 
-	err = perf_evsel__name_array_test(perf_evsel__sw_names);
+	err = perf_evsel__name_array_test(perf_evsel__sw_names,
+					  PERF_COUNT_SW_DUMMY + 1);
 	if (err)
 		ret = err;
 
-- 
2.4.3


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

* [PATCH 6/7] perf test: Use machine__new_host in thread mg sharing test
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
                   ` (4 preceding siblings ...)
  2015-12-03  8:34 ` [PATCH 5/7] perf test: Prevent using bpf-output event in round trip name test Jiri Olsa
@ 2015-12-03  8:34 ` Jiri Olsa
  2015-12-03  8:34 ` [PATCH 7/7] perf test: Create kernel maps properly for hist entries test Jiri Olsa
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
	HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

This is more straightforward than what we have now.

It also fixes segfault within machine__exit, that's caused
but not creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Link: http://lkml.kernel.org/n/tip-61eqiawnxso51zdzeeraje5d@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/thread-mg-share.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/perf/tests/thread-mg-share.c b/tools/perf/tests/thread-mg-share.c
index 188b63140fc8..3e926e06fbd7 100644
--- a/tools/perf/tests/thread-mg-share.c
+++ b/tools/perf/tests/thread-mg-share.c
@@ -6,7 +6,6 @@
 
 int test__thread_mg_share(int subtest __maybe_unused)
 {
-	struct machines machines;
 	struct machine *machine;
 
 	/* thread group */
@@ -27,8 +26,7 @@ int test__thread_mg_share(int subtest __maybe_unused)
 	 * other  group (pid: 4, tids: 4, 5)
 	*/
 
-	machines__init(&machines);
-	machine = &machines.host;
+	machine = machine__new_host();
 
 	/* create process with 4 threads */
 	leader = machine__findnew_thread(machine, 0, 0);
@@ -93,6 +91,7 @@ int test__thread_mg_share(int subtest __maybe_unused)
 
 	thread__put(other);
 
-	machines__exit(&machines);
+	machine__delete_threads(machine);
+	machine__delete(machine);
 	return 0;
 }
-- 
2.4.3


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

* [PATCH 7/7] perf test: Create kernel maps properly for hist entries test
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
                   ` (5 preceding siblings ...)
  2015-12-03  8:34 ` [PATCH 6/7] perf test: Use machine__new_host in thread mg sharing test Jiri Olsa
@ 2015-12-03  8:34 ` Jiri Olsa
  2015-12-04 13:23   ` Namhyung Kim
  2015-12-03  9:09 ` [PATCH 0/7] perf test: Fixes Jiri Olsa
  2015-12-04 13:26 ` Namhyung Kim
  8 siblings, 1 reply; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  8:34 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: lkml, David Ahern, Ingo Molnar, Namhyung Kim, Peter Zijlstra,
	HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

It fixes segfault within machine__exit, that's caused
but not creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Link: http://lkml.kernel.org/n/tip-k4snzv5t4dvdckggzwdzyljo@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/hists_common.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
index ce80b274b097..6ccdc8ac9578 100644
--- a/tools/perf/tests/hists_common.c
+++ b/tools/perf/tests/hists_common.c
@@ -87,6 +87,11 @@ struct machine *setup_fake_machine(struct machines *machines)
 		return NULL;
 	}
 
+	if (machine__create_kernel_maps(machine)) {
+		pr_debug("Not enough memory for machine setup\n");
+		goto out_maps;
+	}
+
 	for (i = 0; i < ARRAY_SIZE(fake_threads); i++) {
 		struct thread *thread;
 
@@ -149,6 +154,8 @@ struct machine *setup_fake_machine(struct machines *machines)
 
 out:
 	pr_debug("Not enough memory for machine setup\n");
+
+out_maps:
 	machine__delete_threads(machine);
 	machine__delete(machine);
 	return NULL;
-- 
2.4.3


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

* Re: [PATCH 0/7] perf test: Fixes
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
                   ` (6 preceding siblings ...)
  2015-12-03  8:34 ` [PATCH 7/7] perf test: Create kernel maps properly for hist entries test Jiri Olsa
@ 2015-12-03  9:09 ` Jiri Olsa
  2015-12-04 13:26 ` Namhyung Kim
  8 siblings, 0 replies; 19+ messages in thread
From: Jiri Olsa @ 2015-12-03  9:09 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, lkml, David Ahern, Ingo Molnar,
	Namhyung Kim, Peter Zijlstra, HIRAMATU,MASAMI, Wang Nan,
	Adrian Hunter

On Thu, Dec 03, 2015 at 09:34:11AM +0100, Jiri Olsa wrote:
> hi,
> we've got many failing tests, mainly due to commit:
>   ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits
> 
> and recent bpf changes, sending fixes.
> 
> I think we should force running 'perf test' little more ;-)

Also available in:
  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
  perf/fixes

jirka

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

* Re: [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test
  2015-12-03  8:34 ` [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test Jiri Olsa
@ 2015-12-04 13:22   ` Namhyung Kim
  2015-12-06 16:05     ` Jiri Olsa
  2015-12-08  4:31   ` [tip:perf/core] perf test: Use machine__new_host in mmap " tip-bot for Jiri Olsa
  1 sibling, 1 reply; 19+ messages in thread
From: Namhyung Kim @ 2015-12-04 13:22 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, lkml, David Ahern, Ingo Molnar,
	Peter Zijlstra, HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

Hi Jiri,

In the subject, please do 's/mma/mmap/'.  Ditto for 3/7.

Thanks,
Namhyung


On Thu, Dec 03, 2015 at 09:34:13AM +0100, Jiri Olsa wrote:
> This is more straightforward than what we have now.
> 
> It also fixes segfault within machine__exit, that's caused
> but not creating kernel maps for machine.. We're calling
> machine__destroy_kernel_maps in machine__exit since commit:
> 
>   ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits
> 
> Link: http://lkml.kernel.org/n/tip-h20rqr6nyuqvcjqdmixvy9fn@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/tests/mmap-thread-lookup.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c
> index 6cdb97579c45..0c5ce44f723f 100644
> --- a/tools/perf/tests/mmap-thread-lookup.c
> +++ b/tools/perf/tests/mmap-thread-lookup.c
> @@ -149,7 +149,6 @@ static int synth_process(struct machine *machine)
>  
>  static int mmap_events(synth_cb synth)
>  {
> -	struct machines machines;
>  	struct machine *machine;
>  	int err, i;
>  
> @@ -162,8 +161,7 @@ static int mmap_events(synth_cb synth)
>  	 */
>  	TEST_ASSERT_VAL("failed to create threads", !threads_create());
>  
> -	machines__init(&machines);
> -	machine = &machines.host;
> +	machine = machine__new_host();
>  
>  	dump_trace = verbose > 1 ? 1 : 0;
>  
> @@ -203,7 +201,7 @@ static int mmap_events(synth_cb synth)
>  	}
>  
>  	machine__delete_threads(machine);
> -	machines__exit(&machines);
> +	machine__delete(machine);
>  	return err;
>  }
>  
> -- 
> 2.4.3
> 

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

* Re: [PATCH 7/7] perf test: Create kernel maps properly for hist entries test
  2015-12-03  8:34 ` [PATCH 7/7] perf test: Create kernel maps properly for hist entries test Jiri Olsa
@ 2015-12-04 13:23   ` Namhyung Kim
  2015-12-06 16:07     ` [PATCHv2 " Jiri Olsa
  0 siblings, 1 reply; 19+ messages in thread
From: Namhyung Kim @ 2015-12-04 13:23 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, lkml, David Ahern, Ingo Molnar,
	Peter Zijlstra, HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

On Thu, Dec 03, 2015 at 09:34:18AM +0100, Jiri Olsa wrote:
> It fixes segfault within machine__exit, that's caused
> but not creating kernel maps for machine.. We're calling
> machine__destroy_kernel_maps in machine__exit since commit:
> 
>   ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits
> 
> Link: http://lkml.kernel.org/n/tip-k4snzv5t4dvdckggzwdzyljo@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/tests/hists_common.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
> index ce80b274b097..6ccdc8ac9578 100644
> --- a/tools/perf/tests/hists_common.c
> +++ b/tools/perf/tests/hists_common.c
> @@ -87,6 +87,11 @@ struct machine *setup_fake_machine(struct machines *machines)
>  		return NULL;
>  	}
>  
> +	if (machine__create_kernel_maps(machine)) {
> +		pr_debug("Not enough memory for machine setup\n");
> +		goto out_maps;

Why not just doing 'goto out'?


> +	}
> +
>  	for (i = 0; i < ARRAY_SIZE(fake_threads); i++) {
>  		struct thread *thread;
>  
> @@ -149,6 +154,8 @@ struct machine *setup_fake_machine(struct machines *machines)
>  
>  out:
>  	pr_debug("Not enough memory for machine setup\n");
> +
> +out_maps:
>  	machine__delete_threads(machine);
>  	machine__delete(machine);
>  	return NULL;
> -- 
> 2.4.3
> 

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

* Re: [PATCH 0/7] perf test: Fixes
  2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
                   ` (7 preceding siblings ...)
  2015-12-03  9:09 ` [PATCH 0/7] perf test: Fixes Jiri Olsa
@ 2015-12-04 13:26 ` Namhyung Kim
  8 siblings, 0 replies; 19+ messages in thread
From: Namhyung Kim @ 2015-12-04 13:26 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Arnaldo Carvalho de Melo, lkml, David Ahern, Ingo Molnar,
	Peter Zijlstra, HIRAMATU,MASAMI, Wang Nan, Adrian Hunter

On Thu, Dec 03, 2015 at 09:34:11AM +0100, Jiri Olsa wrote:
> hi,
> we've got many failing tests, mainly due to commit:
>   ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits
> 
> and recent bpf changes, sending fixes.

I replied to each patch if I had something to say.  With that fixed,

Acked-by: Namhyung Kim <namhyung@kernel.org>

> 
> I think we should force running 'perf test' little more ;-)

Agreed.

Thanks,
Namhyung


> 
> 
> ---
> Jiri Olsa (7):
>       perf test: Use machine__new_host in dwarf unwind test
>       perf test: Use machine__new_host in mma thread lookup test
>       perf test: Use machine__new_host in mma thread code reading test
>       perf test: Fix cpus and thread maps refference in error path
>       perf test: Prevent using bpf-output event in round trip name test
>       perf test: Use machine__new_host in thread mg sharing test
>       perf test: Create kernel maps properly for hist entries test
> 
>  tools/perf/tests/code-reading.c         | 14 +++++++++-----
>  tools/perf/tests/dwarf-unwind.c         |  8 ++------
>  tools/perf/tests/evsel-roundtrip-name.c | 11 +++++------
>  tools/perf/tests/hists_common.c         |  7 +++++++
>  tools/perf/tests/mmap-thread-lookup.c   |  6 ++----
>  tools/perf/tests/thread-mg-share.c      |  7 +++----
>  6 files changed, 28 insertions(+), 25 deletions(-)

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

* Re: [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test
  2015-12-04 13:22   ` Namhyung Kim
@ 2015-12-06 16:05     ` Jiri Olsa
  0 siblings, 0 replies; 19+ messages in thread
From: Jiri Olsa @ 2015-12-06 16:05 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, lkml, David Ahern,
	Ingo Molnar, Peter Zijlstra, HIRAMATU,MASAMI, Wang Nan,
	Adrian Hunter

On Fri, Dec 04, 2015 at 10:22:15PM +0900, Namhyung Kim wrote:
> Hi Jiri,
> 
> In the subject, please do 's/mma/mmap/'.  Ditto for 3/7.

I updated that in the perf/fixes branch

Arnaldo please let me know if you need me to resend those again

thanks,
jirka

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

* [PATCHv2 7/7] perf test: Create kernel maps properly for hist entries test
  2015-12-04 13:23   ` Namhyung Kim
@ 2015-12-06 16:07     ` Jiri Olsa
  0 siblings, 0 replies; 19+ messages in thread
From: Jiri Olsa @ 2015-12-06 16:07 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Jiri Olsa, Arnaldo Carvalho de Melo, lkml, David Ahern,
	Ingo Molnar, Peter Zijlstra, HIRAMATU,MASAMI, Wang Nan,
	Adrian Hunter

On Fri, Dec 04, 2015 at 10:23:37PM +0900, Namhyung Kim wrote:
> On Thu, Dec 03, 2015 at 09:34:18AM +0100, Jiri Olsa wrote:
> > It fixes segfault within machine__exit, that's caused
> > but not creating kernel maps for machine.. We're calling
> > machine__destroy_kernel_maps in machine__exit since commit:
> > 
> >   ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits
> > 
> > Link: http://lkml.kernel.org/n/tip-k4snzv5t4dvdckggzwdzyljo@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> > ---
> >  tools/perf/tests/hists_common.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
> > index ce80b274b097..6ccdc8ac9578 100644
> > --- a/tools/perf/tests/hists_common.c
> > +++ b/tools/perf/tests/hists_common.c
> > @@ -87,6 +87,11 @@ struct machine *setup_fake_machine(struct machines *machines)
> >  		return NULL;
> >  	}
> >  
> > +	if (machine__create_kernel_maps(machine)) {
> > +		pr_debug("Not enough memory for machine setup\n");
> > +		goto out_maps;
> 
> Why not just doing 'goto out'?
> 

right.. v2 attached, perf-fixes branch updated

thanks,
jirka


---
Subject: [PATCH] perf test: Create kernel maps properly for hist entries test

It fixes segfault within machine__exit, that's caused
but not creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Link: http://lkml.kernel.org/n/tip-k4snzv5t4dvdckggzwdzyljo@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/hists_common.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
index ce80b274b097..46f453b1de60 100644
--- a/tools/perf/tests/hists_common.c
+++ b/tools/perf/tests/hists_common.c
@@ -87,6 +87,11 @@ struct machine *setup_fake_machine(struct machines *machines)
 		return NULL;
 	}
 
+	if (machine__create_kernel_maps(machine)) {
+		pr_debug("Not enough memory for machine setup\n");
+		goto out;
+	}
+
 	for (i = 0; i < ARRAY_SIZE(fake_threads); i++) {
 		struct thread *thread;
 
-- 
2.4.3


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

* [tip:perf/core] perf test: Use machine__new_host in dwarf unwind test
  2015-12-03  8:34 ` [PATCH 1/7] perf test: Use machine__new_host in dwarf unwind test Jiri Olsa
@ 2015-12-08  4:31   ` tip-bot for Jiri Olsa
  0 siblings, 0 replies; 19+ messages in thread
From: tip-bot for Jiri Olsa @ 2015-12-08  4:31 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: namhyung, hpa, tglx, dsahern, mingo, linux-kernel, jolsa,
	masami.hiramatsu.pt, wangnan0, acme, adrian.hunter, a.p.zijlstra

Commit-ID:  bdaba8aee5c3806d78ee4f130048b2238c636d47
Gitweb:     http://git.kernel.org/tip/bdaba8aee5c3806d78ee4f130048b2238c636d47
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Thu, 3 Dec 2015 09:34:12 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 7 Dec 2015 18:12:54 -0300

perf test: Use machine__new_host in dwarf unwind test

This is more straightforward than what we have now.

It also fixes a segfault within machine__exit, that's caused by not
creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1449131658-1841-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/dwarf-unwind.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c
index 3cce13b1..1c5c022 100644
--- a/tools/perf/tests/dwarf-unwind.c
+++ b/tools/perf/tests/dwarf-unwind.c
@@ -160,14 +160,11 @@ static int krava_1(struct thread *thread)
 
 int test__dwarf_unwind(int subtest __maybe_unused)
 {
-	struct machines machines;
 	struct machine *machine;
 	struct thread *thread;
 	int err = -1;
 
-	machines__init(&machines);
-
-	machine = machines__find(&machines, HOST_KERNEL_ID);
+	machine = machine__new_host();
 	if (!machine) {
 		pr_err("Could not get machine\n");
 		return -1;
@@ -199,7 +196,6 @@ int test__dwarf_unwind(int subtest __maybe_unused)
 
  out:
 	machine__delete_threads(machine);
-	machine__exit(machine);
-	machines__exit(&machines);
+	machine__delete(machine);
 	return err;
 }

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

* [tip:perf/core] perf test: Use machine__new_host in mmap thread lookup test
  2015-12-03  8:34 ` [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test Jiri Olsa
  2015-12-04 13:22   ` Namhyung Kim
@ 2015-12-08  4:31   ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 19+ messages in thread
From: tip-bot for Jiri Olsa @ 2015-12-08  4:31 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: wangnan0, tglx, jolsa, mingo, hpa, dsahern, adrian.hunter, acme,
	namhyung, a.p.zijlstra, linux-kernel, masami.hiramatsu.pt

Commit-ID:  046847935754f27c2e8334ff15abda0b733a1fd4
Gitweb:     http://git.kernel.org/tip/046847935754f27c2e8334ff15abda0b733a1fd4
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Thu, 3 Dec 2015 09:34:13 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 7 Dec 2015 18:12:54 -0300

perf test: Use machine__new_host in mmap thread lookup test

This is more straightforward than what we have now.

It also fixes a segfault within machine__exit, that's caused by not
creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@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: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1449131658-1841-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/mmap-thread-lookup.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c
index 6cdb975..0c5ce44 100644
--- a/tools/perf/tests/mmap-thread-lookup.c
+++ b/tools/perf/tests/mmap-thread-lookup.c
@@ -149,7 +149,6 @@ static int synth_process(struct machine *machine)
 
 static int mmap_events(synth_cb synth)
 {
-	struct machines machines;
 	struct machine *machine;
 	int err, i;
 
@@ -162,8 +161,7 @@ static int mmap_events(synth_cb synth)
 	 */
 	TEST_ASSERT_VAL("failed to create threads", !threads_create());
 
-	machines__init(&machines);
-	machine = &machines.host;
+	machine = machine__new_host();
 
 	dump_trace = verbose > 1 ? 1 : 0;
 
@@ -203,7 +201,7 @@ static int mmap_events(synth_cb synth)
 	}
 
 	machine__delete_threads(machine);
-	machines__exit(&machines);
+	machine__delete(machine);
 	return err;
 }
 

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

* [tip:perf/core] perf test: Use machine__new_host in mmap thread code reading test
  2015-12-03  8:34 ` [PATCH 3/7] perf test: Use machine__new_host in mma thread code reading test Jiri Olsa
@ 2015-12-08  4:31   ` tip-bot for Jiri Olsa
  0 siblings, 0 replies; 19+ messages in thread
From: tip-bot for Jiri Olsa @ 2015-12-08  4:31 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: namhyung, dsahern, adrian.hunter, linux-kernel, acme, mingo,
	jolsa, a.p.zijlstra, wangnan0, hpa, tglx, masami.hiramatsu.pt

Commit-ID:  0fd4008ed755c52d85117302a3c2c108b2958420
Gitweb:     http://git.kernel.org/tip/0fd4008ed755c52d85117302a3c2c108b2958420
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Thu, 3 Dec 2015 09:34:14 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 7 Dec 2015 18:12:55 -0300

perf test: Use machine__new_host in mmap thread code reading test

This is more straightforward than what we have now.

It also fixes a segfault within machine__exit, that's caused
by not creating kernel maps for machine.. We're calling
machine__destroy_kernel_maps in machine__exit since commit:

  ebe9729c8c31 perf machine: Fix to destroy kernel maps when machine exits

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1449131658-1841-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/code-reading.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 4417b6a..26182ff 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -433,7 +433,6 @@ enum {
 
 static int do_test_code_reading(bool try_kcore)
 {
-	struct machines machines;
 	struct machine *machine;
 	struct thread *thread;
 	struct record_opts opts = {
@@ -459,8 +458,7 @@ static int do_test_code_reading(bool try_kcore)
 
 	pid = getpid();
 
-	machines__init(&machines);
-	machine = &machines.host;
+	machine = machine__new_host();
 
 	ret = machine__create_kernel_maps(machine);
 	if (ret < 0) {
@@ -594,9 +592,8 @@ out_err:
 		cpu_map__put(cpus);
 		thread_map__put(threads);
 	}
-	machines__destroy_kernel_maps(&machines);
 	machine__delete_threads(machine);
-	machines__exit(&machines);
+	machine__delete(machine);
 
 	return err;
 }

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

* [tip:perf/core] perf test: Fix cpus and thread maps reference in error path
  2015-12-03  8:34 ` [PATCH 4/7] perf test: Fix cpus and thread maps refference in error path Jiri Olsa
@ 2015-12-08  4:32   ` tip-bot for Jiri Olsa
  0 siblings, 0 replies; 19+ messages in thread
From: tip-bot for Jiri Olsa @ 2015-12-08  4:32 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: hpa, adrian.hunter, namhyung, jolsa, acme, a.p.zijlstra, tglx,
	wangnan0, dsahern, masami.hiramatsu.pt, linux-kernel, mingo

Commit-ID:  7320b1b3d9e6af30adcbead64568be3c40b50e59
Gitweb:     http://git.kernel.org/tip/7320b1b3d9e6af30adcbead64568be3c40b50e59
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Thu, 3 Dec 2015 09:34:15 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 7 Dec 2015 18:12:55 -0300

perf test: Fix cpus and thread maps reference in error path

In error path to try user space event, both cpus and threads map now
owned by evlist and freed by perf_evlist__set_maps call.  Getting
reference to keep them alive.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1449131658-1841-5-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/code-reading.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 26182ff..313a48c 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -547,6 +547,13 @@ static int do_test_code_reading(bool try_kcore)
 		if (ret < 0) {
 			if (!excl_kernel) {
 				excl_kernel = true;
+				/*
+				 * Both cpus and threads are now owned by evlist
+				 * and will be freed by following perf_evlist__set_maps
+				 * call. Getting refference to keep them alive.
+				 */
+				cpu_map__get(cpus);
+				thread_map__get(threads);
 				perf_evlist__set_maps(evlist, NULL, NULL);
 				perf_evlist__delete(evlist);
 				evlist = NULL;

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

* [tip:perf/core] perf test: Prevent using bpf-output event in round trip name test
  2015-12-03  8:34 ` [PATCH 5/7] perf test: Prevent using bpf-output event in round trip name test Jiri Olsa
@ 2015-12-08  4:32   ` tip-bot for Jiri Olsa
  0 siblings, 0 replies; 19+ messages in thread
From: tip-bot for Jiri Olsa @ 2015-12-08  4:32 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: wangnan0, dsahern, mingo, namhyung, tglx, hpa,
	masami.hiramatsu.pt, acme, a.p.zijlstra, adrian.hunter,
	linux-kernel, jolsa

Commit-ID:  c0651c41e45dee1d6abb83fd5b25e7097aeac141
Gitweb:     http://git.kernel.org/tip/c0651c41e45dee1d6abb83fd5b25e7097aeac141
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Thu, 3 Dec 2015 09:34:16 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 7 Dec 2015 18:12:56 -0300

perf test: Prevent using bpf-output event in round trip name test

The bpf-output is added under software events, but is not parse-able
within parse_events, which is what round trip test is expecting.

Checking software events only until dummy event.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@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: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1449131658-1841-6-git-send-email-jolsa@kernel.org
[ Make it a one liner by keeping __perf_evsel__name_array_test() around ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/evsel-roundtrip-name.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c
index 1da92e1..2de4a4f 100644
--- a/tools/perf/tests/evsel-roundtrip-name.c
+++ b/tools/perf/tests/evsel-roundtrip-name.c
@@ -103,7 +103,8 @@ int test__perf_evsel__roundtrip_name_test(int subtest __maybe_unused)
 	if (err)
 		ret = err;
 
-	err = perf_evsel__name_array_test(perf_evsel__sw_names);
+	err = __perf_evsel__name_array_test(perf_evsel__sw_names,
+					    PERF_COUNT_SW_DUMMY + 1);
 	if (err)
 		ret = err;
 

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

end of thread, other threads:[~2015-12-08  4:33 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-03  8:34 [PATCH 0/7] perf test: Fixes Jiri Olsa
2015-12-03  8:34 ` [PATCH 1/7] perf test: Use machine__new_host in dwarf unwind test Jiri Olsa
2015-12-08  4:31   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-12-03  8:34 ` [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test Jiri Olsa
2015-12-04 13:22   ` Namhyung Kim
2015-12-06 16:05     ` Jiri Olsa
2015-12-08  4:31   ` [tip:perf/core] perf test: Use machine__new_host in mmap " tip-bot for Jiri Olsa
2015-12-03  8:34 ` [PATCH 3/7] perf test: Use machine__new_host in mma thread code reading test Jiri Olsa
2015-12-08  4:31   ` [tip:perf/core] perf test: Use machine__new_host in mmap " tip-bot for Jiri Olsa
2015-12-03  8:34 ` [PATCH 4/7] perf test: Fix cpus and thread maps refference in error path Jiri Olsa
2015-12-08  4:32   ` [tip:perf/core] perf test: Fix cpus and thread maps reference " tip-bot for Jiri Olsa
2015-12-03  8:34 ` [PATCH 5/7] perf test: Prevent using bpf-output event in round trip name test Jiri Olsa
2015-12-08  4:32   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-12-03  8:34 ` [PATCH 6/7] perf test: Use machine__new_host in thread mg sharing test Jiri Olsa
2015-12-03  8:34 ` [PATCH 7/7] perf test: Create kernel maps properly for hist entries test Jiri Olsa
2015-12-04 13:23   ` Namhyung Kim
2015-12-06 16:07     ` [PATCHv2 " Jiri Olsa
2015-12-03  9:09 ` [PATCH 0/7] perf test: Fixes Jiri Olsa
2015-12-04 13:26 ` Namhyung Kim

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