Re: simplelist speed - profiling
- From: Dan Espen <dane mk telcordia com>
- To: gtk-perl mailing list <gtk-perl-list gnome org>
- Subject: Re: simplelist speed - profiling
- Date: Sun, 09 Jan 2005 19:46:25 -0500
muppet <scott asofyet org> writes:
On Jan 9, 2005, at 2:38 PM, Dan Espen wrote:
Does anyone know the trick to profiling perl code?
what you describe is two different things.
perl -dDProf profiles the subroutine calls of your script.
compiling perl with -pg will profile the actual binary and C-level
calls.
Yep, I understand that.
Then I recompiled Gtk2-1.061 with CCFLAGS=-pg and produced a Gtk2.so.
Then I compiled perl with Configure -Doptimize=-pg and ran my
perlscript
with perl.gprof. That produced a gmon.out, but gtk never appears
in the output, only the perl module itself, like this:
if glib/gtk+/gdk/Xlib have not been compiled with profiling options,
they won't appear in the profiler output.
I compiled Gtk2.so with the profiling option, but there were no
Gtk functions anywhere in the output. (I did a caseless search for
gtk.)
% cumulative self self total
time seconds seconds calls us/call us/call name
10.29 0.14 0.14 83933 1.67 1.93 S_hv_fetch_common
5.15 0.21 0.07 24160 2.90 2.93 Perl_gv_fetchpv
5.15 0.28 0.07 166 421.69 480.69 Perl_yyparse
Is there some way to profile the lower layers of this stuff?
those are the lower layers --- you're seeing the actual interpreter
calls that implement parsing a perl script (yyparse) and manipulating
hashes (hv_fetch_common) and global variables (gv_fetch_pv).
Yes, I understand I'm getting layers of Perl, but I guessed that it loaded Gtk.so
with dlopen or something like that and I'd see the Gtk stuff in the
profile too. For some reason, Gtk doesn't show up.
I've been reading about treeview performance issues on the net and
almost everybody blames Pango.
--
Dan Espen E-mail: dane mk telcordia com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]