Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_TASKSTATS_H |
| 20 | #define _LINUX_TASKSTATS_H |
| 21 | #include <linux/types.h> |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame] | 22 | #define TASKSTATS_VERSION 13 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define TS_COMM_LEN 32 |
| 24 | struct taskstats { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 25 | __u16 version; |
| 26 | __u32 ac_exitcode; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __u8 ac_flag; |
| 28 | __u8 ac_nice; |
| 29 | __u64 cpu_count __attribute__((aligned(8))); |
| 30 | __u64 cpu_delay_total; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __u64 blkio_count; |
| 32 | __u64 blkio_delay_total; |
| 33 | __u64 swapin_count; |
| 34 | __u64 swapin_delay_total; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u64 cpu_run_real_total; |
| 36 | __u64 cpu_run_virtual_total; |
| 37 | char ac_comm[TS_COMM_LEN]; |
| 38 | __u8 ac_sched __attribute__((aligned(8))); |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | __u8 ac_pad[3]; |
| 40 | __u32 ac_uid __attribute__((aligned(8))); |
| 41 | __u32 ac_gid; |
| 42 | __u32 ac_pid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __u32 ac_ppid; |
| 44 | __u32 ac_btime; |
| 45 | __u64 ac_etime __attribute__((aligned(8))); |
| 46 | __u64 ac_utime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __u64 ac_stime; |
| 48 | __u64 ac_minflt; |
| 49 | __u64 ac_majflt; |
| 50 | __u64 coremem; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | __u64 virtmem; |
| 52 | __u64 hiwater_rss; |
| 53 | __u64 hiwater_vm; |
| 54 | __u64 read_char; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | __u64 write_char; |
| 56 | __u64 read_syscalls; |
| 57 | __u64 write_syscalls; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 58 | #define TASKSTATS_HAS_IO_ACCOUNTING |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | __u64 read_bytes; |
| 60 | __u64 write_bytes; |
| 61 | __u64 cancelled_write_bytes; |
| 62 | __u64 nvcsw; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | __u64 nivcsw; |
| 64 | __u64 ac_utimescaled; |
| 65 | __u64 ac_stimescaled; |
| 66 | __u64 cpu_scaled_run_real_total; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | __u64 freepages_count; |
| 68 | __u64 freepages_delay_total; |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 69 | __u64 thrashing_count; |
| 70 | __u64 thrashing_delay_total; |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 71 | __u64 ac_btime64; |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 72 | __u64 compact_count; |
| 73 | __u64 compact_delay_total; |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame] | 74 | __u32 ac_tgid; |
| 75 | __u64 ac_tgetime __attribute__((aligned(8))); |
| 76 | __u64 ac_exe_dev; |
| 77 | __u64 ac_exe_inode; |
| 78 | __u64 wpcopy_count; |
| 79 | __u64 wpcopy_delay_total; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | }; |
| 81 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 82 | TASKSTATS_CMD_UNSPEC = 0, |
| 83 | TASKSTATS_CMD_GET, |
| 84 | TASKSTATS_CMD_NEW, |
| 85 | __TASKSTATS_CMD_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 86 | }; |
| 87 | #define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1) |
| 88 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 89 | TASKSTATS_TYPE_UNSPEC = 0, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 90 | TASKSTATS_TYPE_PID, |
| 91 | TASKSTATS_TYPE_TGID, |
| 92 | TASKSTATS_TYPE_STATS, |
| 93 | TASKSTATS_TYPE_AGGR_PID, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 94 | TASKSTATS_TYPE_AGGR_TGID, |
| 95 | TASKSTATS_TYPE_NULL, |
| 96 | __TASKSTATS_TYPE_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 97 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | #define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1) |
| 99 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 | TASKSTATS_CMD_ATTR_UNSPEC = 0, |
| 101 | TASKSTATS_CMD_ATTR_PID, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 102 | TASKSTATS_CMD_ATTR_TGID, |
| 103 | TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, |
| 104 | TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, |
| 105 | __TASKSTATS_CMD_ATTR_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 106 | }; |
| 107 | #define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1) |
| 108 | #define TASKSTATS_GENL_NAME "TASKSTATS" |
| 109 | #define TASKSTATS_GENL_VERSION 0x1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 110 | #endif |