Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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/Syslog.pm 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 Syslog.pm 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?"

Comment on Problem with -d:DProf and Sys::Syslog
Select or Download Code
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 bobr (Monk) on Aug 12, 2010 at 08:56 UTC
    Hello,

    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

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.

Log In?
Username:
Password:

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
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-12-18 00:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls