summaryrefslogtreecommitdiff
path: root/taskstats
diff options
context:
space:
mode:
authorPeter Enderborg <peter.enderborg@sony.com>2019-07-30 09:32:39 +0200
committerEd Savage-Jones <edward.savage-jones@sony.com>2019-08-19 14:48:37 +0000
commit0e0b85de42e59f85c262d52743601ae13439f8a2 (patch)
tree1d992e0c5ce35b75eb05d50c08bdd1b0b4e06b6c /taskstats
parent3c9e6a09cac4acdc7310d9a30c382fe5c1c49f15 (diff)
downloadextras-0e0b85de42e59f85c262d52743601ae13439f8a2.tar.gz
Add support for new taskstats v9 functionality
Kernel ABI for taskstats has been uptated to version 9. Thrashing data is the base for PSI used by userspace lmk, so good to expose here for debugging purposes. Issue: 139647514 Test: manual Change-Id: Ifddb40537abaf10908426b3cd5c0dc177f69ee56
Diffstat (limited to 'taskstats')
-rw-r--r--taskstats/taskstats.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/taskstats/taskstats.c b/taskstats/taskstats.c
index 361e99f5..f2cf16f7 100644
--- a/taskstats/taskstats.c
+++ b/taskstats/taskstats.c
@@ -234,6 +234,13 @@ void print_task_stats(const struct TaskStatistics* stats,
printf("--------------------------\n");
printf("%-25s%llu\n", "Voluntary switches:", s->nvcsw);
printf("%-25s%llu\n", "Involuntary switches:", s->nivcsw);
+
+#if TASKSTATS_VERSION > 8
+ if (s->version > 8) {
+ printf("%-25s%llu\n", "Thrashing count:", s->thrashing_count);
+ printf("%-25s%llu\n", "Thrashing delay total:", s->thrashing_delay_total);
+ }
+#endif
}
void print_usage() {