X-Git-Url: https://git.lttng.org/?p=lttngtop.git;a=blobdiff_plain;f=src%2Flttngtoptypes.h;h=59fb772b2e3b0c34b4a453db28dd36de7da6b1a2;hp=f10a6841ad2becdc45748b2ca6cbd86778133d34;hb=54645d5cab414bb3391837ef7acb919cf106c71f;hpb=37010c3c1a006bf7f3181a1746751c99645ad4bb diff --git a/src/lttngtoptypes.h b/src/lttngtoptypes.h index f10a684..59fb772 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 @@ -22,10 +21,11 @@ #include struct lttngtop { + GHashTable *process_hash_table; /* struct processtop */ GPtrArray *process_table; /* struct processtop */ GPtrArray *files_table; /* struct files */ GPtrArray *cpu_table; /* struct cputime */ - GHashTable *perf_list; /* struct perfcounter */ + GPtrArray *kprobes_table; /* struct kprobes */ unsigned long start; unsigned long end; unsigned int nbproc; @@ -43,24 +43,28 @@ struct processtop { unsigned int puuid; int pid; char *comm; + struct host *host; int tid; int ppid; - int oldpid; - int oldtid; - int oldppid; + int vpid; + int vtid; + int vppid; unsigned long birth; unsigned long death; - unsigned long lastactivity; + /* Files managing */ GPtrArray *process_files_table; + struct file_history *files_history; GPtrArray *threads; GHashTable *perf; struct processtop *threadparent; + /* IO calculting */ unsigned long totalfileread; unsigned long totalfilewrite; + unsigned long fileread; + unsigned long filewrite; + struct syscalls *syscall_info; unsigned long totalcpunsec; unsigned long threadstotalcpunsec; - /* IO speed for this process */ - struct iostream *iostream; }; struct perfcounter @@ -75,6 +79,7 @@ struct cputime { struct processtop *current_task; unsigned long task_start; GHashTable *perf; + struct syscall *current_syscall; }; /* @@ -100,6 +105,7 @@ struct files { int oldfd; int device; int openmode; + int flag; unsigned long openedat; unsigned long closedat; unsigned long lastaccess; @@ -114,6 +120,11 @@ struct files { /* XXX : average wait time */ }; +struct file_history { + struct files *file; + struct file_history *next; +}; + struct sockets { int fd; int parent_fd; /* on accept a new fd is created from the bound socket */ @@ -142,12 +153,19 @@ struct vmas { unsigned long page_faults; }; +struct syscall { + char *name; + unsigned long ts_start; + uint64_t cpu_id; +}; + struct syscalls { unsigned int id; unsigned long count; - unsigned int cpu_id; - unsigned int type; - unsigned int tid; + uint64_t cpu_id; + unsigned int type; + unsigned int tid; + unsigned int fd; }; struct signals { @@ -156,11 +174,32 @@ struct signals { 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; +struct file_info { + struct file_info *next; + char *name; + int fd; + int status; +}; + +/* header for cputop display */ +struct header_view { + char *title; + int visible; + int sort; + int reverse; +}; + +struct kprobes { + char *probe_name; + char *symbol_name; + int probe_addr; + int probe_offset; + int count; +}; + +struct host { + char *hostname; + int filter; }; #endif /* LTTNGTOPTYPES_H */