perf tools: Use getconf to determine number of online CPUs
perf tools: Use getconf to determine number of online CPUs

Parsing /proc/cpuinfo is a fiddly, arch-dependent business and a recent
change to get it working for Sparc broke arm and arm64 platforms.

Use sysconf to determine the number of online CPUs only parsing
/proc/cpuinfo when sysconf is not available.

Signed-off-by: Will Deacon <b913f13ef92ac157955c954ccaaff7be065faba4@arm.com>
Acked-by: Jiri Olsa <2c6594f608aa3d41e98d48846a6328831f7084ad@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com>
Cc: David Ahern <a1d8233fd86825f7850db1646a4fb5e4cbf37b9e@oracle.com>
Cc: Mark Rutland <f6cd74ed30b6681612e2d22834357076246999db@arm.com>
Cc: Namhyung Kim <5c915a589b3ddf58cebf14bec41bcc143b37ac3c@kernel.org>
Link: 4111258698cda3a7fa5632337c64804b643f57e4@arm.com
[ Made it fall back to parsing /proc when getconf not found ]
Signed-off-by: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs