Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Problem with -d:DProf and Sys::Syslog

by babel17 (Acolyte)
on Aug 12, 2010 at 02:10 UTC ( #854551=perlquestion: print w/replies, xml ) Need Help??
babel17 has asked for the wisdom of the Perl Monks concerning the following question:

I'm having a bit of an issue with profiling (it's my first attempt at profiling) a syslogd post-processor that I've written, and I'm hoping perhaps some wise monk can give me some guidance, or at least a boot to the head.

The problem is this (using perl 5.10.1 on FreeBSD 8.0 amd64):

d13-sut# perl -d:DProf ./myperldaemon -d panic: Devel::DProf inconsistent subroutine return at /usr/local/lib/p +erl5/5.10.1/mach/Sys/ line 120. Compilation failed in require at ./myperldaemon line 19. BEGIN failed--compilation aborted at ./myperldaemon line 19.

Of course, line 19 is simply

use Sys::Syslog qw( :standard :macros );

The relevent part of is:

115 # And on Win32 systems, we try to use the native mechanism for + this 116 # platform, the events logger, available through Win32::EventL +og. 117 EVENTLOG: { 118 my $is_Win32 = $^O =~ /Win32/i; 119 120 if (can_load("Sys::Syslog::Win32")) { 121 unshift @connectMethods, 'eventlog'; 122 } 123 elsif ($is_Win32) { 124 warn $@; 125 } 126 } 816 sub can_load { 817 local($SIG{__DIE__}, $SIG{__WARN__}, $@); 818 return eval "use $_[0]; 1" 819 }

So my question is: "Is it me? Is it Sys::Syslog? or is it DProf?"

Replies are listed 'Best First'.
Re: Problem with -d:DProf and Sys::Syslog
by BrowserUk (Pope) on Aug 12, 2010 at 02:27 UTC

    From Perldiag:

    =item panic: Devel::DProf inconsistent subroutine return

    (P) Devel::DProf called a subroutine that exited using goto(LABEL), last(LABEL) or next(LABEL). Leaving that way a subroutine called from an XSUB will lead very probably to a crash of the interpreter. This is a bug that will hopefully one day get fixed.

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: Problem with -d:DProf and Sys::Syslog
by FunkyMonk (Canon) on Aug 12, 2010 at 09:37 UTC
    I'd like to expand a little on bobr's comment:

    Also NYTProf is IMO much better profiler than DProf

    It's not just that NYTProf is better than DProf. It's more that DProf is utterly broken on modern (ie fast) processors. See Tim Bunce's (Devel::NYTProf's author) blog for much more. In particular, Tim explains the problems with Dprof in Devel::DProf broken by the passage of time.

Re: Problem with -d:DProf and Sys::Syslog
by bobr (Monk) on Aug 12, 2010 at 08:56 UTC

    I just tried very simple script

    use Sys::Syslog qw( :standard :macros );

    with Devel::NYTProf profiler and it went over just fine. Also NYTProf is IMO much better profiler than DProf.

    -- Roman

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://854551]
Approved by planetscape
Front-paged by Old_Gray_Bear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2017-05-28 23:01 GMT
Find Nodes?
    Voting Booth?