From 60ad08fb12aa303c4bacb230e8f2341f01ca819b Mon Sep 17 00:00:00 2001 From: mandersch <malte.k.andersch@gmail.com> Date: Fri, 16 Sep 2022 12:09:13 +0200 Subject: [PATCH] Update Perl Module generation to fit our changes --- pb_utils/mod_gen/Plan.pm | 3 +- pb_utils/mod_gen/plan_to_module.pl | 5 +- pb_utils/mod_gen/plans/plan_same_v.csv | 201 ++++++++++++------------- pb_utils/mod_gen/plans/random_v.csv | 5 +- pb_utils/mod_gen/tmpl/module.tt | 1 - pb_utils/pb_submitter/example_plan | 200 ++++++++++++------------ 6 files changed, 205 insertions(+), 210 deletions(-) diff --git a/pb_utils/mod_gen/Plan.pm b/pb_utils/mod_gen/Plan.pm index 9a6b9bdbc53b..872335d95e93 100644 --- a/pb_utils/mod_gen/Plan.pm +++ b/pb_utils/mod_gen/Plan.pm @@ -14,10 +14,9 @@ sub parse_plan_csv while (<FILE>) { - if (/\s*(\d+)\s*,\s*(\d+)\s*/) + if (/\s*(\d+)\s*/) { push(@expected_results, {mode => 'EXEC', nr => $counter, time => $1}); - push(@expected_results, {mode => 'IDLE', nr => $counter, time => $2}); $counter++; } } diff --git a/pb_utils/mod_gen/plan_to_module.pl b/pb_utils/mod_gen/plan_to_module.pl index eddaab59f1bb..96a49dd0159d 100755 --- a/pb_utils/mod_gen/plan_to_module.pl +++ b/pb_utils/mod_gen/plan_to_module.pl @@ -46,15 +46,14 @@ sub process_plan my @plan = parse_plan_csv ($plan_file); my @formatted_plan; - for (my $i = 0; $i < scalar @plan ; $i += 2) { + for (my $i = 0; $i < scalar @plan ; $i += 1) { if ($plan[$i]->{time} >= 20000000000) { print("ERROR: Watchdog will cause kernel panic!\n"); } push(@formatted_plan, { exec_t => $plan[$i]->{time}, - idle_t => $plan[$i+1]->{time}, - index => $i/2 + index => $i }); } diff --git a/pb_utils/mod_gen/plans/plan_same_v.csv b/pb_utils/mod_gen/plans/plan_same_v.csv index f042e6f8cac2..0a6b3d95fdc1 100644 --- a/pb_utils/mod_gen/plans/plan_same_v.csv +++ b/pb_utils/mod_gen/plans/plan_same_v.csv @@ -1,101 +1,100 @@ -EXEC_TIME, IDLE_TIME -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 1000000000 -1000000000 , 0 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 +821500 \ No newline at end of file diff --git a/pb_utils/mod_gen/plans/random_v.csv b/pb_utils/mod_gen/plans/random_v.csv index 5bff66d23b1e..09040761214d 100644 --- a/pb_utils/mod_gen/plans/random_v.csv +++ b/pb_utils/mod_gen/plans/random_v.csv @@ -1,3 +1,2 @@ -EXEC_TIME, IDLE_TIME -19900000000, 1900000000 -1000000000, 0 +825000 +150024 \ No newline at end of file diff --git a/pb_utils/mod_gen/tmpl/module.tt b/pb_utils/mod_gen/tmpl/module.tt index 068b6ee3b966..cd8827ebe9b3 100644 --- a/pb_utils/mod_gen/tmpl/module.tt +++ b/pb_utils/mod_gen/tmpl/module.tt @@ -14,7 +14,6 @@ static int loop_thread_func(void *data) while (!kthread_should_stop()) { int a = 0; int b = 0; - set_current_state(TASK_INTERRUPTIBLE); for (;a < 200000; a++){b = b + a;} printk("b = %d\n", b); schedule(); diff --git a/pb_utils/pb_submitter/example_plan b/pb_utils/pb_submitter/example_plan index 83181673a10b..93cbfb92e6c0 100644 --- a/pb_utils/pb_submitter/example_plan +++ b/pb_utils/pb_submitter/example_plan @@ -1,100 +1,100 @@ -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 -100000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 +560000 -- GitLab