svs
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3
Devel::Leak 0.03
Devel::Leak is a utility for looking for perl objects that are not reclaimed. more>>
Devel::Leak is a utility for looking for perl objects that are not reclaimed.
SYNOPSIS
use Devel::Leak;
... setup code
my $count = Devel::Leak::NoteSV($handle);
... code that may leak
Devel::Leak::CheckSV($handle);
Devel::Leak has two functions NoteSV and CheckSV.
NoteSV walks the perl internal table of allocated SVs (scalar values) - (which actually contains arrays and hashes too), and records their addresses in a table. It returns a count of these "things", and stores a pointer to the table (which is obtained from the heap using malloc()) in its argument.
CheckSV is passed argument which holds a pointer to a table created by NoteSV. It re-walks the perl-internals and calls sv_dump() for any "things" which did not exist when NoteSV was called. It returns a count of the number of "things" now allocated.
<<lessSYNOPSIS
use Devel::Leak;
... setup code
my $count = Devel::Leak::NoteSV($handle);
... code that may leak
Devel::Leak::CheckSV($handle);
Devel::Leak has two functions NoteSV and CheckSV.
NoteSV walks the perl internal table of allocated SVs (scalar values) - (which actually contains arrays and hashes too), and records their addresses in a table. It returns a count of these "things", and stores a pointer to the table (which is obtained from the heap using malloc()) in its argument.
CheckSV is passed argument which holds a pointer to a table created by NoteSV. It re-walks the perl-internals and calls sv_dump() for any "things" which did not exist when NoteSV was called. It returns a count of the number of "things" now allocated.
Download (0.003MB)
Added: 2007-05-08 License: Perl Artistic License Price:
899 downloads
Devel::Peek 0.96
Devel::Peek is a Perl module that acts as a data debugging tool for the XS programmer. more>>
SYNOPSIS
use Devel::Peek;
Dump( $a );
Dump( $a, 5 );
DumpArray( 5, $a, $b, ... );
mstat "Point 5";
Devel::Peek contains functions which allows raw Perl datatypes to be manipulated from a Perl script. This is used by those who do XS programming to check that the data they are sending from C to Perl looks as they think it should look. The trick, then, is to know what the raw datatype is supposed to look like when it gets to Perl. This document offers some tips and hints to describe good and bad raw data.
It is very possible that this document will fall far short of being useful to the casual reader. The reader is expected to understand the material in the first few sections of perlguts.
Devel::Peek supplies a Dump() function which can dump a raw Perl datatype, and mstat("marker") function to report on memory usage (if perl is compiled with corresponding option). The function DeadCode() provides statistics on the data "frozen" into inactive CV. Devel::Peek also supplies SvREFCNT(), SvREFCNT_inc(), and SvREFCNT_dec() which can query, increment, and decrement reference counts on SVs. This document will take a passive, and safe, approach to data debugging and for that it will describe only the Dump() function.
Function DumpArray() allows dumping of multiple values (useful when you need to analize returns of functions).
The global variable $Devel::Peek::pv_limit can be set to limit the number of character printed in various string values. Setting it to 0 means no limit.
Download (0.015MB)
Added: 2007-05-02 License: Perl Artistic License Price:
905 downloads
B::Graph 0.51
B::Graph is a Perl compiler backend to produce graphs of OP trees. more>>
B::Graph is a Perl compiler backend to produce graphs of OP trees.
SYNOPSIS
perl -MO=Graph,-text prog.pl >graph.txt
perl -MO=Graph,-vcg prog.pl >graph.vcg
xvcg graph.vcg
perl -MO=Graph,-dot prog.pl | dot -Tps >graph.ps
This module is a backend to the perl compiler (B::*) which, instead of outputting bytecode or C based on perls compiled version of a program, writes descriptions in graph-description languages specifying graphs that show the programs structure. It currently generates descriptions for the VCG tool (http://www.cs.uni-sb.de/RW/users/sander/html/gsvcg1.html) and Dot (part of the graph visualization toolkit from AT&T: http://www.research.att.com/sw/tools/graphviz/). It also can produce plain text output (which is more useful for debugging the module itself than anything else, though you might be able to make cut the nodes out and make a mobile or something similar).
OPTIONS
Like any other compiler backend, this module needs to be invoked using the O module to run correctly:
perl -MO=Graph,-opt,-opt,-opt program.pl
OR
perl -MO=Graph,-opt,obj -e BEGIN {$obj = ["hi"]}; print $obj
OR EVEN
perl -e use O qw(Graph -opt obj obj); print "hi!n";
Obj is the name of a perl variable whose contents will be examined. It cant be a my() variable, and it shouldnt have a prefix symbol ($@^*), though you can specify a package -- the name will be used to look up a GV, whose various fields will lead to the scalar, array, and other values that correspond to the named variable. If no object is specified, the whole main program, including the CV that points to its pad, will be displayed.
Each of the the opts can come from one of the following (each set is mutually exclusive; case and underscores are insignificant):
-text, -vcg, -dot
Produce output of the appropriate type. The default is -text, which isnt useful for much of anything (it does draw some nice ASCII boxes, though).
-addrs, -no_addrs
Each of the nodes on the graph produced corresponds to a C structure that has an address and includes pointers to other structures. The module uses these addresses to decide how to draw edges, but it makes the graph more compact if they arent printed. The default is -no_addrs.
-compile_order, -run_order
The collection of OPs that perl compiles a script into has two different layers of structure. It has a tree structure which corresponds roughly to the synactic nesting of constructs in the source text, and a roughly linked-list representation, essentially a postorder traversal of this tree, which is used at runtime to decide what to do next. The graph can be drawn to emphasize one structure or the other. The former, compile_order, is the default, as it tends to lead to graphs with aspect ratios close to those of standard paper.
-SVs, -no_SVs
If OPs represent a programs compiled code, SVs represent its data. This includes literal numbers and strings (IVs, NVs, PVs, PVIVs, and PVNVs), regular arrays, hashes, and references (AVs, HVs, and RVs), but also the structures that correspond to individual variables (special HVs for symbol tables and GVs to represent values within them, and special AVs that hold my() variables (as well as compiler temporaries)), structures that keep track of code (CVs), and a variety of others. The default is to display all these too, to give a complete picture, but if you arent in a holistic mood, you can make them disappear.
-ellipses, -rhombs
The module tries to give the nodes representing SVs a different shape from those of OPs. OPs are usually rectangular, so two obvious shapes for SVs are ellipses and rhombuses (stretched diamonds). This option currently only makes a difference for VCG (ellipse is the default).
-stashes, -no_stashes
The hashes that perl uses to represent symbol tables are called stashes. Since every GV has a pointer back to its stash, its virtually inevitable for the links in a graph to lead to the main stash. Unfortunately stashes, especially the main one, can be quite big, and lead to forests of other structures -- theres one GV and another SV for each magic variable, plus all of @INC and %ENV, and so on. To prevent information overload, then, the display of stashes is disabled by default.
-fileGVs, -no_fileGVs
Another kind graph element that can be annoying are the pointers from every GV and COP (a kind of OP that occurs for every statement) to the GV that represents the file from which that code came (used for error messages). By default, these links arent shown, to keep them from cluttering the graph. Also, perls internal interfaces changed in a recent version, so in perl 5.005_63 or later you cant see the fileGVs at all.
-SEQs, -no_SEQs
As it is visited in the peephole optimization phase, each OP gets a sequence number, which is currently used by anything (except the peephole optimizer, to avoid visiting OPs twice). If you want to see these, ask for them. (COPs have their own sequence numbers too, but theyre more interesting to look at -- for instance, theyre used to bound the lifetimes of lexicals).
-types, -no_types
B::Graph always gives the type of each OP symbolically (entersub), but it can also print the numeric value of the type field, if you want. The default is no_types.
-float, -no_float
Almost every OP has an op_next and an op_sibling pointer, and B::Graph colors them distinctively (pink and light blue, respectively). Because of this, it isnt strictly necessary to anchor the arrow on a line in the OPs box saying op_next. The float option lets the graph layout engine start these arrows wherever it wants, which can sometimes lead to a more pleasing layout, at the expense of being less obvious. The default is not to float.
-targlinks, -no_targlinks
Lexical (my()) variables and temporary values used by individual OPs are stored in pads, per-code arrays linked to the CV. OPs store indexes into these arrays in the op_targ field, but B::Graph can often also draw links directly from the OP to the SV that stores the name of the variable. These links dont correspond to any real pointers, however, and they can make the graph more complicated, so they are disabled by default.
<<lessSYNOPSIS
perl -MO=Graph,-text prog.pl >graph.txt
perl -MO=Graph,-vcg prog.pl >graph.vcg
xvcg graph.vcg
perl -MO=Graph,-dot prog.pl | dot -Tps >graph.ps
This module is a backend to the perl compiler (B::*) which, instead of outputting bytecode or C based on perls compiled version of a program, writes descriptions in graph-description languages specifying graphs that show the programs structure. It currently generates descriptions for the VCG tool (http://www.cs.uni-sb.de/RW/users/sander/html/gsvcg1.html) and Dot (part of the graph visualization toolkit from AT&T: http://www.research.att.com/sw/tools/graphviz/). It also can produce plain text output (which is more useful for debugging the module itself than anything else, though you might be able to make cut the nodes out and make a mobile or something similar).
OPTIONS
Like any other compiler backend, this module needs to be invoked using the O module to run correctly:
perl -MO=Graph,-opt,-opt,-opt program.pl
OR
perl -MO=Graph,-opt,obj -e BEGIN {$obj = ["hi"]}; print $obj
OR EVEN
perl -e use O qw(Graph -opt obj obj); print "hi!n";
Obj is the name of a perl variable whose contents will be examined. It cant be a my() variable, and it shouldnt have a prefix symbol ($@^*), though you can specify a package -- the name will be used to look up a GV, whose various fields will lead to the scalar, array, and other values that correspond to the named variable. If no object is specified, the whole main program, including the CV that points to its pad, will be displayed.
Each of the the opts can come from one of the following (each set is mutually exclusive; case and underscores are insignificant):
-text, -vcg, -dot
Produce output of the appropriate type. The default is -text, which isnt useful for much of anything (it does draw some nice ASCII boxes, though).
-addrs, -no_addrs
Each of the nodes on the graph produced corresponds to a C structure that has an address and includes pointers to other structures. The module uses these addresses to decide how to draw edges, but it makes the graph more compact if they arent printed. The default is -no_addrs.
-compile_order, -run_order
The collection of OPs that perl compiles a script into has two different layers of structure. It has a tree structure which corresponds roughly to the synactic nesting of constructs in the source text, and a roughly linked-list representation, essentially a postorder traversal of this tree, which is used at runtime to decide what to do next. The graph can be drawn to emphasize one structure or the other. The former, compile_order, is the default, as it tends to lead to graphs with aspect ratios close to those of standard paper.
-SVs, -no_SVs
If OPs represent a programs compiled code, SVs represent its data. This includes literal numbers and strings (IVs, NVs, PVs, PVIVs, and PVNVs), regular arrays, hashes, and references (AVs, HVs, and RVs), but also the structures that correspond to individual variables (special HVs for symbol tables and GVs to represent values within them, and special AVs that hold my() variables (as well as compiler temporaries)), structures that keep track of code (CVs), and a variety of others. The default is to display all these too, to give a complete picture, but if you arent in a holistic mood, you can make them disappear.
-ellipses, -rhombs
The module tries to give the nodes representing SVs a different shape from those of OPs. OPs are usually rectangular, so two obvious shapes for SVs are ellipses and rhombuses (stretched diamonds). This option currently only makes a difference for VCG (ellipse is the default).
-stashes, -no_stashes
The hashes that perl uses to represent symbol tables are called stashes. Since every GV has a pointer back to its stash, its virtually inevitable for the links in a graph to lead to the main stash. Unfortunately stashes, especially the main one, can be quite big, and lead to forests of other structures -- theres one GV and another SV for each magic variable, plus all of @INC and %ENV, and so on. To prevent information overload, then, the display of stashes is disabled by default.
-fileGVs, -no_fileGVs
Another kind graph element that can be annoying are the pointers from every GV and COP (a kind of OP that occurs for every statement) to the GV that represents the file from which that code came (used for error messages). By default, these links arent shown, to keep them from cluttering the graph. Also, perls internal interfaces changed in a recent version, so in perl 5.005_63 or later you cant see the fileGVs at all.
-SEQs, -no_SEQs
As it is visited in the peephole optimization phase, each OP gets a sequence number, which is currently used by anything (except the peephole optimizer, to avoid visiting OPs twice). If you want to see these, ask for them. (COPs have their own sequence numbers too, but theyre more interesting to look at -- for instance, theyre used to bound the lifetimes of lexicals).
-types, -no_types
B::Graph always gives the type of each OP symbolically (entersub), but it can also print the numeric value of the type field, if you want. The default is no_types.
-float, -no_float
Almost every OP has an op_next and an op_sibling pointer, and B::Graph colors them distinctively (pink and light blue, respectively). Because of this, it isnt strictly necessary to anchor the arrow on a line in the OPs box saying op_next. The float option lets the graph layout engine start these arrows wherever it wants, which can sometimes lead to a more pleasing layout, at the expense of being less obvious. The default is not to float.
-targlinks, -no_targlinks
Lexical (my()) variables and temporary values used by individual OPs are stored in pads, per-code arrays linked to the CV. OPs store indexes into these arrays in the op_targ field, but B::Graph can often also draw links directly from the OP to the SV that stores the name of the variable. These links dont correspond to any real pointers, however, and they can make the graph more complicated, so they are disabled by default.
Download (0.012MB)
Added: 2007-06-26 License: Perl Artistic License Price:
851 downloads
Secleted [ 0 ] software to compare
- Page: 1 of 1
- 1
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above svs search only lists software in full, demo and trial versions for free download. 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