perf machine: Add nr_cpus_avail()
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 21 Nov 2018 13:52:45 +0000 (15:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:10:50 +0000 (16:10 +0100)
commit5d390059eab4bc9b3bfcba01a214ab873514f578
treeab570e04d26a105d04b91719776b6bd8c0bfff84
parent4edc059bac38f8cb59a8e539fb36fe0b8d19c55e
perf machine: Add nr_cpus_avail()

commit 9cecca325ea879c84fcd31a5e609a514c1a1dbd1 upstream.

Add a function to return the number of the machine's available CPUs.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/1526986485-6562-5-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/util/env.c
tools/perf/util/env.h
tools/perf/util/machine.c
tools/perf/util/machine.h