ANDROID: taskstats: track fsync syscalls

This adds a counter to the taskstats extended accounting fields, which
tracks the number of times fsync is called, and then plumbs it through
to the uid_sys_stats driver.

Bug: 120442023
Change-Id: I6c138de5b2332eea70f57e098134d1d141247b3f
Signed-off-by: Jin Qian <jinqian@google.com>
[AmitP: Refactored changes to align with changes from upstream commit
        9a07000400 ("sched/headers: Move CONFIG_TASK_XACCT bits from <linux/sched.h> to <linux/sched/xacct.h>")]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
[tkjos: Needed for storaged fsync accounting ("storaged --uid" and
        "storaged --task").]
[astrachan: This is modifying a userspace interface and should probably
            be reworked]
Signed-off-by: Alistair Strachan <astrachan@google.com>
This commit is contained in:
Jin Qian
2017-03-02 13:32:59 -08:00
committed by Todd Kjos
parent ecc74079f6
commit ad4b32c45d
6 changed files with 17 additions and 2 deletions

View File

@@ -97,6 +97,7 @@ static inline void task_chr_io_accounting_add(struct task_io_accounting *dst,
dst->wchar += src->wchar;
dst->syscr += src->syscr;
dst->syscw += src->syscw;
dst->syscfs += src->syscfs;
}
#else
static inline void task_chr_io_accounting_add(struct task_io_accounting *dst,