util: kernel: Check whether adding cpu e/u/stime for TGID taskstat
authorDongwoo Lee <dwoo08.lee@samsung.com>
Tue, 26 Jul 2022 05:03:13 +0000 (14:03 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 27 Jul 2022 08:24:28 +0000 (17:24 +0900)
commitdb11c3bad1d717fc80421953c6b67e68485f3854
treecb01ae9fad0f75a6a83ea15838692c324a8f3ec7
parent07de2009a3690831b7522ca14c74ea3ea2368750
util: kernel: Check whether adding cpu e/u/stime for TGID taskstat

There are difference with information on TGID taskstat among kernel
version, because e/u/stime for TGID taskstat is only summarized after
commit in mainline linux 8c733420bdd5 ("taskstats: add e/u/stime for TGID command")
is applied.
So, now check TGID taskstat has zero value for e/u/stime at the
initialization, and, if so, those time is calculated by adding values
in PID taskstats.

Change-Id: I8916e754465102a6643aefb8937e763fc5d1ee7a
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
src/util/kernel.c