Stefan Kost wrote:
> Chris Rorvick schrieb:
>> I figured out that Sun's dtrace tool allows me to basically script a
>> sampling profiler just as you describe.  Very cool program.  My program
>> is spending more than 50% of its userland time executing code in glib,
>> and a vast majority of that is split evenly between two functions:
>> g_slist_find() and g_slist_remove_all().
>>
>> I'm going to have to do some more work to figure out the context in
>> which these functions are being invoked, but I'm making progress!  :)
>>
> If this is infact your problem, then I wonder how the gtk version can cause a
> difference here. I don't belive there is a huge increase of such calls in 
> newer
> gtk-versions. Would be good it you can get backtraces.
> 
> Stefan

My thought about the locking didn't make much sense in the context of 
where my cycles are being used.  Looking at the version of my app linked 
with the 2.6 libraries, I see calls to neither g_slist_find() nor 
g_slist_remove_all() after initialization.  In contrast, with the 2.12 
library set I see numerous calls to these functions throughout the 
lifetime of the application, all stemming from calls to 
gtk_widget_modify_style().

#0  0xfe286c23 in g_slist_find ()
    from /opt/app/nonc++/glib-2.14/lib/libglib-2.0.so.0
#1  0xfe975a1e in gtk_rc_init_style ()
    from /opt/app/nonc++/gtk+-2.12/lib/libgtk-x11-2.0.so.0
#2  0xfe97aa2a in gtk_rc_get_style ()
    from /opt/app/nonc++/gtk+-2.12/lib/libgtk-x11-2.0.so.0
#3  0xfea3d4a9 in gtk_widget_reset_rc_style ()
    from /opt/app/nonc++/gtk+-2.12/lib/libgtk-x11-2.0.so.0
#4  0xfea3d901 in gtk_widget_modify_color_component ()
    from /opt/app/nonc++/gtk+-2.12/lib/libgtk-x11-2.0.so.0

#0  0xfe286a2e in g_slist_remove_all ()
    from /opt/app/nonc++/glib-2.14/lib/libglib-2.0.so.0
#1  0xfe974a90 in gtk_rc_style_finalize ()
    from /opt/app/nonc++/gtk+-2.12/lib/libgtk-x11-2.0.so.0
#2  0xfe35d851 in g_object_unref ()
    from /opt/app/nonc++/glib-2.14/lib/libgobject-2.0.so.0
#3  0xfe974ca9 in gtk_rc_style_unref ()
    from /opt/app/nonc++/gtk+-2.12/lib/libgtk-x11-2.0.so.0
#4  0xfe25b739 in g_datalist_id_set_data_full ()
    from /opt/app/nonc++/glib-2.14/lib/libglib-2.0.so.0
#5  0xfe35f66f in g_object_set_qdata_full ()
    from /opt/app/nonc++/glib-2.14/lib/libgobject-2.0.so.0
#6  0xfea3d628 in gtk_widget_modify_style ()
    from /opt/app/nonc++/gtk+-2.12/lib/libgtk-x11-2.0.so.0

Chris Rorvick
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to