Report task io only when CONFIG_TASK_IO_ACCOUNTING is enabled 03/249603/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 15 Dec 2020 05:59:47 +0000 (14:59 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 15 Dec 2020 06:53:37 +0000 (15:53 +0900)
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 <sw0312.kim@samsung.com>
kernel/proc-tsm.c

index e86ec82..248aaa1 100644 (file)
@@ -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");
     }