On 31/08/2011 3:12 AM, Dan Kegel wrote: > Try oprofile instead. > > ( A really old intro is at > http://www.winehq.org/wwn/249#oprofile%20&%20Wine ) >
Using oprofile, testing 500 iterations of ExitProcess.exe with msys-bash under wine: About 2/3 of the active processor time was in wineserver. About 90% of that was spent in the kernel. At least 50% of that time was spent in code related related to ptrace(), which is ultimately called by wineserver::write_process_memory(). The other 1/3 of the active processor time was in wine-preloader. About 70% of that was spent in the kernel. 500 iterations took about 100s to complete at about 100% usage of 1 CPU core. msys-bash uses WriteProcessMemory() to copy 500kB during an emulated fork. This equates to about 125000 ptrace(PTRACE_POKEDATA,...) syscalls, each of which takes about 0.8us on linux 2.6.38. -- Ben Peddell IT Support Bowen, Collinsville, Proserpine and Home Hill Catholic schools http://klightspeed.killerwolves.net/