IOTop preference view
[lttngtop.git] / src / lttngtoptypes.h
CommitLineData
1fc22eb4
JD
1/*
2 * Copyright (C) 2011 Julien Desfossez
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
71bd7ce1
AM
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1fc22eb4
JD
16 */
17
18#ifndef LTTNGTOPTYPES_H
19#define LTTNGTOPTYPES_H
20
21#include <glib.h>
22
23struct lttngtop {
24 GPtrArray *process_table; /* struct processtop */
25 GPtrArray *files_table; /* struct files */
26 GPtrArray *cpu_table; /* struct cputime */
1fc22eb4
JD
27 unsigned long start;
28 unsigned long end;
29 unsigned int nbproc;
30 unsigned int nbnewproc;
31 unsigned int nbdeadproc;
32 unsigned int nbthreads;
33 unsigned int nbnewthreads;
34 unsigned int nbdeadthreads;
35 unsigned int nbfiles;
36 unsigned int nbnewfiles;
37 unsigned int nbclosedfiles;
38} lttngtop;
39
40struct processtop {
41 unsigned int puuid;
42 int pid;
43 char *comm;
44 int tid;
45 int ppid;
46 int oldpid;
47 int oldtid;
48 int oldppid;
49 unsigned long birth;
50 unsigned long death;
51 unsigned long lastactivity;
b093de8a 52 /* Files managing */
1fc22eb4 53 GPtrArray *process_files_table;
b093de8a 54 struct file_history *files_history;
1fc22eb4
JD
55 GPtrArray *threads;
56 GHashTable *perf;
57 struct processtop *threadparent;
b093de8a 58 /* IO calculting */
1fc22eb4
JD
59 unsigned long totalfileread;
60 unsigned long totalfilewrite;
b093de8a
MB
61 unsigned long fileread;
62 unsigned long filewrite;
63 struct syscalls *syscall_info;
1fc22eb4
JD
64 unsigned long totalcpunsec;
65 unsigned long threadstotalcpunsec;
1fc22eb4
JD
66};
67
68struct perfcounter
69{
70 unsigned long count;
71 int visible;
72 int sort;
73};
74
75struct cputime {
76 guint id;
77 struct processtop *current_task;
78 unsigned long task_start;
79 GHashTable *perf;
80};
81
82/*
83 * used for "relative seeks" (with fd, for example fs.lseek)
84 * and for "absolute seeks" (events occuring on a device without
85 * any link to a particular process)
86 */
87struct seeks {
88 unsigned long offset;
89 unsigned long count;
90};
91
92struct ioctls {
93 unsigned int command;
94 unsigned long count;
95};
96
97struct files {
98 struct processtop *ref;
99 unsigned int fuuid;
100 int fd;
101 char *name;
102 int oldfd;
103 int device;
104 int openmode;
ceb3a221 105 int flag;
1fc22eb4
JD
106 unsigned long openedat;
107 unsigned long closedat;
108 unsigned long lastaccess;
109 unsigned long read;
110 unsigned long write;
111 unsigned long nbpoll;
112 unsigned long nbselect;
113 unsigned long nbopen;
114 unsigned long nbclose;
115 //struct *seeks; /* relative seeks inside the file */
116 //struct *ioctls;
117 /* XXX : average wait time */
118};
119
b093de8a
MB
120struct file_history {
121 struct files *file;
122 struct file_history *next;
123};
124
1fc22eb4
JD
125struct sockets {
126 int fd;
127 int parent_fd; /* on accept a new fd is created from the bound socket */
128 int family;
129 int type;
130 int protocol;
131 int sock_address;
132 unsigned long openedat;
133 unsigned long closedat;
134 unsigned long bind_address;
135 unsigned long remote_address;
136 //struct *sock_options;
137};
138
139struct sock_options {
140 int name;
141 int value;
142};
143
144struct vmas {
145 unsigned long start;
146 unsigned long end;
147 unsigned long flags;
148 unsigned long prot;
149 char *description; /* filename or description if possible (stack, heap) */
150 unsigned long page_faults;
151};
152
153struct syscalls {
154 unsigned int id;
155 unsigned long count;
d67167cd 156 uint64_t cpu_id;
b093de8a
MB
157 unsigned int type;
158 unsigned int tid;
159 unsigned int fd;
1fc22eb4
JD
160};
161
162struct signals {
163 int dest_pid;
164 int id;
165 unsigned long count;
166};
167
b093de8a
MB
168struct file_info {
169 struct file_info *next;
170 char *name;
171 int fd;
172 int status;
1fc22eb4
JD
173};
174
3b15348c 175/* header for cputop display */
89f1e0d1 176struct header_view {
3b15348c
JD
177 char *title;
178 int visible;
179 int sort;
180 int reverse;
181};
182
1fc22eb4 183#endif /* LTTNGTOPTYPES_H */
This page took 0.044106 seconds and 4 git commands to generate.