X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbootchart%2Fsvg.c;h=a53f98a941fea55d7fe980e144dde85ceb6d9623;hb=ca5405bb4fb1fabd1fe43e4ee23edf58914bdfae;hp=c21f6e86b425899f77fb762d37554901646bd17a;hpb=f168c27313e4d7b0aabee037dc9c78a5799f0597;p=elogind.git diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c index c21f6e86b..a53f98a94 100644 --- a/src/bootchart/svg.c +++ b/src/bootchart/svg.c @@ -68,16 +68,16 @@ static double idletime = -1.0; static int pfiltered = 0; static int pcount = 0; static int kcount = 0; -static float psize = 0; -static float ksize = 0; -static float esize = 0; +static double psize = 0; +static double ksize = 0; +static double esize = 0; static struct list_sample_data *sampledata; static struct list_sample_data *prev_sampledata; extern struct list_sample_data *head; static void svg_header(void) { - float w; - float h; + double w; + double h; struct list_sample_data *sampledata_last; sampledata = head; @@ -705,7 +705,6 @@ static void svg_io_bo_bar(void) { double tot; double pbo; - tot = 0; pbo = 0; start = MAX(i - ((range / 2) - 1), 0); @@ -1094,12 +1093,13 @@ static void svg_ps_bars(void) { w = starttime; /* text label of process name */ - svg(" [%i]%.03fs\n", + svg(" [%i]%.03fs %s\n", time_to_graph(w - graph_start) + 5.0, ps_to_graph(j) + 14.0, ps->name, ps->pid, - (ps->last->runtime - ps->first->runtime) / 1000000000.0); + (ps->last->runtime - ps->first->runtime) / 1000000000.0, + arg_show_cgroup ? ps->cgroup : ""); /* paint lines to the parent process */ if (ps->parent) { /* horizontal part */ @@ -1249,7 +1249,7 @@ static void svg_top_ten_pss(void) { void svg_do(const char *build) { struct ps_struct *ps; - memset(&str, 0, sizeof(str)); + memzero(&str, sizeof(str)); ps = ps_first;