guitarmarkus has asked for the wisdom of the Perl Monks concerning the following question:

Hi, When I try to use the -g option of dprofpp dproffpp -g mypack::myfunc
I get the error
Modification of non-creatable array value attempted, subscript -1 at /usr/bin/dprofpp line 662, <fh> line 501.
when I look at tmon.out I can see lines with & 2cb mypack myfunc
.... my version of dprofpp is my $VERSION = '20030813.00';
but apparently Devel::DProf is up to date according to CPAN...
Any clue??? Thanks Mark

Replies are listed 'Best First'.
Re: dprofpp -g broken?
by Khen1950fx (Canon) on Apr 20, 2007 at 05:22 UTC
    I gave it a shot. At first, I got the same error as you, but I played with it for awhile. It finally kicked in. I profiled Math::Pari---

    perl -d:DProf /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi +/Math/Pari.pm dprofpp -g

    I ran it 4 times, and I got different numbers each time. Simon Cozens has said, "Understanding how dprofpp's overhead compensation code works is Not Easy and has meant that I haven't tried to apply overhead compensation in this module. All the data's there if you want to do it yourself. The numbers produced by Devel::DProf are pseudorandom anyway, so this omission shouldn't make any real difference." That says it all. Good luck.

      Do you mean you changed the code of dprofpp? can you send me your changes if so?