bugfix for previous patch - xcompmgr.c
Daniel Krippner
Daniel.Krippner@gmx.net
Thu, 04 Dec 2003 22:32:32 +0100
This is a multi-part message in MIME format.
--------------060501020403000605070104
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
I did some xcompmgr profiling "to get in the mood" - I attached results
without and with Michael's patch. I think the hot spots have been taken
care of.
I'll try to gain some real insights into xcompmgr's code during the next
days, and maybe we can make some propsitions as to how to improve
structure sometime soon...
regards,
Daniel
- --
Daniel.Krippner@gmx.net
With lies you may get ahead in life but you can never turn back. - Old
Russian proverb.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE/z6fwljJMSNfTnbMRAsScAJ9h/yXL0uTVpZcY21a3mGF6UK0uaQCcC6dc
L9XIFjQlOT9kZUyXWw7XlZM=
=Lr9m
-----END PGP SIGNATURE-----
--------------060501020403000605070104
Content-Type: text/plain;
name="xcompmgr.prof"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="xcompmgr.prof"
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
29.41 0.25 0.25 272 0.92 1.80 make_shadow
28.24 0.49 0.24 168988 0.00 0.00 sum_gaussian
17.65 0.64 0.15 96729 0.00 0.01 paint_all
14.12 0.76 0.12 99851 0.00 0.00 find_win
3.53 0.79 0.03 main
2.35 0.81 0.02 97326 0.00 0.00 repair_win
1.18 0.82 0.01 97326 0.00 0.00 damage_win
1.18 0.83 0.01 96729 0.00 0.00 paint_root
1.18 0.84 0.01 1617 0.01 0.04 configure_win
1.18 0.85 0.01 2 5.00 5.00 root_tile
0.00 0.85 0.00 98915 0.00 0.00 add_damage
0.00 0.85 0.00 8331 0.00 0.06 win_extents
0.00 0.85 0.00 7000 0.00 0.00 border_size
0.00 0.85 0.00 1610 0.00 0.00 restack_win
0.00 0.85 0.00 576 0.00 0.00 gaussian
0.00 0.85 0.00 531 0.00 0.00 unmap_win
0.00 0.85 0.00 464 0.00 0.00 add_win
0.00 0.85 0.00 432 0.00 0.00 determine_mode
0.00 0.85 0.00 432 0.00 0.00 get_trans_prop
0.00 0.85 0.00 423 0.00 0.00 destroy_win
0.00 0.85 0.00 377 0.00 0.00 map_win
0.00 0.85 0.00 287 0.00 0.00 expose_root
0.00 0.85 0.00 272 0.00 1.80 shadow_picture
0.00 0.85 0.00 1 0.00 0.00 make_gaussian_map
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Call graph (explanation follows)
granularity: each sample hit covers 4 byte(s) for 1.18% of 0.85 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.03 0.82 main [1]
0.15 0.43 96729/96729 paint_all [2]
0.01 0.15 97326/97326 damage_win [7]
0.01 0.06 1617/1617 configure_win [10]
0.00 0.00 498/531 unmap_win [13]
0.00 0.00 306/377 map_win [14]
0.00 0.00 464/464 add_win [15]
0.00 0.00 423/423 destroy_win [16]
0.00 0.00 287/287 expose_root [23]
0.00 0.00 1/1 make_gaussian_map [24]
-----------------------------------------------
0.15 0.43 96729/96729 main [1]
[2] 68.4 0.15 0.43 96729 paint_all [2]
0.00 0.41 7001/8331 win_extents [3]
0.01 0.01 96729/96729 paint_root [11]
0.00 0.00 7000/7000 border_size [18]
-----------------------------------------------
0.00 0.02 299/8331 repair_win [8]
0.00 0.06 1031/8331 configure_win [10]
0.00 0.41 7001/8331 paint_all [2]
[3] 57.6 0.00 0.49 8331 win_extents [3]
0.00 0.49 272/272 shadow_picture [5]
-----------------------------------------------
0.25 0.24 272/272 shadow_picture [5]
[4] 57.6 0.25 0.24 272 make_shadow [4]
0.24 0.00 168988/168988 sum_gaussian [6]
-----------------------------------------------
0.00 0.49 272/272 win_extents [3]
[5] 57.6 0.00 0.49 272 shadow_picture [5]
0.25 0.24 272/272 make_shadow [4]
-----------------------------------------------
0.24 0.00 168988/168988 make_shadow [4]
[6] 28.2 0.24 0.00 168988 sum_gaussian [6]
-----------------------------------------------
0.01 0.15 97326/97326 main [1]
[7] 19.4 0.01 0.15 97326 damage_win [7]
0.02 0.13 97326/97326 repair_win [8]
-----------------------------------------------
0.02 0.13 97326/97326 damage_win [7]
[8] 18.2 0.02 0.13 97326 repair_win [8]
0.12 0.00 97326/99851 find_win [9]
0.00 0.02 299/8331 win_extents [3]
0.00 0.00 97313/98915 add_damage [17]
-----------------------------------------------
0.00 0.00 377/99851 map_win [14]
0.00 0.00 531/99851 unmap_win [13]
0.00 0.00 1617/99851 configure_win [10]
0.12 0.00 97326/99851 repair_win [8]
[9] 14.1 0.12 0.00 99851 find_win [9]
-----------------------------------------------
0.01 0.06 1617/1617 main [1]
[10] 8.5 0.01 0.06 1617 configure_win [10]
0.00 0.06 1031/8331 win_extents [3]
0.00 0.00 1617/99851 find_win [9]
0.00 0.00 1610/1610 restack_win [19]
0.00 0.00 1031/98915 add_damage [17]
-----------------------------------------------
0.01 0.01 96729/96729 paint_all [2]
[11] 2.4 0.01 0.01 96729 paint_root [11]
0.01 0.00 2/2 root_tile [12]
-----------------------------------------------
0.01 0.00 2/2 paint_root [11]
[12] 1.2 0.01 0.00 2 root_tile [12]
-----------------------------------------------
0.00 0.00 33/531 destroy_win [16]
0.00 0.00 498/531 main [1]
[13] 0.1 0.00 0.00 531 unmap_win [13]
0.00 0.00 531/99851 find_win [9]
0.00 0.00 284/98915 add_damage [17]
-----------------------------------------------
0.00 0.00 71/377 add_win [15]
0.00 0.00 306/377 main [1]
[14] 0.1 0.00 0.00 377 map_win [14]
0.00 0.00 377/99851 find_win [9]
-----------------------------------------------
0.00 0.00 464/464 main [1]
[15] 0.0 0.00 0.00 464 add_win [15]
0.00 0.00 71/377 map_win [14]
0.00 0.00 432/432 determine_mode [21]
-----------------------------------------------
0.00 0.00 423/423 main [1]
[16] 0.0 0.00 0.00 423 destroy_win [16]
0.00 0.00 33/531 unmap_win [13]
-----------------------------------------------
0.00 0.00 284/98915 unmap_win [13]
0.00 0.00 287/98915 expose_root [23]
0.00 0.00 1031/98915 configure_win [10]
0.00 0.00 97313/98915 repair_win [8]
[17] 0.0 0.00 0.00 98915 add_damage [17]
-----------------------------------------------
0.00 0.00 7000/7000 paint_all [2]
[18] 0.0 0.00 0.00 7000 border_size [18]
-----------------------------------------------
0.00 0.00 1610/1610 configure_win [10]
[19] 0.0 0.00 0.00 1610 restack_win [19]
-----------------------------------------------
0.00 0.00 576/576 make_gaussian_map [24]
[20] 0.0 0.00 0.00 576 gaussian [20]
-----------------------------------------------
0.00 0.00 432/432 add_win [15]
[21] 0.0 0.00 0.00 432 determine_mode [21]
0.00 0.00 432/432 get_trans_prop [22]
-----------------------------------------------
0.00 0.00 432/432 determine_mode [21]
[22] 0.0 0.00 0.00 432 get_trans_prop [22]
-----------------------------------------------
0.00 0.00 287/287 main [1]
[23] 0.0 0.00 0.00 287 expose_root [23]
0.00 0.00 287/98915 add_damage [17]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[24] 0.0 0.00 0.00 1 make_gaussian_map [24]
0.00 0.00 576/576 gaussian [20]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Index by function name
[17] add_damage (xcompmgr.c) [9] find_win (xcompmgr.c) [11] paint_root (xcompmgr.c)
[15] add_win (xcompmgr.c) [20] gaussian (xcompmgr.c) [8] repair_win (xcompmgr.c)
[18] border_size (xcompmgr.c) [22] get_trans_prop (xcompmgr.c) [19] restack_win
[10] configure_win (xcompmgr.c) [1] main [12] root_tile (xcompmgr.c)
[7] damage_win (xcompmgr.c) [24] make_gaussian_map (xcompmgr.c) [5] shadow_picture (xcompmgr.c)
[16] destroy_win (xcompmgr.c) [4] make_shadow (xcompmgr.c) [6] sum_gaussian (xcompmgr.c)
[21] determine_mode (xcompmgr.c) [14] map_win (xcompmgr.c) [13] unmap_win (xcompmgr.c)
[23] expose_root (xcompmgr.c) [2] paint_all (xcompmgr.c) [3] win_extents (xcompmgr.c)
--------------060501020403000605070104
Content-Type: text/plain;
name="xcompmgrMK2.prof"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="xcompmgrMK2.prof"
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
57.79 1.52 1.52 98028 0.02 0.02 paint_all
30.04 2.31 0.79 101288 0.01 0.01 find_win
5.70 2.46 0.15 main
3.04 2.54 0.08 98870 0.00 0.01 repair_win
0.76 2.56 0.02 100291 0.00 0.00 add_damage
0.76 2.58 0.02 98870 0.00 0.01 damage_win
0.76 2.60 0.02 214 0.09 0.14 make_shadow
0.38 2.61 0.01 131844 0.00 0.00 sum_gaussian
0.38 2.62 0.01 98028 0.00 0.00 paint_root
0.38 2.63 0.01 2 5.00 5.00 root_tile
0.00 2.63 0.00 9799 0.00 0.00 win_extents
0.00 2.63 0.00 8431 0.00 0.00 border_size
0.00 2.63 0.00 1493 0.00 0.01 configure_win
0.00 2.63 0.00 1478 0.00 0.00 restack_win
0.00 2.63 0.00 576 0.00 0.00 gaussian
0.00 2.63 0.00 532 0.00 0.01 unmap_win
0.00 2.63 0.00 484 0.00 0.00 add_win
0.00 2.63 0.00 430 0.00 0.00 determine_mode
0.00 2.63 0.00 430 0.00 0.00 get_trans_prop
0.00 2.63 0.00 421 0.00 0.00 destroy_win
0.00 2.63 0.00 393 0.00 0.01 map_win
0.00 2.63 0.00 214 0.00 0.14 shadow_picture
0.00 2.63 0.00 83 0.00 0.00 expose_root
0.00 2.63 0.00 1 0.00 0.00 make_gaussian_map
0.00 2.63 0.00 1 0.00 0.00 make_gaussian_sums
% the percentage of the total running time of the
time program used by this function.
cumulative a running sum of the number of seconds accounted
seconds for by this function and those listed above it.
self the number of seconds accounted for by this
seconds function alone. This is the major sort for this
listing.
calls the number of times this function was invoked, if
this function is profiled, else blank.
self the average number of milliseconds spent in this
ms/call function per call, if this function is profiled,
else blank.
total the average number of milliseconds spent in this
ms/call function and its descendents per call, if this
function is profiled, else blank.
name the name of the function. This is the minor sort
for this listing. The index shows the location of
the function in the gprof listing. If the index is
in parenthesis it shows where it would appear in
the gprof listing if it were to be printed.
Call graph (explanation follows)
granularity: each sample hit covers 4 byte(s) for 0.38% of 2.63 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.15 2.48 main [1]
1.52 0.05 98028/98028 paint_all [2]
0.02 0.87 98870/98870 damage_win [3]
0.00 0.02 1493/1493 configure_win [11]
0.00 0.00 489/532 unmap_win [14]
0.00 0.00 296/393 map_win [15]
0.00 0.00 484/484 add_win [16]
0.00 0.00 421/421 destroy_win [17]
0.00 0.00 83/83 expose_root [18]
0.00 0.00 1/1 make_gaussian_map [24]
-----------------------------------------------
1.52 0.05 98028/98028 main [1]
[2] 59.5 1.52 0.05 98028 paint_all [2]
0.00 0.03 8431/9799 win_extents [6]
0.01 0.01 98028/98028 paint_root [10]
0.00 0.00 8431/8431 border_size [19]
-----------------------------------------------
0.02 0.87 98870/98870 main [1]
[3] 33.9 0.02 0.87 98870 damage_win [3]
0.08 0.79 98870/98870 repair_win [4]
-----------------------------------------------
0.08 0.79 98870/98870 damage_win [3]
[4] 33.1 0.08 0.79 98870 repair_win [4]
0.77 0.00 98870/101288 find_win [5]
0.02 0.00 98850/100291 add_damage [9]
0.00 0.00 281/9799 win_extents [6]
-----------------------------------------------
0.00 0.00 393/101288 map_win [15]
0.00 0.00 532/101288 unmap_win [14]
0.01 0.00 1493/101288 configure_win [11]
0.77 0.00 98870/101288 repair_win [4]
[5] 30.0 0.79 0.00 101288 find_win [5]
-----------------------------------------------
0.00 0.00 281/9799 repair_win [4]
0.00 0.00 1087/9799 configure_win [11]
0.00 0.03 8431/9799 paint_all [2]
[6] 1.1 0.00 0.03 9799 win_extents [6]
0.00 0.03 214/214 shadow_picture [8]
-----------------------------------------------
0.02 0.01 214/214 shadow_picture [8]
[7] 1.1 0.02 0.01 214 make_shadow [7]
0.01 0.00 131844/131844 sum_gaussian [12]
-----------------------------------------------
0.00 0.03 214/214 win_extents [6]
[8] 1.1 0.00 0.03 214 shadow_picture [8]
0.02 0.01 214/214 make_shadow [7]
-----------------------------------------------
0.00 0.00 83/100291 expose_root [18]
0.00 0.00 271/100291 unmap_win [14]
0.00 0.00 1087/100291 configure_win [11]
0.02 0.00 98850/100291 repair_win [4]
[9] 0.8 0.02 0.00 100291 add_damage [9]
-----------------------------------------------
0.01 0.01 98028/98028 paint_all [2]
[10] 0.8 0.01 0.01 98028 paint_root [10]
0.01 0.00 2/2 root_tile [13]
-----------------------------------------------
0.00 0.02 1493/1493 main [1]
[11] 0.6 0.00 0.02 1493 configure_win [11]
0.01 0.00 1493/101288 find_win [5]
0.00 0.00 1087/9799 win_extents [6]
0.00 0.00 1087/100291 add_damage [9]
0.00 0.00 1478/1478 restack_win [20]
-----------------------------------------------
0.01 0.00 131844/131844 make_shadow [7]
[12] 0.4 0.01 0.00 131844 sum_gaussian [12]
-----------------------------------------------
0.01 0.00 2/2 paint_root [10]
[13] 0.4 0.01 0.00 2 root_tile [13]
-----------------------------------------------
0.00 0.00 43/532 destroy_win [17]
0.00 0.00 489/532 main [1]
[14] 0.2 0.00 0.00 532 unmap_win [14]
0.00 0.00 532/101288 find_win [5]
0.00 0.00 271/100291 add_damage [9]
-----------------------------------------------
0.00 0.00 97/393 add_win [16]
0.00 0.00 296/393 main [1]
[15] 0.1 0.00 0.00 393 map_win [15]
0.00 0.00 393/101288 find_win [5]
-----------------------------------------------
0.00 0.00 484/484 main [1]
[16] 0.0 0.00 0.00 484 add_win [16]
0.00 0.00 97/393 map_win [15]
0.00 0.00 430/430 determine_mode [22]
-----------------------------------------------
0.00 0.00 421/421 main [1]
[17] 0.0 0.00 0.00 421 destroy_win [17]
0.00 0.00 43/532 unmap_win [14]
-----------------------------------------------
0.00 0.00 83/83 main [1]
[18] 0.0 0.00 0.00 83 expose_root [18]
0.00 0.00 83/100291 add_damage [9]
-----------------------------------------------
0.00 0.00 8431/8431 paint_all [2]
[19] 0.0 0.00 0.00 8431 border_size [19]
-----------------------------------------------
0.00 0.00 1478/1478 configure_win [11]
[20] 0.0 0.00 0.00 1478 restack_win [20]
-----------------------------------------------
0.00 0.00 576/576 make_gaussian_map [24]
[21] 0.0 0.00 0.00 576 gaussian [21]
-----------------------------------------------
0.00 0.00 430/430 add_win [16]
[22] 0.0 0.00 0.00 430 determine_mode [22]
0.00 0.00 430/430 get_trans_prop [23]
-----------------------------------------------
0.00 0.00 430/430 determine_mode [22]
[23] 0.0 0.00 0.00 430 get_trans_prop [23]
-----------------------------------------------
0.00 0.00 1/1 main [1]
[24] 0.0 0.00 0.00 1 make_gaussian_map [24]
0.00 0.00 576/576 gaussian [21]
0.00 0.00 1/1 make_gaussian_sums [25]
-----------------------------------------------
0.00 0.00 1/1 make_gaussian_map [24]
[25] 0.0 0.00 0.00 1 make_gaussian_sums [25]
-----------------------------------------------
This table describes the call tree of the program, and was sorted by
the total amount of time spent in each function and its children.
Each entry in this table consists of several lines. The line with the
index number at the left hand margin lists the current function.
The lines above it list the functions that called this function,
and the lines below it list the functions this one called.
This line lists:
index A unique number given to each element of the table.
Index numbers are sorted numerically.
The index number is printed next to every function name so
it is easier to look up where the function in the table.
% time This is the percentage of the `total' time that was spent
in this function and its children. Note that due to
different viewpoints, functions excluded by options, etc,
these numbers will NOT add up to 100%.
self This is the total amount of time spent in this function.
children This is the total amount of time propagated into this
function by its children.
called This is the number of times the function was called.
If the function called itself recursively, the number
only includes non-recursive calls, and is followed by
a `+' and the number of recursive calls.
name The name of the current function. The index number is
printed after it. If the function is a member of a
cycle, the cycle number is printed between the
function's name and the index number.
For the function's parents, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the function into this parent.
children This is the amount of time that was propagated from
the function's children into this parent.
called This is the number of times this parent called the
function `/' the total number of times the function
was called. Recursive calls to the function are not
included in the number after the `/'.
name This is the name of the parent. The parent's index
number is printed after it. If the parent is a
member of a cycle, the cycle number is printed between
the name and the index number.
If the parents of the function cannot be determined, the word
`<spontaneous>' is printed in the `name' field, and all the other
fields are blank.
For the function's children, the fields have the following meanings:
self This is the amount of time that was propagated directly
from the child into the function.
children This is the amount of time that was propagated from the
child's children to the function.
called This is the number of times the function called
this child `/' the total number of times the child
was called. Recursive calls by the child are not
listed in the number after the `/'.
name This is the name of the child. The child's index
number is printed after it. If the child is a
member of a cycle, the cycle number is printed
between the name and the index number.
If there are any cycles (circles) in the call graph, there is an
entry for the cycle-as-a-whole. This entry shows who called the
cycle (as parents) and the members of the cycle (as children.)
The `+' recursive calls entry shows the number of function calls that
were internal to the cycle, and the calls entry for each member shows,
for that member, how many times it was called from other members of
the cycle.
Index by function name
[9] add_damage (xcompmgr.c) [21] gaussian (xcompmgr.c) [4] repair_win (xcompmgr.c)
[16] add_win (xcompmgr.c) [23] get_trans_prop (xcompmgr.c) [20] restack_win
[19] border_size (xcompmgr.c) [1] main [13] root_tile (xcompmgr.c)
[11] configure_win (xcompmgr.c) [24] make_gaussian_map (xcompmgr.c) [8] shadow_picture (xcompmgr.c)
[3] damage_win (xcompmgr.c) [25] make_gaussian_sums (xcompmgr.c) [12] sum_gaussian (xcompmgr.c)
[17] destroy_win (xcompmgr.c) [7] make_shadow (xcompmgr.c) [14] unmap_win (xcompmgr.c)
[22] determine_mode (xcompmgr.c) [15] map_win (xcompmgr.c) [6] win_extents (xcompmgr.c)
[18] expose_root (xcompmgr.c) [2] paint_all (xcompmgr.c)
[5] find_win (xcompmgr.c) [10] paint_root (xcompmgr.c)
--------------060501020403000605070104--