From 45ed020007488c4906740a10d1318c0d78c959f6 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Thu, 12 Apr 2012 22:54:38 -0400 Subject: containers: minor bug fix --- rt-plot-task.c | 2 +- rt-plot-vcpu.c | 16 ++++++++++++++-- rt-plot.c | 6 ++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/rt-plot-task.c b/rt-plot-task.c index 63f4f20..0415ecc 100644 --- a/rt-plot-task.c +++ b/rt-plot-task.c @@ -3,7 +3,7 @@ #include "trace-graph.h" #include "trace-filter.h" -#define DEBUG_LEVEL 4 +#define DEBUG_LEVEL 0 #if DEBUG_LEVEL > 0 #define dprintf(l, x...) \ do { \ diff --git a/rt-plot-vcpu.c b/rt-plot-vcpu.c index 0867ff7..1467660 100644 --- a/rt-plot-vcpu.c +++ b/rt-plot-vcpu.c @@ -19,7 +19,6 @@ static void update_tid(struct vcpu_info *info, int tid) if (tid != info->run_tid) { info->run_tid = tid; snprintf(info->label, LLABEL, "%d", tid); - printf("Upated label to %s\n", info->label); } } @@ -227,7 +226,6 @@ void insert_vcpu(struct graph_info *ginfo, struct cont_list *cont, else snprintf(label, len, "%s - %d\nServer %d", cont->name, cont->cid, vcpu_info->sid); - plot = trace_graph_plot_append(ginfo, label, PLOT_TYPE_SERVER_CPU, TIME_TYPE_RT, &rt_vcpu_cb, vcpu); trace_graph_plot_add_all_recs(ginfo, plot); @@ -325,9 +323,23 @@ rt_vcpu_plot_write_header(struct rt_plot_common *rt, trace_seq_printf(s, "%s\nServer: %d:%d\n", vcpu_info->cont->name, vcpu_info->sid, job); + if (is_running) { trace_seq_printf(s, "Running: %d:%d", tid, tjob); } + + if (in_res(ginfo, deadline, time)) { + trace_seq_printf(s, "\nlitmus_server_deadline\n" + "deadline(job(%d,%d)): %llu\n", + vcpu_info->sid, job, deadline); + } + if (in_res(ginfo, release, time)) { + trace_seq_printf(s, "\nlitmus_server_release\n" + "release(job(%d,%d)): %llu\n", + vcpu_info->sid, job, release); + } + + trace_seq_putc(s, '\n'); return record; } diff --git a/rt-plot.c b/rt-plot.c index 37506ba..a2f5cfe 100644 --- a/rt-plot.c +++ b/rt-plot.c @@ -123,7 +123,7 @@ rt_plot_display_info(struct graph_info *ginfo, struct graph_plot *plot, { struct rt_plot_common *rt_info = plot->private; struct event_format *event; - struct record *record, *prev_record, *data_record; + struct record *record = NULL, *prev_record = NULL, *data_record = NULL; unsigned long long msec, nsec, rts, ptime, rtime, range; long long pdiff, rdiff; int eid; @@ -395,8 +395,9 @@ void get_previous_release(struct graph_info *ginfo, int match_tid, last_rec->ref_count++; while ((rec = tracecmd_read_prev(ginfo->handle, last_rec))) { - if (rec->ts < min_ts) { + if (get_rts(ginfo, rec) < min_ts) { free_record(rec); + goto loop_end; } @@ -425,5 +426,6 @@ void get_previous_release(struct graph_info *ginfo, int match_tid, loop_end: free_record(last_rec); } + free_record(ret); } -- cgit v1.2.2