From 0e0b85de42e59f85c262d52743601ae13439f8a2 Mon Sep 17 00:00:00 2001 From: Peter Enderborg Date: Tue, 30 Jul 2019 09:32:39 +0200 Subject: 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 --- taskstats/taskstats.c | 7 +++++++ 1 file changed, 7 insertions(+) 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() { -- cgit v1.2.3