Devel::Monitor 0.9.0.7
Sponsored Links
Devel::Monitor 0.9.0.7 Ranking & Summary
File size:
0.016 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
7592
Date added:
2007-06-28
Publisher:
Philippe Cote
Publisher URL:
http://search.cpan.org/~p
Devel::Monitor 0.9.0.7 description
Devel::Monitor is a Perl module that can monitor your variables/objects for memory leaks.
You have memory leaks, and you want to remove it... You can use this tool to help you find which variables/objects that are not destroyed when they should be, and thereafter, you can visualise exactly where is the circular reference for some specific variables/objects.
WHAT IT CANT DO
Even if your modules are memory leak free, it doesnt mean that external modules that you are using dont have it. So, before running your application on mod_perl, you should be sure that EVERY modules are ok. (In particular those perl extensions calling C++ code)
SYNOPSIS
use Devel::Monitor qw(:all);
#-----------------------------------------------------------------------------
# Monitor scalars, arrays, hashes, references, constants
#-----------------------------------------------------------------------------
my ($a,$b) = (Foo::Bar->new(), Foo::Bar->new());
my ($c, @d, %e);
use constant F => [1,2];
monitor(name for a => $a,
name for b => $b,
name for c => $c,
name for d => @d,
name for e => %e,
name for F => &F); #NOTE : Dont add parentheses to the end of the constant (&F())
#-----------------------------------------------------------------------------
# Print circular references
#-----------------------------------------------------------------------------
# NOTE : You cannot use print_circular_ref on a monitored/tied variable
# (See "We cannot use tied objects references because it reuse memory space" doc)
print_circular_ref($a);
print_circular_ref($b);
print_circular_ref($c);
print_circular_ref(@d);
print_circular_ref(%e);
print_circular_ref(&F); #NOTE : Dont add parentheses to the end of the constant (&F())
USAGE : monitor
Example with a circular reference
+----------------------+
| Code |
+----------------------+
{
my @a;
monitor(a => @a);
$a[0] = @a; #Add a circular reference
print STDERR "Leaving scopen";
}
print STDERR "Scope leftn";
+----------------------+
| Output |
+----------------------+
MONITOR ARRAY a
Leaving scope
Scope left
DESTROY ARRAY a
+----------------------+
| Meaning |
+----------------------+
The line "DESTROY ARRAY a" should be between scope prints.
@a were deleted on program exit.
Example without a circular reference
+----------------------+
| Code |
+----------------------+
{
my @a;
monitor(a => @a);
print STDERR "Leaving scopen";
}
print STDERR "Scope leftn";
+----------------------+
| Output |
+----------------------+
MONITOR ARRAY a
Leaving scope
DESTROY ARRAY a
Scope left
+----------------------+
| Meaning |
+----------------------+
Everything is ok
Now that you know there is a circular reference, you can track it down using the print_circular_ref method
You have memory leaks, and you want to remove it... You can use this tool to help you find which variables/objects that are not destroyed when they should be, and thereafter, you can visualise exactly where is the circular reference for some specific variables/objects.
WHAT IT CANT DO
Even if your modules are memory leak free, it doesnt mean that external modules that you are using dont have it. So, before running your application on mod_perl, you should be sure that EVERY modules are ok. (In particular those perl extensions calling C++ code)
SYNOPSIS
use Devel::Monitor qw(:all);
#-----------------------------------------------------------------------------
# Monitor scalars, arrays, hashes, references, constants
#-----------------------------------------------------------------------------
my ($a,$b) = (Foo::Bar->new(), Foo::Bar->new());
my ($c, @d, %e);
use constant F => [1,2];
monitor(name for a => $a,
name for b => $b,
name for c => $c,
name for d => @d,
name for e => %e,
name for F => &F); #NOTE : Dont add parentheses to the end of the constant (&F())
#-----------------------------------------------------------------------------
# Print circular references
#-----------------------------------------------------------------------------
# NOTE : You cannot use print_circular_ref on a monitored/tied variable
# (See "We cannot use tied objects references because it reuse memory space" doc)
print_circular_ref($a);
print_circular_ref($b);
print_circular_ref($c);
print_circular_ref(@d);
print_circular_ref(%e);
print_circular_ref(&F); #NOTE : Dont add parentheses to the end of the constant (&F())
USAGE : monitor
Example with a circular reference
+----------------------+
| Code |
+----------------------+
{
my @a;
monitor(a => @a);
$a[0] = @a; #Add a circular reference
print STDERR "Leaving scopen";
}
print STDERR "Scope leftn";
+----------------------+
| Output |
+----------------------+
MONITOR ARRAY a
Leaving scope
Scope left
DESTROY ARRAY a
+----------------------+
| Meaning |
+----------------------+
The line "DESTROY ARRAY a" should be between scope prints.
@a were deleted on program exit.
Example without a circular reference
+----------------------+
| Code |
+----------------------+
{
my @a;
monitor(a => @a);
print STDERR "Leaving scopen";
}
print STDERR "Scope leftn";
+----------------------+
| Output |
+----------------------+
MONITOR ARRAY a
Leaving scope
DESTROY ARRAY a
Scope left
+----------------------+
| Meaning |
+----------------------+
Everything is ok
Now that you know there is a circular reference, you can track it down using the print_circular_ref method
Devel::Monitor 0.9.0.7 Screenshot
Sponsored Links
Devel::Monitor 0.9.0.7 Keywords
ARRAY
Monitor 0.9.0.7
STDERR
DESTROY ARRAY
DESTROY
DevelMonitor
Circular Reference
Perl module
for memory
circular
print
monitor
ref
memory
scope
Devel::Monitor 0.9.0.7
Bookmark Devel::Monitor 0.9.0.7
Devel::Monitor 0.9.0.7 Copyright
WareSeeker periodically updates pricing and software information of Devel::Monitor 0.9.0.7 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Devel::Monitor 0.9.0.7 Edition. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Devel::Monitor 0.9.0.7 Related Software
Devel::Cycle is a Perl module that helps you to find memory cycles in objects.
Devel::Depend::Cl is a Perl module that can extract dependency trees from c files.
Devel::Depend::Cpp is a Perl module that can extract dependency trees from c files.
Devel::TraceFuncs is a Perl module with trace function calls as they happen.
Devel::Peek is a Perl module that acts as a data debugging tool for the XS programmer.
Devel::FindGlobals is a Perl module to find global variables and their size.
Devel::DumpSizes is a Perl module to dump the name and size in bytes of variables that are available at a give point in a script
Devel::DebugInit is a Perl extension for creating a debugger initialization files from C header file macros.
Devel::STrace::Monitor is a monitor interface component for Devel::STrace.
My Software
You have not saved any software. Click "Save" next to each software to save it to your software basket
Related Information
Sponsored Links
TOP POPULAR DOWNLOAD