Commit eb3a60a7 authored by Michael Gray's avatar Michael Gray
Browse files

DESTROY() tracing.

parent 940ba2e5
......@@ -296,7 +296,8 @@ sub state {
sub DESTROY {
my ($self) = @_;
$self->zircon_trace;
$self->zircon_trace('%s', $self);
return;
}
1;
......
......@@ -627,7 +627,7 @@ sub disconnect {
sub DESTROY {
my ($self) = @_;
$self->zircon_trace;
$self->zircon_trace('%s', $self);
$self->disconnect;
return;
}
......
......@@ -364,7 +364,7 @@ sub zircon_trace_prefix {
sub DESTROY {
my ($self) = @_;
$self->zircon_trace;
$self->zircon_trace('%s', $self);
return;
}
......
......@@ -274,6 +274,7 @@ sub DESTROY {
}
$self->{'_destroyed_already'} = 1;
$self->zircon_trace('%s', $self);
return unless $self->is_running;
my $wait = 0;
......
......@@ -7,6 +7,9 @@ use warnings;
use Try::Tiny;
use Scalar::Util qw( weaken );
use base qw( Zircon::Trace );
our $ZIRCON_TRACE_KEY = 'ZIRCON_ZMAP_TRACE';
sub new {
my ($pkg, %arg_hash) = @_;
my $new = { };
......@@ -103,6 +106,7 @@ sub name {
sub DESTROY {
my ($self) = @_;
$self->zircon_trace('%s', $self);
try { $self->zmap->view_destroyed($self); }
catch { warn $_; };
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment