in reply to Re^2: Profiling the C side of an Inline::C module
in thread Profiling the C side of an Inline::C module

Well, my intuition is telling me it will work, if you compile perl with the -pg option, and arrange for the final invocation of ld to use the profiling C runtime. You should end up with a perl that, when run (e.g. with perl -e 1), produces a gmon.out file.

Then, make sure that Inline::C is using the -pg option to compile your module, and when you run perl on your test script, you'll now get a gmon.out file that includes profiling details about your module.

--
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/

Replies are listed 'Best First'.
Re^4: Profiling the C side of an Inline::C module
by samtregar (Abbot) on Sep 05, 2005 at 23:03 UTC
    Alright, I'll give it a try. I was won over when I found in reading perlhack that Perl has built-in support for gprof via the "perl.gprof" make target.

    -sam

      So, did it ever get it to work? If so, can you post a little bit of your recipe? If not, can you enlighten us as to where the process crapped out?
        Well, I did build a "perl.gprof" which worked fine. Then I got side-tracked and never got back to it. If/when I get something working I'll make a new post about it and link it from this one.

        -sam