LTTngTop working with up-to-date LTTng stack !
[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 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
16 * MA 02111-1307, USA.
17 */
18
19#ifndef LTTNGTOPTYPES_H
20#define LTTNGTOPTYPES_H
21
22#include <glib.h>
23
24struct lttngtop {
25 GPtrArray *process_table; /* struct processtop */
26 GPtrArray *files_table; /* struct files */
27 GPtrArray *cpu_table; /* struct cputime */
28 GHashTable *perf_list; /* struct perfcounter */
29 unsigned long start;
30 unsigned long end;
31 unsigned int nbproc;
32 unsigned int nbnewproc;
33 unsigned int nbdeadproc;
34 unsigned int nbthreads;
35 unsigned int nbnewthreads;
36 unsigned int nbdeadthreads;
37 unsigned int nbfiles;
38 unsigned int nbnewfiles;
39 unsigned int nbclosedfiles;
40} lttngtop;
41
42struct processtop {
43 unsigned int puuid;
44 int pid;
45 char *comm;
46 int tid;
47 int ppid;
48 int oldpid;
49 int oldtid;
50 int oldppid;
51 unsigned long birth;
52 unsigned long death;
53 unsigned long lastactivity;
54 GPtrArray *process_files_table;
55 GPtrArray *threads;
56 GHashTable *perf;
57 struct processtop *threadparent;
58 unsigned long totalfileread;
59 unsigned long totalfilewrite;
60 unsigned long totalcpunsec;
61 unsigned long threadstotalcpunsec;
62 /* IO speed for this process */
63 struct iostream *iostream;
64};
65
66struct perfcounter
67{
68 unsigned long count;
69 int visible;
70 int sort;
71};
72
73struct cputime {
74 guint id;
75 struct processtop *current_task;
76 unsigned long task_start;
77 GHashTable *perf;
78};
79
80/*
81 * used for "relative seeks" (with fd, for example fs.lseek)
82 * and for "absolute seeks" (events occuring on a device without
83 * any link to a particular process)
84 */
85struct seeks {
86 unsigned long offset;
87 unsigned long count;
88};
89
90struct ioctls {
91 unsigned int command;
92 unsigned long count;
93};
94
95struct files {
96 struct processtop *ref;
97 unsigned int fuuid;
98 int fd;
99 char *name;
100 int oldfd;
101 int device;
102 int openmode;
103 unsigned long openedat;
104 unsigned long closedat;
105 unsigned long lastaccess;
106 unsigned long read;
107 unsigned long write;
108 unsigned long nbpoll;
109 unsigned long nbselect;
110 unsigned long nbopen;
111 unsigned long nbclose;
112 //struct *seeks; /* relative seeks inside the file */
113 //struct *ioctls;
114 /* XXX : average wait time */
115};
116
117struct sockets {
118 int fd;
119 int parent_fd; /* on accept a new fd is created from the bound socket */
120 int family;
121 int type;
122 int protocol;
123 int sock_address;
124 unsigned long openedat;
125 unsigned long closedat;
126 unsigned long bind_address;
127 unsigned long remote_address;
128 //struct *sock_options;
129};
130
131struct sock_options {
132 int name;
133 int value;
134};
135
136struct vmas {
137 unsigned long start;
138 unsigned long end;
139 unsigned long flags;
140 unsigned long prot;
141 char *description; /* filename or description if possible (stack, heap) */
142 unsigned long page_faults;
143};
144
145struct syscalls {
146 unsigned int id;
147 unsigned long count;
148 unsigned int cpu_id;
149 unsigned int type;
150 unsigned int tid;
151};
152
153struct signals {
154 int dest_pid;
155 int id;
156 unsigned long count;
157};
158
159struct iostream {
85db4618
JD
160 struct syscalls *syscall_info; /* NULL if there is no waiting for an exit_syscall */
161 unsigned long ret_read; /* value returned by an I/O syscall_exit for a sys_read*/
162 unsigned long ret_write; /* value returned by an I/O syscall_exit for a sys_write*/
163 unsigned long ret_total;
1fc22eb4
JD
164};
165
166#endif /* LTTNGTOPTYPES_H */
This page took 0.027381 seconds and 4 git commands to generate.