diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-04-12 22:54:38 -0400 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2012-04-12 22:54:38 -0400 |
| commit | 45ed020007488c4906740a10d1318c0d78c959f6 (patch) | |
| tree | 90148c9501791f3f0ced805b8cd9d7d73e7cc6a5 | |
| parent | ce75da68ec7f4b8a8ea5e66459d0828633af67fe (diff) | |
containers: minor bug fix
| -rw-r--r-- | rt-plot-task.c | 2 | ||||
| -rw-r--r-- | rt-plot-vcpu.c | 16 | ||||
| -rw-r--r-- | 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 @@ | |||
| 3 | #include "trace-graph.h" | 3 | #include "trace-graph.h" |
| 4 | #include "trace-filter.h" | 4 | #include "trace-filter.h" |
| 5 | 5 | ||
| 6 | #define DEBUG_LEVEL 4 | 6 | #define DEBUG_LEVEL 0 |
| 7 | #if DEBUG_LEVEL > 0 | 7 | #if DEBUG_LEVEL > 0 |
| 8 | #define dprintf(l, x...) \ | 8 | #define dprintf(l, x...) \ |
| 9 | do { \ | 9 | 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) | |||
| 19 | if (tid != info->run_tid) { | 19 | if (tid != info->run_tid) { |
| 20 | info->run_tid = tid; | 20 | info->run_tid = tid; |
| 21 | snprintf(info->label, LLABEL, "%d", tid); | 21 | snprintf(info->label, LLABEL, "%d", tid); |
| 22 | printf("Upated label to %s\n", info->label); | ||
| 23 | } | 22 | } |
| 24 | } | 23 | } |
| 25 | 24 | ||
| @@ -227,7 +226,6 @@ void insert_vcpu(struct graph_info *ginfo, struct cont_list *cont, | |||
| 227 | else | 226 | else |
| 228 | snprintf(label, len, "%s - %d\nServer %d", | 227 | snprintf(label, len, "%s - %d\nServer %d", |
| 229 | cont->name, cont->cid, vcpu_info->sid); | 228 | cont->name, cont->cid, vcpu_info->sid); |
| 230 | |||
| 231 | plot = trace_graph_plot_append(ginfo, label, PLOT_TYPE_SERVER_CPU, | 229 | plot = trace_graph_plot_append(ginfo, label, PLOT_TYPE_SERVER_CPU, |
| 232 | TIME_TYPE_RT, &rt_vcpu_cb, vcpu); | 230 | TIME_TYPE_RT, &rt_vcpu_cb, vcpu); |
| 233 | trace_graph_plot_add_all_recs(ginfo, plot); | 231 | trace_graph_plot_add_all_recs(ginfo, plot); |
| @@ -325,9 +323,23 @@ rt_vcpu_plot_write_header(struct rt_plot_common *rt, | |||
| 325 | 323 | ||
| 326 | trace_seq_printf(s, "%s\nServer: %d:%d\n", vcpu_info->cont->name, | 324 | trace_seq_printf(s, "%s\nServer: %d:%d\n", vcpu_info->cont->name, |
| 327 | vcpu_info->sid, job); | 325 | vcpu_info->sid, job); |
| 326 | |||
| 328 | if (is_running) { | 327 | if (is_running) { |
| 329 | trace_seq_printf(s, "Running: %d:%d", tid, tjob); | 328 | trace_seq_printf(s, "Running: %d:%d", tid, tjob); |
| 330 | } | 329 | } |
| 330 | |||
| 331 | if (in_res(ginfo, deadline, time)) { | ||
| 332 | trace_seq_printf(s, "\nlitmus_server_deadline\n" | ||
| 333 | "deadline(job(%d,%d)): %llu\n", | ||
| 334 | vcpu_info->sid, job, deadline); | ||
| 335 | } | ||
| 336 | if (in_res(ginfo, release, time)) { | ||
| 337 | trace_seq_printf(s, "\nlitmus_server_release\n" | ||
| 338 | "release(job(%d,%d)): %llu\n", | ||
| 339 | vcpu_info->sid, job, release); | ||
| 340 | } | ||
| 341 | |||
| 342 | |||
| 331 | trace_seq_putc(s, '\n'); | 343 | trace_seq_putc(s, '\n'); |
| 332 | return record; | 344 | return record; |
| 333 | } | 345 | } |
| @@ -123,7 +123,7 @@ rt_plot_display_info(struct graph_info *ginfo, struct graph_plot *plot, | |||
| 123 | { | 123 | { |
| 124 | struct rt_plot_common *rt_info = plot->private; | 124 | struct rt_plot_common *rt_info = plot->private; |
| 125 | struct event_format *event; | 125 | struct event_format *event; |
| 126 | struct record *record, *prev_record, *data_record; | 126 | struct record *record = NULL, *prev_record = NULL, *data_record = NULL; |
| 127 | unsigned long long msec, nsec, rts, ptime, rtime, range; | 127 | unsigned long long msec, nsec, rts, ptime, rtime, range; |
| 128 | long long pdiff, rdiff; | 128 | long long pdiff, rdiff; |
| 129 | int eid; | 129 | int eid; |
| @@ -395,8 +395,9 @@ void get_previous_release(struct graph_info *ginfo, int match_tid, | |||
| 395 | last_rec->ref_count++; | 395 | last_rec->ref_count++; |
| 396 | 396 | ||
| 397 | while ((rec = tracecmd_read_prev(ginfo->handle, last_rec))) { | 397 | while ((rec = tracecmd_read_prev(ginfo->handle, last_rec))) { |
| 398 | if (rec->ts < min_ts) { | 398 | if (get_rts(ginfo, rec) < min_ts) { |
| 399 | free_record(rec); | 399 | free_record(rec); |
| 400 | |||
| 400 | goto loop_end; | 401 | goto loop_end; |
| 401 | } | 402 | } |
| 402 | 403 | ||
| @@ -425,5 +426,6 @@ void get_previous_release(struct graph_info *ginfo, int match_tid, | |||
| 425 | loop_end: | 426 | loop_end: |
| 426 | free_record(last_rec); | 427 | free_record(last_rec); |
| 427 | } | 428 | } |
| 429 | |||
| 428 | free_record(ret); | 430 | free_record(ret); |
| 429 | } | 431 | } |
