Re: gobject profile ... (fwd)



On 24 Aug 2001, Owen Taylor wrote:

> 
> Michael Meeks <michael ximian com> writes:
> 
> > Hi there,
> > 
> > 	This may or may not be appreciated - but, I'm profiling test-ui in
> > a nice tight loop doing 1000 batched sets; to see if any obvious
> > bottlenecks come out ( with CVS HEAD libbonoboui/test/test-ui and
> > eazel-tools/prof/prof incidentaly ):
> 
> Oh for decent profiling tools.... this sort of information is useful,
> but without call graphs not that useful. I'd really like to be able
> to see _where_ all the lock/unlock action was coming from.

well, grepping for static_rw on the profile i posted an excerpt from earlier,
(before merging):

Percentage         | Total              | Average            | # Calls | Function                                           | Caller
       5.457186910 |        7.891597889 |        0.000055861 |  141272 | g_static_rw_lock_reader_lock                       | g_type_is_a
       0.413211137 |        0.597541589 |        0.000000981 |  609031 | g_static_rw_lock_reader_unlock                     | g_type_value_table_peek
       0.356503040 |        0.515536426 |        0.000000256 | 2017010 | g_static_rw_lock_signal                            | check_derivation_U
       0.315551063 |        0.456316073 |        0.000000995 |  458668 | g_static_rw_lock_reader_unlock                     | g_type_check_instance_cast
       0.310371477 |        0.448825912 |        0.000000737 |  609031 | g_static_rw_lock_reader_lock                       | g_type_value_table_peek
       0.291520946 |        0.421566298 |        0.000000964 |  437152 | g_static_rw_lock_reader_unlock                     | g_type_instance_is_a
       0.259436296 |        0.375168922 |        0.000000858 |  437152 | g_static_rw_lock_reader_lock                       | g_type_instance_is_a
       0.241135842 |        0.348704769 |        0.000000760 |  458668 | g_static_rw_lock_reader_lock                       | g_type_check_instance_cast
       0.127466436 |        0.184328276 |        0.000000977 |  188734 | g_static_rw_lock_reader_unlock                     | g_type_check_value
       0.107371600 |        0.155269281 |        0.000001099 |  141272 | g_static_rw_lock_reader_unlock                     | g_type_is_a
       0.104787934 |        0.151533061 |        0.000000803 |  188734 | g_static_rw_lock_reader_lock                       | g_type_check_value
       0.045063024 |        0.065165308 |        0.000000960 |   67910 | g_static_rw_lock_reader_unlock                     | g_type_check_instance
       0.033874528 |        0.048985705 |        0.000000721 |   67910 | g_static_rw_lock_reader_lock                       | g_type_check_instance
       0.030600647 |        0.044251371 |        0.000000949 |   46636 | g_static_rw_lock_reader_unlock                     | g_type_parent
       0.023764342 |        0.034365440 |        0.000000737 |   46636 | g_static_rw_lock_reader_lock                       | g_type_parent
       0.011047258 |        0.015975358 |        0.000000964 |   16571 | g_static_rw_lock_reader_unlock                     | g_type_check_class_cast
       0.011022682 |        0.015939819 |        0.000000972 |   16407 | g_static_rw_lock_reader_unlock                     | g_type_create_instance
       0.008998903 |        0.013013248 |        0.000000785 |   16571 | g_static_rw_lock_reader_lock                       | g_type_check_class_cast
       0.008571037 |        0.012394514 |        0.000000755 |   16407 | g_static_rw_lock_reader_lock                       | g_type_create_instance
       0.008351475 |        0.012077006 |        0.000000966 |   12508 | g_static_rw_lock_reader_unlock                     | g_type_check_flags
       0.007822711 |        0.011312365 |        0.000001295 |    8733 | g_static_rw_lock_writer_lock                       | g_type_class_unref
       0.007645536 |        0.011056154 |        0.000001084 |   10203 | g_static_rw_lock_writer_unlock                     | g_type_class_ref
       0.007058462 |        0.010207190 |        0.000001000 |   10203 | g_static_rw_lock_writer_lock                       | g_type_class_ref
       0.006476277 |        0.009365297 |        0.000001072 |    8733 | g_static_rw_lock_writer_unlock                     | g_type_class_unref
       0.006338792 |        0.009166480 |        0.000000733 |   12508 | g_static_rw_lock_reader_lock                       | g_type_check_flags
       0.005474022 |        0.007915943 |        0.000000941 |    8413 | g_static_rw_lock_reader_unlock                     | g_type_name
       0.004684363 |        0.006774023 |        0.000000302 |   22432 | g_static_rw_lock_signal                            | g_type_init_with_debug_flags
       0.004066070 |        0.005879914 |        0.000000699 |    8413 | g_static_rw_lock_reader_lock                       | g_type_name
       0.003020049 |        0.004367270 |        0.000000989 |    4418 | g_static_rw_lock_reader_unlock                     | g_type_free_instance
       0.002317667 |        0.003351561 |        0.000000759 |    4418 | g_static_rw_lock_reader_lock                       | g_type_free_instance
       0.001967414 |        0.002845063 |        0.000000947 |    3004 | g_static_rw_lock_reader_unlock                     | g_type_class_peek
       0.001538016 |        0.002224114 |        0.000000740 |    3004 | g_static_rw_lock_reader_lock                       | g_type_class_peek
       0.001023859 |        0.001480595 |        0.000001015 |    1459 | g_static_rw_lock_reader_unlock                     | g_type_from_name
       0.000940647 |        0.001360263 |        0.000000958 |    1420 | g_static_rw_lock_reader_unlock                     | g_type_class_is_a
       0.000823132 |        0.001190325 |        0.000000838 |    1420 | g_static_rw_lock_reader_lock                       | g_type_class_is_a
       0.000807137 |        0.001167195 |        0.000000973 |    1199 | g_static_rw_lock_reader_unlock                     | g_type_interface_peek
       0.000801767 |        0.001159429 |        0.000001061 |    1093 | g_static_rw_lock_writer_unlock                     | g_type_create_instance
       0.000741548 |        0.001072348 |        0.000000735 |    1459 | g_static_rw_lock_reader_lock                       | g_type_from_name
       0.000621987 |        0.000899451 |        0.000000750 |    1199 | g_static_rw_lock_reader_lock                       | g_type_interface_peek
       0.000536079 |        0.000775221 |        0.000000709 |    1093 | g_static_rw_lock_writer_lock                       | g_type_create_instance
       0.000516023 |        0.000746218 |        0.000001132 |     659 | g_static_rw_lock_writer_unlock                     | g_type_free_instance
       0.000387481 |        0.000560333 |        0.000000850 |     659 | g_static_rw_lock_writer_lock                       | g_type_free_instance
       0.000323339 |        0.000467578 |        0.000000978 |     478 | g_static_rw_lock_reader_unlock                     | g_type_get_qdata
       0.000294195 |        0.000425434 |        0.000001061 |     401 | g_static_rw_lock_reader_unlock                     | check_derivation_U
       0.000285322 |        0.000412601 |        0.000000863 |     478 | g_static_rw_lock_reader_lock                       | g_type_get_qdata
       0.000284615 |        0.000411580 |        0.000001058 |     389 | g_static_rw_lock_reader_unlock                     | type_class_init_Wm
       0.000274917 |        0.000397556 |        0.000001046 |     380 | g_static_rw_lock_writer_unlock                     | type_data_last_unref_Wm
       0.000271071 |        0.000391994 |        0.000001032 |     380 | g_static_rw_lock_reader_unlock                     | type_data_finalize_class_U
       0.000270310 |        0.000390893 |        0.000001005 |     389 | g_static_rw_lock_writer_unlock                     | type_class_init_Wm
       0.000265105 |        0.000383366 |        0.000001131 |     339 | g_static_rw_lock_writer_unlock                     | g_type_register_static
       0.000255677 |        0.000369732 |        0.000000950 |     389 | g_static_rw_lock_writer_lock                       | type_class_init_Wm
       0.000228419 |        0.000330315 |        0.000000824 |     401 | g_static_rw_lock_reader_lock                       | check_derivation_U
       0.000218644 |        0.000316180 |        0.000000832 |     380 | g_static_rw_lock_writer_lock                       | type_data_last_unref_Wm
       0.000217394 |        0.000314371 |        0.000000927 |     339 | g_static_rw_lock_writer_lock                       | g_type_register_static
       0.000203339 |        0.000294047 |        0.000000756 |     389 | g_static_rw_lock_reader_lock                       | type_class_init_Wm
       0.000196341 |        0.000283928 |        0.000000747 |     380 | g_static_rw_lock_reader_lock                       | type_data_finalize_class_U
       0.000167478 |        0.000242189 |        0.000001132 |     214 | g_static_rw_lock_writer_unlock                     | g_type_init_with_debug_flags
       0.000162967 |        0.000235665 |        0.000001117 |     211 | g_static_rw_lock_reader_lock                       | g_type_class_peek_parent
       0.000159792 |        0.000231074 |        0.000001197 |     193 | g_static_rw_lock_writer_unlock                     | g_type_class_ref
       0.000150563 |        0.000217728 |        0.000001032 |     211 | g_static_rw_lock_reader_unlock                     | g_type_class_peek_parent
       0.000150110 |        0.000217073 |        0.000000940 |     231 | g_static_rw_lock_reader_unlock                     | g_type_interfaces
       0.000148901 |        0.000215325 |        0.000001006 |     214 | g_static_rw_lock_writer_lock                       | g_type_init_with_debug_flags
       0.000116533 |        0.000168517 |        0.000000873 |     193 | g_static_rw_lock_writer_lock                       | g_type_class_ref
       0.000111654 |        0.000161462 |        0.000000699 |     231 | g_static_rw_lock_reader_lock                       | g_type_interfaces
       0.000090055 |        0.000130228 |        0.000001010 |     129 | g_static_rw_lock_writer_unlock                     | g_type_set_qdata
       0.000076845 |        0.000111124 |        0.000000861 |     129 | g_static_rw_lock_writer_lock                       | g_type_set_qdata
       0.000075446 |        0.000109102 |        0.000000941 |     116 | g_static_rw_lock_reader_unlock                     | g_type_depth
       0.000055227 |        0.000079863 |        0.000000688 |     116 | g_static_rw_lock_reader_lock                       | g_type_depth
       0.000047917 |        0.000069293 |        0.000001118 |      62 | g_static_rw_lock_writer_unlock                     | g_type_register_dynamic
       0.000038905 |        0.000056261 |        0.000000907 |      62 | g_static_rw_lock_writer_lock                       | g_type_register_dynamic
       0.000014747 |        0.000021326 |        0.000001066 |      20 | g_static_rw_lock_writer_unlock                     | g_type_register_fundamental
       0.000012995 |        0.000018792 |        0.000000940 |      20 | g_static_rw_lock_writer_lock                       | g_type_register_fundamental
       0.000009285 |        0.000013428 |        0.000001678 |       8 | g_static_rw_lock_writer_lock                       | type_iface_vtable_init_Wm
       0.000006701 |        0.000009691 |        0.000001211 |       8 | g_static_rw_lock_writer_unlock                     | g_type_add_interface_static
       0.000006611 |        0.000009560 |        0.000001195 |       8 | g_static_rw_lock_writer_unlock                     | type_iface_vtable_init_Wm
       0.000004646 |        0.000006719 |        0.000000840 |       8 | g_static_rw_lock_writer_lock                       | g_type_add_interface_static
       0.000002410 |        0.000003485 |        0.000001742 |       2 | g_static_rw_lock_writer_unlock                     | g_type_interface_add_prerequisite
       0.000001971 |        0.000002850 |        0.000001425 |       2 | g_static_rw_lock_reader_unlock                     | g_type_children
       0.000001892 |        0.000002736 |        0.000001368 |       2 | g_static_rw_lock_reader_lock                       | g_type_children
       0.000001330 |        0.000001923 |        0.000000961 |       2 | g_static_rw_lock_writer_lock                       | g_type_interface_add_prerequisite


if two lines contain the same function and caller, that's because function has been called
from different places in caller.
this pretty clearly indicates gtype.[hc] causing the invocations.

(i can put up the profile or the profiler code on gtk.org if you want to play
around with it yourself)

> 
> Regards,
>                                         Owen
> 
> 

---
ciaoTJ





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]