… | |
… | |
4149 | IO::AIO::min_parallel 8; |
4149 | IO::AIO::min_parallel 8; |
4150 | IO::AIO::max_poll_time $TICK * 0.1; |
4150 | IO::AIO::max_poll_time $TICK * 0.1; |
4151 | undef $AnyEvent::AIO::WATCHER; |
4151 | undef $AnyEvent::AIO::WATCHER; |
4152 | } |
4152 | } |
4153 | |
4153 | |
4154 | my $_log_backtrace; |
4154 | our $_log_backtrace; |
|
|
4155 | our $_log_backtrace_last; |
4155 | |
4156 | |
4156 | sub _log_backtrace { |
4157 | sub _log_backtrace { |
4157 | my ($msg, @addr) = @_; |
4158 | my ($msg, @addr) = @_; |
4158 | |
4159 | |
4159 | $msg =~ s/\n//; |
4160 | $msg =~ s/\n$//; |
4160 | |
4161 | |
|
|
4162 | if ($_log_backtrace_last eq $msg) { |
|
|
4163 | LOG llevInfo, "[ABT] $msg\n"; |
|
|
4164 | LOG llevInfo, "[ABT] [duplicate, suppressed]\n"; |
4161 | # limit the # of concurrent backtraces |
4165 | # limit the # of concurrent backtraces |
4162 | if ($_log_backtrace < 2) { |
4166 | } elsif ($_log_backtrace < 2) { |
|
|
4167 | $_log_backtrace_last = $msg; |
4163 | ++$_log_backtrace; |
4168 | ++$_log_backtrace; |
4164 | my $perl_bt = Carp::longmess $msg; |
4169 | my $perl_bt = Carp::longmess $msg; |
4165 | async { |
4170 | async { |
4166 | $Coro::current->{desc} = "abt $msg"; |
4171 | $Coro::current->{desc} = "abt $msg"; |
4167 | |
4172 | |
… | |
… | |
4187 | LOG llevInfo, "[ABT] $_\n" for @bt; |
4192 | LOG llevInfo, "[ABT] $_\n" for @bt; |
4188 | --$_log_backtrace; |
4193 | --$_log_backtrace; |
4189 | }; |
4194 | }; |
4190 | } else { |
4195 | } else { |
4191 | LOG llevInfo, "[ABT] $msg\n"; |
4196 | LOG llevInfo, "[ABT] $msg\n"; |
4192 | LOG llevInfo, "[ABT] [suppressed]\n"; |
4197 | LOG llevInfo, "[ABT] [overload, suppressed]\n"; |
4193 | } |
4198 | } |
4194 | } |
4199 | } |
4195 | |
4200 | |
4196 | # load additional modules |
4201 | # load additional modules |
4197 | require "cf/$_.pm" for @EXTRA_MODULES; |
4202 | require "cf/$_.pm" for @EXTRA_MODULES; |