timbunce / devel-nytprof

Devel::NYTProf is a powerful feature-rich source code profiler for Perl. (Mostly in maintenance mode, so PRs are much more likely to be acted upon than Issues.)
http://blog.timbunce.org/tag/nytprof/
67 stars 51 forks source link

The nytprofhtml command does not create the dot files for each package at all #140

Closed perlsky closed 4 years ago

perlsky commented 4 years ago

No matter how there are links as following on each html for the packages, there is no dot file for the links.

<a href="home-foobar-perl5-lib-perl5-x86_64-linux-thread-multi-Text-CSV_XS-pm.dot">dot language file</a>.

After the nytprofhtml command, there are always only 2 dot files under the nytprof directory as shown below. $ ls -1 *.dot packages-callgraph.dot subs-callgraph.dot

I believe the NYPProf supports creating dot files for each package.

perlsky commented 4 years ago

I avoided this issue by following modifications on the nytprofhtml file.

Change the following lines

455our %dot_file_generated; 456if ($dot_file_generated{$dot_file}++) { # just once for line/block/sub

as

455our %dot_file_generated; 456$dot_file_generated{$dot_file}++; 457if ($dot_file_generated{$dot_file} == 1) { # just once for line/block/sub

After this modification, I got all the dot files not only for packages but also subroutines.

perlsky commented 4 years ago

This issue was closed by hot fix as an avoidance. Requirements were satisfied enough.