From f940c7f07376f4c67aa66afd11f2e92c63ac28c1 Mon Sep 17 00:00:00 2001 From: jsteube Date: Wed, 11 Jan 2023 22:34:15 +0000 Subject: [PATCH] tools/benchmark_deep.pl use benchmark_mask from module if defined --- tools/benchmark_deep.pl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/benchmark_deep.pl b/tools/benchmark_deep.pl index 175373019..af0ca873e 100755 --- a/tools/benchmark_deep.pl +++ b/tools/benchmark_deep.pl @@ -503,10 +503,11 @@ sub get_module { my $hash_type = shift; - my $st_hash = undef; - my $is_binary = 0; - my $pw_min = -1; - my $pw_max = -1; + my $st_hash = undef; + my $is_binary = 0; + my $pw_min = -1; + my $pw_max = -1; + my $benchmark_mask = undef; my $path = sprintf ("src/modules/module_%05d.c", $hash_type); @@ -542,11 +543,16 @@ sub get_module { $pw_max = $1; } + + if ($line =~ /BENCHMARK_MASK *= \"(.*)\"/) + { + $benchmark_mask = $1; + } } close (IN); - my $mask = $default_mask; + my $mask = (defined $benchmark_mask) ? $benchmark_mask : $default_mask; if ($pw_min != -1) {