tizen 2.3 release
[framework/system/deviced.git] / src / logd / src / shared / logd-taskstats.h
1 /* taskstats.h - exporting per-task statistics
2  *
3  * Copyright (C) Shailabh Nagar, IBM Corp. 2006
4  *           (C) Balbir Singh,   IBM Corp. 2006
5  *           (C) Jay Lan,        SGI, 2006
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of version 2.1 of the GNU Lesser General Public License
9  * as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it would be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  */
15 /*
16  * This header was generated from a Linux kernel header
17  * "include/linux/taskstats.h", to make information necessary for userspace to
18  * call into the kernel available to logd. It contains only constants,
19  * structures, and macros generated from the original header, and thus,
20  * contains no copyrightable information.
21 */
22 /*
23  * Modification: Unused variable is changed to padding variable in taskstats
24  * and removed unused enum variable about TASKSTATS.
25  * Feb. 02th 2014
26  */
27
28
29 #ifndef _LINUX_TASKSTATS_H
30 #define _LINUX_TASKSTATS_H
31
32 #include <linux/types.h>
33
34 #define TS_COMM_LEN            32
35
36 struct taskstats {
37         __u16   version;
38         __u32   ac_exitcode;
39         __u8    ac_flag;
40         __u8    ac_nice;
41         __u64   cpu_count __attribute__((aligned(8)));
42         __u64   cpu_delay_total;
43         __u64   blkio_count;
44         __u64   blkio_delay_total;
45         __u64   swapin_count;
46         __u64   swapin_delay_total;
47         __u64   cpu_run_real_total;
48         __u64   cpu_run_virtual_total;
49         char    ac_comm[TS_COMM_LEN];
50         __u8    ac_sched __attribute__((aligned(8)));
51         __u8    ac_pad[3];
52         __u32   ac_uid __attribute__((aligned(8)));
53         __u32   ac_gid;
54         __u32   ac_pid;
55         __u32   ac_ppid;
56         __u32   ac_btime;
57         __u64   ac_etime __attribute__((aligned(8)));
58         __u64   ac_utime;
59         __u64   ac_stime;
60         __u64   ac_utime_power_cons;
61         __u64   ac_stime_power_cons;
62         __u64   extra_pad[20];
63 };
64
65 enum {
66         TASKSTATS_CMD_GET = 1,
67 };
68
69 enum {
70         TASKSTATS_TYPE_STATS = 3,
71         TASKSTATS_TYPE_AGGR_PID = 4,
72 };
73
74 enum {
75         TASKSTATS_CMD_ATTR_UNSPEC = 0,
76         TASKSTATS_CMD_ATTR_PID = 1,
77         TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 3,
78 };
79
80 #define TASKSTATS_GENL_NAME     "TASKSTATS"
81
82 #endif