aboutsummaryrefslogtreecommitdiffstats
path: root/rt-graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'rt-graph.c')
-rw-r--r--rt-graph.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/rt-graph.c b/rt-graph.c
index 74a6aab..d9a3f82 100644
--- a/rt-graph.c
+++ b/rt-graph.c
@@ -523,6 +523,43 @@ int rt_graph_check_task_resume(struct graph_info *ginfo,
523 return ret; 523 return ret;
524} 524}
525 525
526
527/**
528 * rt_graph_check_sys_release - check for system release record
529 * Return 1 and @when if the record matches
530 */
531int rt_graph_check_sys_release(struct graph_info *ginfo,
532 struct record *record,
533 unsigned long long *rel)
534{
535 struct rt_graph_info *rtg_info = &ginfo->rtg_info;
536 struct pevent *pevent = ginfo->pevent;
537 struct event_format *event;
538 gint id;
539 int ret = 0;
540
541 if (rtg_info->sys_release_id < 0) {
542 event = pevent_find_event_by_name(pevent, "litmus",
543 "litmus_sys_release");
544 if (!event)
545 goto out;
546 rtg_info->sys_release_id = event->id;
547 dprintf(2, "Found sys_release id %d\n", event->id);
548 STORE_FIELD(rtg_info, event, sys_release, rel);
549 }
550
551 id = pevent_data_type(pevent, record);
552 if (id == rtg_info->sys_release_id) {
553 LOAD_LONG(rtg_info, record, sys_release, rel, rel);
554
555 ret = 1;
556 dprintf(3, "Read sys_release (%d) record, rel: %llu\n", id, *rel);
557 }
558 out:
559 return ret;
560}
561
562
526/** 563/**
527 * rt_graph_check_container_param - check for litmus_container_param record 564 * rt_graph_check_container_param - check for litmus_container_param record
528 * Return 1, @cid, and @name if the record matches 565 * Return 1, @cid, and @name if the record matches
@@ -876,6 +913,9 @@ void init_rt_event_cache(struct rt_graph_info *rtg_info)
876 913
877 memset(rtg_info, 0, sizeof(*rtg_info)); 914 memset(rtg_info, 0, sizeof(*rtg_info));
878 915
916 rtg_info->clean_records = 0;
917 rtg_info->start_time = 0ULL;
918
879 rtg_info->task_param_id = -1; 919 rtg_info->task_param_id = -1;
880 rtg_info->switch_to_id = -1; 920 rtg_info->switch_to_id = -1;
881 rtg_info->switch_away_id = -1; 921 rtg_info->switch_away_id = -1;
@@ -884,7 +924,9 @@ void init_rt_event_cache(struct rt_graph_info *rtg_info)
884 rtg_info->task_block_id = -1; 924 rtg_info->task_block_id = -1;
885 rtg_info->task_resume_id = -1; 925 rtg_info->task_resume_id = -1;
886 926
927 rtg_info->sys_release_id = -1;
887 rtg_info->container_param_id = -1; 928 rtg_info->container_param_id = -1;
929
888 rtg_info->server_param_id = -1; 930 rtg_info->server_param_id = -1;
889 rtg_info->server_switch_to_id = -1; 931 rtg_info->server_switch_to_id = -1;
890 rtg_info->server_switch_away_id = -1; 932 rtg_info->server_switch_away_id = -1;