Signed-off-by: tiozhang <zyhtheonly@yeah.net>
Signed-off-by: luffysong <zsfz_one@163.com>
if (status != 0)
return -1;
- if (report_sys_ctxt_switch)
- ps_submit_global_stat("contextswitch", value.derive);
+ ps_submit_global_stat("contextswitch", value.derive);
return 0;
}
#endif /*KERNEL_LINUX */
ps_submit_proc_list(ps_ptr);
read_fork_rate(buffer);
- read_sys_ctxt_switch(buffer);
- /* #endif KERNEL_LINUX */
+ if (report_sys_ctxt_switch)
+ read_sys_ctxt_switch(buffer);
+ /* #endif KERNEL_LINUX */
#elif HAVE_LIBKVM_GETPROCS && HAVE_STRUCT_KINFO_PROC_FREEBSD
int running = 0;