diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-04-20 09:04:28 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-04-20 09:04:28 +0200 |
commit | d0e6b9602d516e9d6310803e9c273cc74006fe39 (patch) | |
tree | 8839477d7a2de3027e64ab90bca41f61423bba2d /lib | |
parent | ebca0359b68fd7f82590d3334a5239bbc8c7d46f (diff) |
support both logTransition (with trace logging) and passTransition (accounting only)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kratos/DFADriver.pm | 7 | ||||
-rw-r--r-- | lib/MIMOSA/Log.pm | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm index 83a572f..432d0e5 100644 --- a/lib/Kratos/DFADriver.pm +++ b/lib/Kratos/DFADriver.pm @@ -670,6 +670,7 @@ sub to_ah { my $ignore_nested = q{}; my $adv_type = 'execution'; + my $pass_function = $self->{logging} ? 'logTransition' : 'passTransition'; if ( $self->{ignore_nested} ) { $adv_type = 'call'; @@ -686,8 +687,6 @@ sub to_ah { #include "drivers/eUSCI_A/uart/prototype_uart.h" #include "${class_header}" -pointcut InnerTransition() = execution("% ${class_name}::%(...)"); - EOF if ( defined $trigger_port and defined $trigger_pin ) { @@ -752,7 +751,7 @@ EOF $ah_buf .= <<"EOF"; advice ${adv_type}("% ${class_name}::$transition->{name}(...)") ${ignore_nested} : after() { - tjp->target()->passTransition(${class_name}::statepower[tjp->target()->state], + tjp->target()->${pass_function}(${class_name}::statepower[tjp->target()->state], $transition->{rel_energy_prev}{static}, $transition->{id}, ${dest_state_id}); }; @@ -763,7 +762,7 @@ EOF $ah_buf .= <<"EOF"; advice execution("% ${class_name}::$transition->{name}(...)") : after() { - tjp->target()->passTransition(${class_name}::statepower[tjp->target()->state], + tjp->target()->${pass_function}(${class_name}::statepower[tjp->target()->state], $transition->{rel_energy_prev}{static}, $transition->{id}, ${dest_state_id}); }; diff --git a/lib/MIMOSA/Log.pm b/lib/MIMOSA/Log.pm index 6714f67..90e3a3b 100644 --- a/lib/MIMOSA/Log.pm +++ b/lib/MIMOSA/Log.pm @@ -178,6 +178,7 @@ sub merge { and $trace_elem->{name} ne 'UNINITIALIZED' and $log_elem->{us} > $self->{setup}{state_duration} * 1500 and $prev_elem->{name} ne 'txDone' + and $prev_elem->{name} ne 'rxDone' and $prev_elem->{name} ne 'epilogue') { return sprintf('State %s (trigger index %d) took %.1f ms longer than expected', $trace_elem->{name}, $data_idx, |