X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Flttngtoptypes.h;h=3a75c9deffe17b645ea5979db14d082b81c053e8;hb=715cf83c121d2aeac7ae030d49ff5a31bd6b9ac5;hp=f10a6841ad2becdc45748b2ca6cbd86778133d34;hpb=37010c3c1a006bf7f3181a1746751c99645ad4bb;p=lttngtop.git diff --git a/src/lttngtoptypes.h b/src/lttngtoptypes.h index f10a684..3a75c9d 100644 --- a/src/lttngtoptypes.h +++ b/src/lttngtoptypes.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Julien Desfossez + * Copyright (C) 2011-2012 Julien Desfossez * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 as @@ -10,10 +10,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef LTTNGTOPTYPES_H @@ -21,146 +20,12 @@ #include -struct lttngtop { - GPtrArray *process_table; /* struct processtop */ - GPtrArray *files_table; /* struct files */ - GPtrArray *cpu_table; /* struct cputime */ - GHashTable *perf_list; /* struct perfcounter */ - unsigned long start; - unsigned long end; - unsigned int nbproc; - unsigned int nbnewproc; - unsigned int nbdeadproc; - unsigned int nbthreads; - unsigned int nbnewthreads; - unsigned int nbdeadthreads; - unsigned int nbfiles; - unsigned int nbnewfiles; - unsigned int nbclosedfiles; -} lttngtop; - -struct processtop { - unsigned int puuid; - int pid; - char *comm; - int tid; - int ppid; - int oldpid; - int oldtid; - int oldppid; - unsigned long birth; - unsigned long death; - unsigned long lastactivity; - GPtrArray *process_files_table; - GPtrArray *threads; - GHashTable *perf; - struct processtop *threadparent; - unsigned long totalfileread; - unsigned long totalfilewrite; - unsigned long totalcpunsec; - unsigned long threadstotalcpunsec; - /* IO speed for this process */ - struct iostream *iostream; -}; - -struct perfcounter -{ - unsigned long count; +/* header for cputop display */ +struct header_view { + char *title; int visible; int sort; -}; - -struct cputime { - guint id; - struct processtop *current_task; - unsigned long task_start; - GHashTable *perf; -}; - -/* - * used for "relative seeks" (with fd, for example fs.lseek) - * and for "absolute seeks" (events occuring on a device without - * any link to a particular process) - */ -struct seeks { - unsigned long offset; - unsigned long count; -}; - -struct ioctls { - unsigned int command; - unsigned long count; -}; - -struct files { - struct processtop *ref; - unsigned int fuuid; - int fd; - char *name; - int oldfd; - int device; - int openmode; - unsigned long openedat; - unsigned long closedat; - unsigned long lastaccess; - unsigned long read; - unsigned long write; - unsigned long nbpoll; - unsigned long nbselect; - unsigned long nbopen; - unsigned long nbclose; - //struct *seeks; /* relative seeks inside the file */ - //struct *ioctls; - /* XXX : average wait time */ -}; - -struct sockets { - int fd; - int parent_fd; /* on accept a new fd is created from the bound socket */ - int family; - int type; - int protocol; - int sock_address; - unsigned long openedat; - unsigned long closedat; - unsigned long bind_address; - unsigned long remote_address; - //struct *sock_options; -}; - -struct sock_options { - int name; - int value; -}; - -struct vmas { - unsigned long start; - unsigned long end; - unsigned long flags; - unsigned long prot; - char *description; /* filename or description if possible (stack, heap) */ - unsigned long page_faults; -}; - -struct syscalls { - unsigned int id; - unsigned long count; - unsigned int cpu_id; - unsigned int type; - unsigned int tid; -}; - -struct signals { - int dest_pid; - int id; - unsigned long count; -}; - -struct iostream { - struct syscalls *syscall_info; /* NULL if there is no waiting for an exit_syscall */ - unsigned long ret_read; /* value returned by an I/O syscall_exit for a sys_read*/ - unsigned long ret_write; /* value returned by an I/O syscall_exit for a sys_write*/ - unsigned long ret_total; + int reverse; }; #endif /* LTTNGTOPTYPES_H */