Pardon my late...

Somewhere in the thread someone asked what's slow? To help
decide what belongs in/out I just happen to have some profiler(CPROF
http://opensource.corel.com/cprof.htm ) output lying around 
so its *share time*.  

Here is what the wineserver is doing during quick run of Presentations:

Function Name                        calls   func%  func(ms)    f+c%  
f+c(ms)
                                       646 48383280933.641
40899241591081 100.001     84532
select_loop                              1  91.105     77012  99.998    
84530
do_read                              78423   1.509      1275  
8.225      6952
do_write                             78423   1.158       978  
1.225      1035
call_req_handler                     78423   0.741       626  
6.716      5677
strcmpiW                            147794   0.471       398  
0.471       398
get_handle_obj                       78663   0.345       291  
0.751       635
create_anonymous_file                    5   0.334       282  
0.334       282
get_handle                           87822   0.173       146  
0.266       224
client_event                         78423   0.168       142  
8.393      7095
client_reply                         78423   0.163       137  
1.388      1173
send_reply                           78423   0.156       132  
1.545      1305
clear_error                          78425   0.155       130  
0.268       226
req_enum_key_value                   26631   0.141       119  
0.613       518
get_hkey_obj                         57411   0.139       117  
0.664       561
set_error                            97090   0.129       109  
0.129       109
req_get_key_value                    19920   0.128       108  
0.719       607
mem_alloc                            46571   0.128       108  
0.128       108
find_subkey                          41109   0.127       107  
0.434       366
parse_hex                             1614   0.122       103  
0.122       103
grab_object                         132190   0.121       102  
0.121       102
create_key                            9938   0.118       100  
0.674       570
release_object                      133106   0.117        98  
0.121       102
time_before                         126633   0.107        90  
0.107        90
get_magic_handle                     78663   0.100        84  
0.100        84
handle_to_index                      87822   0.093        78  
0.093        78
check_wait                           14852   0.084        71  
0.196       165
enum_value                           26631   0.078        66  
0.111        93
find_value                           24145   0.078        65  
0.242       204
set_select_events                    88826   0.076        64  
0.076        64
req_create_key                        7408   0.075        63  
0.660       558
select_on                             7705   0.068        57  
0.623       526
dump_value                            4153   0.065        55  
0.080        68
get_path_token                       51753   0.064        53  
0.064        53
get_value                            19919   0.062        52  
0.297       250
dump_path                            16067   0.061        51  
0.339       286
[snip - more available ;-)]



The app side(a different run I dont't have a server/app pair):

Function Name                        calls   func%  func(ms)    f+c%  
f+c(ms)
WINPROC_CallWndProc                  24080 1270822242.050
40899241254689  60.181   1936812
                                      1701 1270822155.129 40899238457284
100.000   3218330
 1)server_call_noerr                   199011  91.219   2935726 
91.639   2949232
 2)TryEnterCriticalSection           32758371   2.514     80916  
5.918    190444
 3)CRITSECTION_EnterCriticalSection  29248591   1.963     63183 
11.495    369958
 4)CRITSECTION_LeaveCriticalSection  29248590   1.931     62155  
5.596    180098
 5)__get_teb                         97384526   1.888     60757  
1.888     60757
 6)EnterCriticalSection              32692276   1.430     46018  
7.877    253493
 7)LeaveCriticalSection              32758370   1.383     44513  
3.617    116408
 8)InterlockedDecrement              32772561   1.381     44460  
2.095     67417
 9)GetCurrentThreadId                32758382   1.359     43721  
1.994     64189
10)PROCESS_Current                   30111906   1.256     40406  
1.838     59140
11)GetCurrentProcessId               29628267   1.236     39781  
3.044     97950
12)InterlockedExchangeAdd            43758230   0.951     30621  
0.951     30621
13)InterlockedCompareExchange        32759039   0.707     22756  
0.707     22756
14)InterlockedIncrement              10985669   0.465     14964  
0.703     22628
15)send_request                        199271   0.412     13271  
0.416     13395
[snip]


1) server_call_noerr() - wineserver - is always 91-95% of the app side.
   (The kernel module/syscall looks to address this problem. Yay!)

/* calls 2,3,5 form 3 chains that fill out the top ten */
2) TryEnterCriticalSection                      
   calls - #8  InterlockedDecrement 
           #9  GetCurrentThreadID
           #13 InterlockedCompareExchange

3) CRITSECTION_EnterCriticalSection()
   calls - #6  EnterCriticalSection
           #11 GetCurrentProcessId

4) __get_teb() is pure assembly

5) CRITSECTION_LeaveCriticalSection()
   calls - #7  LeaveCriticalSection

(note: __get_teb and the InterelockedFOO functions are not inlined in
the
 Corel tree.)

I hope this is *on topic* and usefull ( else > /dev/null ).
-Jim
-- 
The address in the headers is not the poster's real email address.  Do not send
private mail to the poster using your mailer's "reply" feature.  CC's of mail 
to mailing lists are OK.  Problem reports to "[EMAIL PROTECTED]".  
The poster's email address is "[EMAIL PROTECTED]".

Reply via email to