Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1228269 > unrolled thread
| Started by | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| First post | 2015-09-18 22:50 +0200 |
| Last post | 2015-09-19 01:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] perf record: adding dummy event before mapping Mathieu Poirier <mathieu.poirier@linaro.org> - 2015-09-18 22:50 +0200
Re: [PATCH] perf record: adding dummy event before mapping Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-18 23:00 +0200
Re: [PATCH] perf record: adding dummy event before mapping Mathieu Poirier <mathieu.poirier@linaro.org> - 2015-09-19 01:40 +0200
| From | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| Date | 2015-09-18 22:50 +0200 |
| Subject | [PATCH] perf record: adding dummy event before mapping |
| Message-ID | <qaaLv-58K-3@gated-at.bofh.it> |
The parameters of function 'perf_evsel__open()' in
'record_open()' have been changed to use the evsel's cpus and
threads rather than the evlist since:
commit d988d5ee6478 ("perf evlist: Open event on evsel cpus and threads")
This works fine for as long as all the events have been added to
the evlist before function 'perf_evlist__create_maps()' is called
since the latter will take care of pushing the cpus and threads of
the evlist to each of the evsel in the list.
As function 'auxtrace_record__options()' adds a "dummy:u" event to
the evlist it is important that it runs before
'perf_evlist__create_maps()'.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
tools/perf/builtin-record.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 142eeb341b29..630a7a8e3970 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1183,14 +1183,14 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
goto out_symbol_exit;
}
- err = -ENOMEM;
- if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
- usage_with_options(record_usage, record_options);
-
err = auxtrace_record__options(rec->itr, rec->evlist, &rec->opts);
if (err)
goto out_symbol_exit;
+ err = -ENOMEM;
+ if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
+ usage_with_options(record_usage, record_options);
+
if (record_opts__config(&rec->opts)) {
err = -EINVAL;
goto out_symbol_exit;
--
1.9.1
--
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 | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-09-18 23:00 +0200 |
| Message-ID | <qaaVc-5jV-9@gated-at.bofh.it> |
| In reply to | #1228269 |
Em Fri, Sep 18, 2015 at 02:42:04PM -0600, Mathieu Poirier escreveu:
> The parameters of function 'perf_evsel__open()' in
> 'record_open()' have been changed to use the evsel's cpus and
> threads rather than the evlist since:
>
> commit d988d5ee6478 ("perf evlist: Open event on evsel cpus and threads")
>
> This works fine for as long as all the events have been added to
> the evlist before function 'perf_evlist__create_maps()' is called
> since the latter will take care of pushing the cpus and threads of
> the evlist to each of the evsel in the list.
>
> As function 'auxtrace_record__options()' adds a "dummy:u" event to
> the evlist it is important that it runs before
> 'perf_evlist__create_maps()'.
What tree is this patch for? Please take a look at tip/master, there are
patches there that should address this issue, please report if not.
Namely, hey, it was already merged by Linus, see:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/tools
There is a set of very small patches by Adrian Hunter fixing the setting
of evsel->{cpus,threads}
Can you check with Linus's git repo? I bet you tried with 4.3-rc1?
- Arnaldo
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---
> tools/perf/builtin-record.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 142eeb341b29..630a7a8e3970 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -1183,14 +1183,14 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
> goto out_symbol_exit;
> }
>
> - err = -ENOMEM;
> - if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
> - usage_with_options(record_usage, record_options);
> -
> err = auxtrace_record__options(rec->itr, rec->evlist, &rec->opts);
> if (err)
> goto out_symbol_exit;
>
> + err = -ENOMEM;
> + if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
> + usage_with_options(record_usage, record_options);
> +
> if (record_opts__config(&rec->opts)) {
> err = -EINVAL;
> goto out_symbol_exit;
> --
> 1.9.1
--
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 | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| Date | 2015-09-19 01:40 +0200 |
| Message-ID | <qadq2-Ql-11@gated-at.bofh.it> |
| In reply to | #1228272 |
On 18 September 2015 at 14:49, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Em Fri, Sep 18, 2015 at 02:42:04PM -0600, Mathieu Poirier escreveu:
>> The parameters of function 'perf_evsel__open()' in
>> 'record_open()' have been changed to use the evsel's cpus and
>> threads rather than the evlist since:
>>
>> commit d988d5ee6478 ("perf evlist: Open event on evsel cpus and threads")
>>
>> This works fine for as long as all the events have been added to
>> the evlist before function 'perf_evlist__create_maps()' is called
>> since the latter will take care of pushing the cpus and threads of
>> the evlist to each of the evsel in the list.
>>
>> As function 'auxtrace_record__options()' adds a "dummy:u" event to
>> the evlist it is important that it runs before
>> 'perf_evlist__create_maps()'.
>
> What tree is this patch for? Please take a look at tip/master, there are
> patches there that should address this issue, please report if not.
>
> Namely, hey, it was already merged by Linus, see:
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/tools
>
> There is a set of very small patches by Adrian Hunter fixing the setting
> of evsel->{cpus,threads}
>
> Can you check with Linus's git repo? I bet you tried with 4.3-rc1?
Yes, it was for 4.3-rc1. I'll try tip and will get back to you if a
problem still exists.
>
> - Arnaldo
>
>> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>> ---
>> tools/perf/builtin-record.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
>> index 142eeb341b29..630a7a8e3970 100644
>> --- a/tools/perf/builtin-record.c
>> +++ b/tools/perf/builtin-record.c
>> @@ -1183,14 +1183,14 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
>> goto out_symbol_exit;
>> }
>>
>> - err = -ENOMEM;
>> - if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
>> - usage_with_options(record_usage, record_options);
>> -
>> err = auxtrace_record__options(rec->itr, rec->evlist, &rec->opts);
>> if (err)
>> goto out_symbol_exit;
>>
>> + err = -ENOMEM;
>> + if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0)
>> + usage_with_options(record_usage, record_options);
>> +
>> if (record_opts__config(&rec->opts)) {
>> err = -EINVAL;
>> goto out_symbol_exit;
>> --
>> 1.9.1
--
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