From: Seung-Woo Kim Date: Tue, 15 Dec 2020 05:59:47 +0000 (+0900) Subject: Report task io only when CONFIG_TASK_IO_ACCOUNTING is enabled X-Git-Tag: accepted/tizen/unified/20201222.122620~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69ea714cfdea286bedfc626e17fc4a1df4d28519;p=platform%2Fcore%2Fsystem%2Fstability-monitor-kmod-rpi3.git Report task io only when CONFIG_TASK_IO_ACCOUNTING is enabled If kernel does not have CONFIG_TASK_IO_ACCOUNTING, then it is not possbile to support task io usage. Reporting task io only when kernel has CONFIG_TASK_IO_ACCOUNTING, otherwise just report 0. Change-Id: I9b55c9bb85ae3b8900c04564481de7cef249289b Signed-off-by: Seung-Woo Kim --- diff --git a/kernel/proc-tsm.c b/kernel/proc-tsm.c index e86ec82..248aaa1 100644 --- a/kernel/proc-tsm.c +++ b/kernel/proc-tsm.c @@ -181,7 +181,11 @@ static int stability_monitor_show(struct seq_file *m, void *v) seq_put_decimal_ull(m, " ", cputime_to_usecs(utime + stime)); seq_put_decimal_ull(m, " ", PAGE_TO_KB(vm_rss)); seq_put_decimal_ll(m, " ", open_fds); +#ifdef CONFIG_TASK_IO_ACCOUNTING seq_put_decimal_ull(m, " ", task_ioac.read_bytes + task_ioac.write_bytes); +#else + seq_put_decimal_ull(m, " ", 0); +#endif seq_printf(m, "\n"); }