[Bug 19960] New: NtQuerySystemInformation( SystemProcessorPerformanceInformation returns stale and incorrect values
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(a)winehq.org ReportedBy: ray(a)pobox.co.uk CC: ray(a)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. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #1 from red-ray <ray(a)pobox.co.uk> 2009-09-06 14:53:07 --- The correct structure definition is: typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION { LARGE_INTEGER IdleTime; LARGE_INTEGER KernelTime; LARGE_INTEGER UserTime; LARGE_INTEGER DpcTime; LARGE_INTEGER IntTime; ULONG IntCount; } SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION; -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Alias|red-ray | Severity|normal |enhancement -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 red-ray <ray(a)pobox.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 --- Comment #2 from red-ray <ray(a)pobox.co.uk> 2009-09-06 17:05:01 --- *** This bug has been confirmed by popular vote. *** -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #3 from Austin English <austinenglish(a)gmail.com> 2009-09-06 18:15:45 --- Please send patches to wine-patches(a)winehq.org. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #4 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2009-09-06 19:37:51 --- You can't confirm your own bugs. Do not do that. Next time the bug will be closed as invalid. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #5 from red-ray <ray(a)pobox.co.uk> 2009-09-07 04:00:09 --- (In reply to comment #4)
You can't confirm your own bugs. Do not do that. Next time the bug will be closed as invalid.
Sorry, finger trouble, I am new to using this system. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv(a)dawncrow.de --- Comment #6 from André H. <nerv(a)dawncrow.de> 2009-09-07 09:20:27 --- dup of Bug 18705? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #7 from red-ray <ray(a)pobox.co.uk> 2009-09-07 12:56:12 --- (In reply to comment #6)
dup of Bug 18705?
Thankyou for highlighting the other bug. Bug 18705 mentions my point 3 (100ns ticks) but does not mention my other issues. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #8 from Juan Lang <juan_lang(a)yahoo.com> 2009-09-09 12:10:53 --- (In reply to comment #7)
Thankyou for highlighting the other bug. Bug 18705 mentions my point 3 (100ns ticks) but does not mention my other issues.
In fact it also mentions your point 2), idle time. So this bug is really about DpcTime, IntTime, and IntCount being non-zero. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #9 from red-ray <ray(a)pobox.co.uk> 2009-09-10 06:38:35 --- Created an attachment (id=23536) --> (http://bugs.winehq.org/attachment.cgi?id=23536) siv -save=[wine-perf]=stdout log file -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #10 from red-ray <ray(a)pobox.co.uk> 2009-09-10 06:44:28 --- (In reply to comment #8)
(In reply to comment #7)
Thankyou for highlighting the other bug. Bug 18705 mentions my point 3 (100ns ticks) but does not mention my other issues. In fact it also mentions your point 2), idle time. So this bug is really about DpcTime, IntTime, and IntCount being non-zero.
I have searched Bug 18705 for the word Kernel and could not find it. It talks about idle time not changing, but I can not find where it says "KernelTime should include IdleTime" or words to that effect. I have enhanced SIV 4.01 to be able to clearly show the strange numbers being returned bu using the command siv -save=[wine-perf]=stdout. I expect to release SIV 4.01 this weekend, but can supply a Beta before then if needbe. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #11 from ray(a)pobox.co.uk 2011-04-15 03:56:40 CDT --- Created an attachment (id=34122) --> (http://bugs.winehq.org/attachment.cgi?id=34122) Fix kernel time to include idle time -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #12 from ray(a)pobox.co.uk 2011-04-15 03:57:20 CDT --- Created an attachment (id=34123) --> (http://bugs.winehq.org/attachment.cgi?id=34123) Test results from Wine -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #13 from ray(a)pobox.co.uk 2011-04-15 03:57:57 CDT --- Created an attachment (id=34124) --> (http://bugs.winehq.org/attachment.cgi?id=34124) Test results from real Windows 7 system -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #14 from ray(a)pobox.co.uk 2011-04-15 03:59:19 CDT --- I noticed most of this request had been implemented so I have created the attached patch to complete the fixes needed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 ray(a)pobox.co.uk changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Version|1.1.29 |1.3.17 Difficulty|--- |Minutes Severity|enhancement |minor -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|1.3.17 |1.1.29 Difficulty|Minutes |--- --- Comment #15 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2011-04-15 04:04:35 CDT --- Please do not change an originally reported Wine version, and stop touching the Difficulty field. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #16 from ray(a)pobox.co.uk 2011-04-15 05:41:23 CDT --- (In reply to comment #15)
Please do not change an originally reported Wine version, and stop touching the Difficulty field.
You told me the Difficulty field should be changed by the developer and as I developed the patch I changed it. I can see why you wish me not to enter how difficult I think a change is but having done the change I can't see why you are whinging. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 ray(a)pobox.co.uk changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #17 from ray(a)pobox.co.uk 2011-04-15 10:54:37 CDT --- This has been fixed as of V1.3.17-320. Thank you. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #18 from Alexandre Julliard <julliard(a)winehq.org> 2011-04-15 12:50:32 CDT --- Closing bugs fixed in 1.3.18. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 ray(a)rh-software.com changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |WORKSFORME --- Comment #19 from ray(a)rh-software.com 2011-04-18 02:14:44 CDT --- (In reply to comment #18)
Closing bugs fixed in 1.3.18.
I have just looked at the changes made by the patch that fixes this and issues still exist for the #ifdef __APPLE__ code. I don't have an apple system, so I can't test this, but I am 100% sure the current code is incorrect. I think the following changes are needed to fix this: 1) RtlReAllocateHeap() to specify HEAP_ZERO_MEMORY 2) add the nice time to the user time 3) add the idle time to the kernel time 4) convert from ticks to 100ns units I could create a patch, but as I can't compile or test it I feel this is inappropiate. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WORKSFORME |FIXED --- Comment #20 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2011-04-18 04:41:27 CDT --- The bug is fixed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #21 from ray(a)rh-software.com 2011-04-18 04:56:13 CDT --- (In reply to comment #20)
The bug is fixed.
Why do you say this when the code is clearly incorrect? I will submit a patch. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #22 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2011-04-18 05:03:41 CDT --- (In reply to comment #21)
Why do you say this when the code is clearly incorrect?
If you claim it's not fixed what's the point in changing resolution from FIXED to WORKSFORME? Besides the bug was reported for Linux. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #23 from ray(a)rh-software.com 2011-04-18 05:40:34 CDT --- (In reply to comment #22)
(In reply to comment #21)
Why do you say this when the code is clearly incorrect?
If you claim it's not fixed what's the point in changing resolution from FIXED to WORKSFORME? Besides the bug was reported for Linux.
It works for Linux and does not work for apple. Of the options available WORKSFORME clearly the best summary of this. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #24 from Alexandre Julliard <julliard(a)winehq.org> 2011-04-18 05:44:38 CDT --- WORKSFORME indicates that there is no bug, only a problem with the reporter's setup. It clearly doesn't make any sense here. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 Boris <bstriker(a)ya.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bstriker(a)ya.ru --- Comment #25 from Boris <bstriker(a)ya.ru> 2011-04-18 05:47:49 CDT ---
The bug is fixed
Is it required to get a report from an Apple user to fix this bug? I think we will wait for a long time for an Apple user as smart as Ray. I have no Apple system, and I'm not sympatize this company. I just wonder why a known bug is considered fixed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #26 from ray(a)rh-software.com 2011-04-18 06:02:54 CDT --- (In reply to comment #24)
WORKSFORME indicates that there is no bug, only a problem with the reporter's setup. It clearly doesn't make any sense here.
OK. Should I bother reporting such issues as this? I have just sent a patch that adds DPC and Interrupt times. It also fixes the _APPLE_ issues. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 --- Comment #27 from ray(a)rh-software.com 2011-04-18 06:07:01 CDT --- Created an attachment (id=34168) --> (http://bugs.winehq.org/attachment.cgi?id=34168) Fix SystemProcessorPerformanceInformation to include DPC and Interrupt times This is the patch that fixes the _APPLE_ issues incase an apple user wishes to test it. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 ray(a)rh-software.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34168|application/octet-stream |text/plain mime type| | Attachment #34168|0 |1 is patch| | -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=19960 ray(a)rh-software.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34168|0 |1 is obsolete| | --- Comment #28 from ray(a)rh-software.com 2011-04-19 10:05:53 CDT --- Created an attachment (id=34206) --> (http://bugs.winehq.org/attachment.cgi?id=34206) Tidy CPU time reporting, add DPC and interrupt -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org