Fix FSF address in license headers
[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 */
27 GHashTable *perf_list; /* struct perfcounter */
28 unsigned long start;
29 unsigned long end;
30 unsigned int nbproc;
31 unsigned int nbnewproc;
32 unsigned int nbdeadproc;
33 unsigned int nbthreads;
34 unsigned int nbnewthreads;
35 unsigned int nbdeadthreads;
36 unsigned int nbfiles;
37 unsigned int nbnewfiles;
38 unsigned int nbclosedfiles;
39} lttngtop;
40
41struct processtop {
42 unsigned int puuid;
43 int pid;
44 char *comm;
45 int tid;
46 int ppid;
47 int oldpid;
48 int oldtid;
49 int oldppid;
50 unsigned long birth;
51 unsigned long death;
52 unsigned long lastactivity;
b093de8a 53 /* Files managing */
1fc22eb4 54 GPtrArray *process_files_table;
b093de8a 55 struct file_history *files_history;
1fc22eb4
JD
56 GPtrArray *threads;
57 GHashTable *perf;
58 struct processtop *threadparent;
b093de8a 59 /* IO calculting */
1fc22eb4
JD
60 unsigned long totalfileread;
61 unsigned long totalfilewrite;
b093de8a
MB
62 unsigned long fileread;
63 unsigned long filewrite;
64 struct syscalls *syscall_info;
1fc22eb4
JD
65 unsigned long totalcpunsec;
66 unsigned long threadstotalcpunsec;
1fc22eb4
JD
67};
68
69struct perfcounter
70{
71 unsigned long count;
72 int visible;
73 int sort;
74};
75
76struct cputime {
77 guint id;
78 struct processtop *current_task;
79 unsigned long task_start;
80 GHashTable *perf;
81};
82
83/*
84 * used for "relative seeks" (with fd, for example fs.lseek)
85 * and for "absolute seeks" (events occuring on a device without
86 * any link to a particular process)
87 */
88struct seeks {
89 unsigned long offset;
90 unsigned long count;
91};
92
93struct ioctls {
94 unsigned int command;
95 unsigned long count;
96};
97
98struct files {
99 struct processtop *ref;
100 unsigned int fuuid;
101 int fd;
102 char *name;
103 int oldfd;
104 int device;
105 int openmode;
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
175#endif /* LTTNGTOPTYPES_H */
This page took 0.040637 seconds and 4 git commands to generate.