Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1282789 > unrolled thread
| Started by | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| First post | 2015-12-03 09:40 +0100 |
| Last post | 2015-12-04 14:30 +0100 |
| Articles | 15 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 0/7] perf test: Fixes Jiri Olsa <jolsa@kernel.org> - 2015-12-03 09:40 +0100
[PATCH 7/7] perf test: Create kernel maps properly for hist entries test Jiri Olsa <jolsa@kernel.org> - 2015-12-03 09:40 +0100
Re: [PATCH 7/7] perf test: Create kernel maps properly for hist entries test Namhyung Kim <namhyung@kernel.org> - 2015-12-04 14:30 +0100
[PATCHv2 7/7] perf test: Create kernel maps properly for hist entries test Jiri Olsa <jolsa@redhat.com> - 2015-12-06 17:10 +0100
[PATCH 3/7] perf test: Use machine__new_host in mma thread code reading test Jiri Olsa <jolsa@kernel.org> - 2015-12-03 09:40 +0100
[tip:perf/core] perf test: Use machine__new_host in mmap thread code reading test tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-12-08 05:40 +0100
[PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test Jiri Olsa <jolsa@kernel.org> - 2015-12-03 09:40 +0100
Re: [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test Namhyung Kim <namhyung@kernel.org> - 2015-12-04 14:30 +0100
Re: [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test Jiri Olsa <jolsa@redhat.com> - 2015-12-06 17:10 +0100
[tip:perf/core] perf test: Use machine__new_host in mmap thread lookup test tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-12-08 05:40 +0100
[PATCH 6/7] perf test: Use machine__new_host in thread mg sharing test Jiri Olsa <jolsa@kernel.org> - 2015-12-03 09:40 +0100
[PATCH 1/7] perf test: Use machine__new_host in dwarf unwind test Jiri Olsa <jolsa@kernel.org> - 2015-12-03 09:40 +0100
[tip:perf/core] perf test: Use machine__new_host in dwarf unwind test tip-bot for Jiri Olsa <tipbot@zytor.com> - 2015-12-08 05:40 +0100
Re: [PATCH 0/7] perf test: Fixes Jiri Olsa <jolsa@redhat.com> - 2015-12-03 10:20 +0100
Re: [PATCH 0/7] perf test: Fixes Namhyung Kim <namhyung@kernel.org> - 2015-12-04 14:30 +0100
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2015-12-03 09:40 +0100 |
| Subject | [PATCH 0/7] perf test: Fixes |
| Message-ID | <qBxAK-2vK-3@gated-at.bofh.it> |
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(-)
--
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]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2015-12-03 09:40 +0100 |
| Subject | [PATCH 7/7] perf test: Create kernel maps properly for hist entries test |
| Message-ID | <qBxAK-2vK-21@gated-at.bofh.it> |
| In reply to | #1282789 |
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
--
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]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2015-12-04 14:30 +0100 |
| Subject | Re: [PATCH 7/7] perf test: Create kernel maps properly for hist entries test |
| Message-ID | <qBYAW-3bA-3@gated-at.bofh.it> |
| In reply to | #1282790 |
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
>
--
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]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2015-12-06 17:10 +0100 |
| Subject | [PATCHv2 7/7] perf test: Create kernel maps properly for hist entries test |
| Message-ID | <qCK2R-GZ-3@gated-at.bofh.it> |
| In reply to | #1283811 |
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
--
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]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2015-12-03 09:40 +0100 |
| Subject | [PATCH 3/7] perf test: Use machine__new_host in mma thread code reading test |
| Message-ID | <qBxAK-2vK-17@gated-at.bofh.it> |
| In reply to | #1282789 |
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
--
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]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2015-12-08 05:40 +0100 |
| Subject | [tip:perf/core] perf test: Use machine__new_host in mmap thread code reading test |
| Message-ID | <qDiee-5VW-29@gated-at.bofh.it> |
| In reply to | #1282791 |
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;
}
--
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]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2015-12-03 09:40 +0100 |
| Subject | [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test |
| Message-ID | <qBxAL-2vK-29@gated-at.bofh.it> |
| In reply to | #1282789 |
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
--
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]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2015-12-04 14:30 +0100 |
| Subject | Re: [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test |
| Message-ID | <qBYAW-3bA-11@gated-at.bofh.it> |
| In reply to | #1282794 |
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
>
--
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]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2015-12-06 17:10 +0100 |
| Subject | Re: [PATCH 2/7] perf test: Use machine__new_host in mma thread lookup test |
| Message-ID | <qCK2R-GZ-1@gated-at.bofh.it> |
| In reply to | #1283813 |
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 -- 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]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2015-12-08 05:40 +0100 |
| Subject | [tip:perf/core] perf test: Use machine__new_host in mmap thread lookup test |
| Message-ID | <qDied-5VW-11@gated-at.bofh.it> |
| In reply to | #1282794 |
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;
}
--
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]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2015-12-03 09:40 +0100 |
| Subject | [PATCH 6/7] perf test: Use machine__new_host in thread mg sharing test |
| Message-ID | <qBxAL-2vK-27@gated-at.bofh.it> |
| In reply to | #1282789 |
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
--
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]
| From | Jiri Olsa <jolsa@kernel.org> |
|---|---|
| Date | 2015-12-03 09:40 +0100 |
| Subject | [PATCH 1/7] perf test: Use machine__new_host in dwarf unwind test |
| Message-ID | <qBxAL-2vK-39@gated-at.bofh.it> |
| In reply to | #1282789 |
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
--
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]
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Date | 2015-12-08 05:40 +0100 |
| Subject | [tip:perf/core] perf test: Use machine__new_host in dwarf unwind test |
| Message-ID | <qDiee-5VW-23@gated-at.bofh.it> |
| In reply to | #1282799 |
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;
}
--
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]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2015-12-03 10:20 +0100 |
| Message-ID | <qByds-30n-17@gated-at.bofh.it> |
| In reply to | #1282789 |
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 -- 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]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2015-12-04 14:30 +0100 |
| Message-ID | <qBYAW-3bA-17@gated-at.bofh.it> |
| In reply to | #1282789 |
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(-) -- 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