[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170214111715.GC18546@krava>
Date: Tue, 14 Feb 2017 12:17:15 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Jan Stancek <jstancek@...hat.com>
Cc: linux-kernel@...r.kernel.org, peterz@...radead.org,
mingo@...hat.com, acme@...nel.org,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
mhiramat@...nel.org
Subject: Re: [PATCH v2 1/3] perf: add cpu__max_present_cpu()
On Mon, Feb 13, 2017 at 04:34:34PM +0100, Jan Stancek wrote:
> Similar to cpu__max_cpu() (which returns max possible CPU),
> returns max present CPU.
>
> Signed-off-by: Jan Stancek <jstancek@...hat.com>
> ---
> tools/perf/util/cpumap.c | 22 ++++++++++++++++++++++
> tools/perf/util/cpumap.h | 1 +
> 2 files changed, 23 insertions(+)
>
> diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
> index 2c0b52264a46..8c7504939113 100644
> --- a/tools/perf/util/cpumap.c
> +++ b/tools/perf/util/cpumap.c
> @@ -9,6 +9,7 @@
> #include "asm/bug.h"
>
> static int max_cpu_num;
> +static int max_present_cpu_num;
I think it'd be less confusing for me if we follow the kernel names here
static int max_cpu_possible;
static int max_cpu_present;
also I wonder we should use
static int max_cpu_online;
instead of:
sysconf(_SC_NPROCESSORS_ONLN)
but we can do it all later on as follow up
jirka
Powered by blists - more mailing lists