From 25d94aa8aabb8ac3e8bbea0bc439ea6148444cc8 Mon Sep 17 00:00:00 2001 From: leochanj Date: Wed, 21 Oct 2020 01:52:54 -0400 Subject: debug libextra and remove matlab --- SD-VBS/common/c/extra.h | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) (limited to 'SD-VBS/common/c') diff --git a/SD-VBS/common/c/extra.h b/SD-VBS/common/c/extra.h index 3215951..dbf1c95 100644 --- a/SD-VBS/common/c/extra.h +++ b/SD-VBS/common/c/extra.h @@ -1,5 +1,5 @@ /** - * Copyright 2019 Sims Hill Osborne and Joshua Bakita + * Copyright 2019 Sims Hill Osborne and 2020 Joshua Bakita * * This header provides facilities by which to separably run and time TACLeBench * To use this for paired task timing, define PAIRED (pass CFLAGS=-DPAIRED to make) @@ -29,7 +29,7 @@ extern int sched_getcpu(); #include #endif -#define LITMUS 0 +#define LITMUS 1 #define MC2 0 #define MMDC_PROF 0 @@ -200,20 +200,6 @@ static void _rt_load_params_itrl(int argc, char **argv) { perror("Unable to migrate to specified CPU"); \ exit(1); \ } \ - struct reservation_config res; \ - res.id = gettid(); \ - res.cpu = cpu; \ - res.priority = LITMUS_HIGHEST_PRIORITY; \ - /* we take over half the CPU time (these are ns) */ \ - res.polling_params.budget = ms2ns(3000); \ - res.polling_params.period = ms2ns(3000); \ - res.polling_params.offset = 0; \ - res.polling_params.relative_deadline = ms2ns(3000); \ - /* Not 100% sure that we should use periodic polling */ \ - if (reservation_create(PERIODIC_POLLING, &res) < 0) { \ - perror("Unable to create reservation"); \ - exit(1); \ - } \ struct rt_task rt_param; \ init_rt_task_param(&rt_param); \ /* Supposedly the next two parameters are irrelevant when reservations are enabled, but I'm leaving them anyway... */ \ @@ -223,7 +209,7 @@ static void _rt_load_params_itrl(int argc, char **argv) { rt_param.cls = RT_CLASS_HARD; \ rt_param.release_policy = TASK_PERIODIC; \ rt_param.budget_policy = NO_ENFORCEMENT; \ - rt_param.cpu = cpu; \ + rt_param.cpu = _rt_core; \ if (set_rt_task_param(gettid(), &rt_param) < 0) { \ perror("Unable to set real-time parameters"); \ exit(1); \ @@ -244,13 +230,7 @@ static void _rt_load_params_itrl(int argc, char **argv) { #if MC2 #define MC2_SETUP \ - struct mc2_task mc2_param; \ - mc2_param.res_id = gettid(); \ - mc2_param.crit = CRIT_LEVEL_A; \ - if (set_mc2_task_param(gettid(), &mc2_param) < 0) { \ - perror("Unable to set MC^2 task params"); \ - exit(1); \ - } \ + set_page_color(rt_param.cpu); #else #define MC2_SETUP @@ -261,7 +241,6 @@ static void _rt_load_params_itrl(int argc, char **argv) { perror("Unable to become a real-time task"); \ exit(1); \ } \ - reservation_destroy(gettid(), rt_param.cpu); #if __arm__ // On ARM, manually flush the cache @@ -417,7 +396,7 @@ static void _rt_start_loop() { FIRST_UNLOCK FIRST_LOCK #endif /* PAIRED */ - FLUSH_CACHES + //FLUSH_CACHES #ifdef PAIRED BARRIER_SYNC #endif /* PAIRED */ -- cgit v1.2.2 From 22566fe0f3333dcf4d9db1bd684d4ab529fbfaf4 Mon Sep 17 00:00:00 2001 From: leochanj Date: Wed, 21 Oct 2020 16:02:51 -0400 Subject: FLUSH_CACHES --- SD-VBS/common/c/extra.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'SD-VBS/common/c') diff --git a/SD-VBS/common/c/extra.h b/SD-VBS/common/c/extra.h index dbf1c95..8c67b33 100644 --- a/SD-VBS/common/c/extra.h +++ b/SD-VBS/common/c/extra.h @@ -396,7 +396,7 @@ static void _rt_start_loop() { FIRST_UNLOCK FIRST_LOCK #endif /* PAIRED */ - //FLUSH_CACHES + FLUSH_CACHES #ifdef PAIRED BARRIER_SYNC #endif /* PAIRED */ -- cgit v1.2.2