Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Problems with Devel::DProf

by HuckinFappy (Pilgrim)
on Jun 26, 2006 at 17:01 UTC ( #557615=perlquestion: print w/replies, xml ) Need Help??

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

Good morning your holinesses

I have had a lot of success using Devel::DProf to help me identify the slower parts of my programs, and speed them up.

However, I have several programs that does not work for. These are larger, longer running programs. For example, the one I'm focusing on now generates a 242 MB tmon.out file when run through Devel::DProf

What happens is when I run dprofpp I'll get a message similar to:

Bad profile: - 26f at /tools/xgs/perl/5.8.5/bin/dprofpp line 743, <fh> + line 20464.
When I look, line 20464 contains 26941 ^@ characters

I anticipate a variety of responses telling me to break it down to a smaller problem, profile pieces of it, etc. I've considered that and have made some attempts. And perhaps I'll get the profiling information I need via some other route. But I'd like to understand what is happening here, and if there's anything I can do to get Devel::DProf to work when I do experience this.


Replies are listed 'Best First'.
Re: Problems with Devel::DProf
by shmem (Chancellor) on Jun 26, 2006 at 17:56 UTC
    Namaste, fellow monk.

    Just ideas..

    That just looks like if /dev/zero were leaking... ;-) is it the only corrupt line in the tmon.out file? Maybe there is a pattern. Flushing buffers to the wrong place... hm.

    I'd check whether the tmon.out file is otherwise useable and if so, copied dprofpp to $HOME/trashbin and hacked it not to die and ignore these lines, to get at my profiling data (which I wouldn't trust too much, given the circumstances :-). I'd check also the surroundings of the strange noise lines and looked whether there's something strange happening in the called subs. *shrug*

    Maybe it's not even perl-related, but an OS/FS issue. Where is the tmon.out file written to? /tmp ? tmpfs mounted? Which OS do you run and what perl version? It would be handy if you posted that information, so others with more wisdom than I had it at hand whilst thinking, and must not ask.

    Do the programs which don't work have anything in common? well, just ideas..


    _($_=" "x(1<<5)."?\n".q/)Oo.  G\        /
                                  /\_/(q    /
    ----------------------------  \__(m.====.(_("always off the crowd"))."
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      Thank you for the ideas. And you're correct, I need to provide more information:
      • perl 5.8.5
      • Devel::DProf::VERSION 20030813.00
      • Red Hat machines, with kernels from 2.4.21-2.6.16
      • Writing either to local ext3 filesystems or over NFS mounts
      I can't seem to make the file usable...removing the bad data leads to other messages about 'garbled data', and further efforts just make things worse.
        I seem to have some issue also running this.
        I do have tmout.out but get below
        [root@myserver]# dprofpp $Monfile is tmon.out Exporter::Heavy::heavy_export Garbled profile, unexpected exit time stamp at /usr/bin/dprofpp line 6 +67, <fh> line 195. line where issue is below sub exitstamp { my($stack, $tstack, $t, $times, $ctimes, $name, $in, $tab, $de +ep) = @_; my( $x, $c, $z ); $x = pop( @$stack ); if( ! defined $x ){ die "Garbled profile, missing an enter time stamp"; } if( $x->[0] ne $name ){ if ($x->[0] =~ /::AUTOLOAD$/) { if ($opt_A) { $name = $x->[0]; } } elsif ( $opt_F ) { warn( "Garbled profile, faking exit timestamp:\n\t$name => + $x->[0].\n"); $name = $x->[0]; } else { foreach $z (@stack, $x) { print $z->[0],"\n"; } die "Garbled profile, unexpected exit time stamp"; } [root@myserver]# uname -a Linux myserver 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i +686 i686 i386 GNU/Linux [root@myserver]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 8 model name : Pentium III (Coppermine) stepping : 3 cpu MHz : 647.233 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov + pat pse36 mmx fxsr sse up bogomips : 12
        <UPDATE> for now I just commenented out the DIE part and program ran.. not sure if that's a solution but I get to see some results

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://557615]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2023-06-04 03:50 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (17 votes). Check out past polls.