aboutsummaryrefslogtreecommitdiffstats
path: root/rt-plot-vcpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'rt-plot-vcpu.c')
-rw-r--r--rt-plot-vcpu.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/rt-plot-vcpu.c b/rt-plot-vcpu.c
index 8f850b9..e39ae19 100644
--- a/rt-plot-vcpu.c
+++ b/rt-plot-vcpu.c
@@ -13,12 +13,12 @@
13#define dprintf(l, x...) do { if (0) printf(x); } while (0) 13#define dprintf(l, x...) do { if (0) printf(x); } while (0)
14#endif 14#endif
15 15
16static void update_tid(struct vcpu_info *info, int tid) 16static void update_label(struct vcpu_info *info, int tid, int tjob)
17{ 17{
18 info->fresh = FALSE; 18 info->fresh = FALSE;
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:%d", tid, tjob);
22 } 22 }
23} 23}
24 24
@@ -33,7 +33,7 @@ try_server_switch_away(struct graph_info *ginfo, struct vcpu_info *vcpu_info,
33 &sid, &job, 33 &sid, &job,
34 &tid, &tjob, &ts); 34 &tid, &tjob, &ts);
35 if (match && sid == vcpu_info->sid) { 35 if (match && sid == vcpu_info->sid) {
36 update_tid(vcpu_info, tid); 36 update_label(vcpu_info, tid, tjob);
37 37
38 if (vcpu_info->run_time && vcpu_info->run_time < ts) { 38 if (vcpu_info->run_time && vcpu_info->run_time < ts) {
39 info->box = TRUE; 39 info->box = TRUE;
@@ -66,7 +66,7 @@ static int try_server_switch_to(struct graph_info *ginfo, struct vcpu_info *vcpu
66 match = rt_graph_check_server_switch_to(ginfo, record, 66 match = rt_graph_check_server_switch_to(ginfo, record,
67 &sid, &job, &tid, &tjob, &ts); 67 &sid, &job, &tid, &tjob, &ts);
68 if (match && sid == vcpu_info->sid) { 68 if (match && sid == vcpu_info->sid) {
69 update_tid(vcpu_info, tid); 69 update_label(vcpu_info, tid, tjob);
70 vcpu_info->run_time = ts; 70 vcpu_info->run_time = ts;
71 vcpu_info->run_cpu = record->cpu; 71 vcpu_info->run_cpu = record->cpu;
72 vcpu_info->run_tid = tid; 72 vcpu_info->run_tid = tid;
@@ -151,7 +151,7 @@ static void do_plot_end(struct graph_info *ginfo, struct vcpu_info *vcpu_info,
151 &release, &deadline, 151 &release, &deadline,
152 &job, &tid, &tjob, &record); 152 &job, &tid, &tjob, &record);
153 if (is_running) { 153 if (is_running) {
154 update_tid(vcpu_info, tid); 154 update_label(vcpu_info, tid, tjob);
155 info->box = TRUE; 155 info->box = TRUE;
156 info->bcolor = hash_pid(vcpu_info->run_tid); 156 info->bcolor = hash_pid(vcpu_info->run_tid);
157 info->bfill = is_task_running(ginfo, ginfo->view_end_time, tid); 157 info->bfill = is_task_running(ginfo, ginfo->view_end_time, tid);
@@ -251,7 +251,7 @@ void rt_vcpu_plot_start(struct graph_info *ginfo, struct graph_plot *plot,
251 vcpu_info->fresh = TRUE; 251 vcpu_info->fresh = TRUE;
252 vcpu_info->running = FALSE; 252 vcpu_info->running = FALSE;
253 vcpu_info->last_job = -1; 253 vcpu_info->last_job = -1;
254 update_tid(vcpu_info, 0); 254 update_label(vcpu_info, 0, 0);
255} 255}
256 256
257/** 257/**
@@ -276,15 +276,15 @@ int rt_vcpu_plot_record_matches(struct rt_plot_common *rt,
276 int dint, sid, match; 276 int dint, sid, match;
277 unsigned long long dull; 277 unsigned long long dull;
278 278
279#define ARG ginfo, record, &sid 279#define ARG ginfo, record, &sid, &dint
280 match = rt_graph_check_server_switch_to(ARG, &dint, &dint, &dint, &dull) || 280 match = rt_graph_check_server_switch_to(ARG, &dint, &dint, &dull) ||
281 rt_graph_check_server_switch_away(ARG, &dint, &dint, &dint, &dull); 281 rt_graph_check_server_switch_away(ARG,&dint, &dint, &dull);
282 /* rt_graph_check_server_completion(ARG, &dint, &dull) || */ 282 rt_graph_check_server_completion(ARG, &dull) ||
283 /* rt_graph_check_server_release(ARG, &dint, &dull, &dull); */ 283 rt_graph_check_server_release(ARG, &dull, &dull);
284 /* rt_graph_check_server_block(ARG, &dull) || */ 284 rt_graph_check_server_block(ARG, &dull) ||
285 /* rt_graph_check_server_resume(ARG, &dull); */ 285 rt_graph_check_server_resume(ARG, &dull);
286#undef ARG 286#undef ARG
287 return (sid == vcpu_info->sid); 287 return (match && sid == vcpu_info->sid);
288} 288}
289 289
290/** 290/**