Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570015
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] perf: fix topology test on systems with sparse CPUs |
| Date | 2017-01-30 19:50 +0100 |
| Message-ID | <t5pbA-7p2-31@gated-at.bofh.it> (permalink) |
| References | <t5nt9-6kA-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jan 30, 2017 at 05:53:34PM +0100, Jan Stancek wrote:
SNIP
> diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
> index bb964e86b09d..0c2cae807a61 100644
> --- a/tools/perf/util/env.c
> +++ b/tools/perf/util/env.c
> @@ -60,29 +60,45 @@ int perf_env__set_cmdline(struct perf_env *env, int argc, const char *argv[])
>
> int perf_env__read_cpu_topology_map(struct perf_env *env)
> {
> - int cpu, nr_cpus;
> + int cpu, nr_cpus, i, err = 0;
> + struct cpu_map *map;
>
> if (env->cpu != NULL)
> return 0;
>
> - if (env->nr_cpus_avail == 0)
> - env->nr_cpus_avail = sysconf(_SC_NPROCESSORS_CONF);
> + map = cpu_map__new(NULL);
could you please put comment in here, explaining that
cpu_map__new(NULL) makes map with current online cpus
thanks,
jirka
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] perf: fix topology test on systems with sparse CPUs Jan Stancek <jstancek@redhat.com> - 2017-01-30 18:00 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-01-30 19:50 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jan Stancek <jstancek@redhat.com> - 2017-01-30 20:30 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jan Stancek <jstancek@redhat.com> - 2017-01-31 17:10 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-02-02 12:30 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jan Stancek <jstancek@redhat.com> - 2017-02-02 13:10 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-02-02 14:10 +0100
[PATCH v2 1/3] perf: add cpu__max_present_cpu() Jan Stancek <jstancek@redhat.com> - 2017-02-13 16:40 +0100
[PATCH v2 2/3] perf: make build_cpu_topology skip offline/absent CPUs Jan Stancek <jstancek@redhat.com> - 2017-02-13 16:40 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-02-02 12:40 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-01-30 19:50 +0100
Re: [PATCH] perf: fix topology test on systems with sparse CPUs Jiri Olsa <jolsa@redhat.com> - 2017-01-30 19:50 +0100
csiph-web