http://bugs.winehq.org/show_bug.cgi?id=19960
Summary: NtQuerySystemInformation( SystemProcessorPerformanceInformation returns stale and incorrect values Product: Wine Version: 1.1.29 Platform: PC URL: http://rh-software.com/ OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs@winehq.org ReportedBy: ray@pobox.co.uk CC: ray@pobox.co.uk
NtQuerySystemInformation( SystemProcessorPerformanceInformation, ...) has the following issues:
1) DpcTime, IntTime, IntCount not zeroed, they need to be rather then returning random values. 2) KernelTime should include IdleTime. This is the case on Windows as the per CPU Idle threads run in Kernel mode. 3) the numbers returned should be 100ns ticks, not clock ticks as this is what Windows returns.
I have worked round all 3 of these issues in my SIV (http://rh-software.com/) program (4.01 and later). If they get fixed then please tell what will be returned by the fixed version.
Both the __APPLE__ and the default sections need fixing starting from around line 982 in dlls\ntdll\nt.c. The first 2 fixes are trivial and I can't imagine the last one being too dificult. The current code seems also very strange in that loads values into heap space when it would be much simpler and faster to write them directly back to the user buffer.