Windows: HighRes timer not used on AMD ThreadRipper CPU's
Reported by
kai.koe...@qt.io,
Jul 16
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Steps to reproduce the problem: Running a debug build of Chromium on AMD ThreadRipper processor will result in a DCHECK: [22256:11108:0418/143326.662:FATAL:time_win.cc(621)] Check failed: IsSupported(). What is the expected behavior? No DCHECK failure. What went wrong? Since more than 9 years, Chromium tries to work around an issue with accuracy of QueryPerformanceCounter on AMD K2 Processors: See https://codereview.chromium.org/4092/ for the original change. However, the check just checks the 'family' bits returned by _cpuid, causing also other processors like ThreadRipper CPU's to be detected. To avoid this, the check should also also take the _ext_family and maybe the model into account. There are still reports for the original QueryPerformanceCounter problem on the web; but it seems that it got fixed in Windows XP SP2 and later on. Hence I recommend to just remove this blacklist check. Did this work before? No Chrome version: <Copy from: 'about:version'> Channel: stable OS Version: 10.0 Flash Version:
,
Jul 22
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c37f2d0f2eca5ba9bb1af333266cbb418ce66d04 commit c37f2d0f2eca5ba9bb1af333266cbb418ce66d04 Author: Kai Koehne <kai.koehne@qt.io> Date: Sun Jul 22 23:10:28 2018 Remove incomplete logic to detect AMD K2 CPU's The check for cpu.family() == 15 will also trigger for newer ThreadRipper CPU's, resulting in a DCHECK on debug builds and potentially suboptimal behavior in release builds. To fix this, the check would have to take the extFamily() and maybe model() into account, but I couldn't find the correct values for the AMD K2 CPU's anywhere. Anyhow, it is unclear whether newer Windows versions are still affected by the original problem. The commit that introduced the original check - https://codereview.chromium.org/4092 - is more than 9 years old. There are hints that the underlying issue got fixed in Windows XP SP2 and/or Windows 7. Hence this patch just removes the check. Bug: 863855 Change-Id: I26d6e282ec6116ec40fbf86e750367d15dc31604 Reviewed-on: https://chromium-review.googlesource.com/1138241 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Cr-Commit-Position: refs/heads/master@{#577097} [modify] https://crrev.com/c37f2d0f2eca5ba9bb1af333266cbb418ce66d04/base/time/time_win.cc
,
Jul 23
The commit above fixes the issue, so this can be closed. Anyhow, I don't seem to have sufficient rights to do this.
,
Aug 1
As per comment#2 the issue seems to be fixed, hence marking it as fixed. Thanks.! |
||
►
Sign in to add a comment |
||
Comment 1 by vamshi.kommuri@chromium.org
, Jul 17