aboutsummaryrefslogtreecommitdiffstats
path: root/trace-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'trace-cmd.c')
-rw-r--r--trace-cmd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/trace-cmd.c b/trace-cmd.c
index 6fbac8c..cce499a 100644
--- a/trace-cmd.c
+++ b/trace-cmd.c
@@ -981,6 +981,13 @@ static int count_cpus(void)
981 size_t n; 981 size_t n;
982 int r; 982 int r;
983 983
984 cpus = sysconf(_SC_NPROCESSORS_ONLN);
985 if (cpus > 0)
986 return cpus;
987
988 warning("sysconf could not determine number of CPUS");
989
990 /* Do the hack to figure out # of CPUS */
984 n = 1024; 991 n = 1024;
985 pn = &n; 992 pn = &n;
986 pbuf = buf; 993 pbuf = buf;