X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbootchart%2Fbootchart.h;h=968c38da26a9ad483eba7b5129186bfe871991a7;hp=a9541caf4a09f2bfd1ca88891827d463f4ea5eff;hb=ca2f4176fee7dd5f5664429988e7059163fddb2d;hpb=6d031c0b6037ac7308d31562c09fb8ac714e82b4 diff --git a/src/bootchart/bootchart.h b/src/bootchart/bootchart.h index a9541caf4..968c38da2 100644 --- a/src/bootchart/bootchart.h +++ b/src/bootchart/bootchart.h @@ -5,7 +5,7 @@ /*** This file is part of systemd. - Copyright (C) 2009-2013 Intel Coproration + Copyright (C) 2009-2013 Intel Corporation Authors: Auke Kok @@ -26,10 +26,10 @@ #include #include +#include "list.h" #define MAXCPUS 16 #define MAXPIDS 65535 -#define MAXSAMPLES 8192 struct block_stat_struct { /* /proc/vmstat pgpgin & pgpgout */ @@ -43,17 +43,27 @@ struct cpu_stat_sample_struct { double waittime; }; -struct cpu_stat_struct { - /* per cpu array */ - struct cpu_stat_sample_struct sample[MAXSAMPLES]; -}; - /* per process, per sample data we will log */ struct ps_sched_struct { /* /proc//schedstat fields 1 & 2 */ double runtime; double waittime; int pss; + struct list_sample_data *sampledata; + struct ps_sched_struct *next; + struct ps_sched_struct *prev; + struct ps_sched_struct *cross; /* cross pointer */ + struct ps_struct *ps_new; +}; + +struct list_sample_data { + double runtime[MAXCPUS]; + double waittime[MAXCPUS]; + double sampletime; + int entropy_avail; + struct block_stat_struct blockstat; + LIST_FIELDS(struct list_sample_data, link); /* DLL */ + int counter; }; /* process info */ @@ -73,9 +83,9 @@ struct ps_struct { int schedstat; FILE *smaps; - /* index to first/last seen timestamps */ - int first; - int last; + /* pointers to first/last seen timestamps */ + struct ps_sched_struct *first; + struct ps_sched_struct *last; /* records actual start time, may be way before bootchart runs */ double starttime; @@ -100,7 +110,6 @@ extern double log_start; extern double sampletime[]; extern struct ps_struct *ps_first; extern struct block_stat_struct blockstat[]; -extern struct cpu_stat_struct cpustat[]; extern int pscount; extern bool arg_relative; extern bool arg_filter;