Summary: | [Qt] Optimize getCPUTime for Symbian | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Janne Koskinen <koshuin> | ||||||
Component: | New Bugs | Assignee: | Janne Koskinen <koshuin> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Critical | CC: | commit-queue, hausmann, laszlo.gombos, webkit.review.bot | ||||||
Priority: | P2 | Keywords: | Qt | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | S60 Hardware | ||||||||
OS: | S60 3rd edition | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 27065 | ||||||||
Attachments: |
|
Description
Janne Koskinen
2010-02-09 00:32:04 PST
This issue is caused by bug in Open C 1.6 implementation of gettimeofday(). gtod precision seems to vary from min. 1sec to several minutes i.e. calling gtod several times in a row will return the same value. This value is then used in TimeoutChecker getCPUTime() to calculate time spent running the script causing the script never to be interrupted. Created attachment 49276 [details]
proposed fix for timeoutchecker.cpp
Patch contains a proper implementation of getCPUTime for Symbian. It works from Symbian 9.1 onwards i.e. S60 3rd edition and up as that is when GetCpuTime function was introduced.
Tested the the patch to run on Nokia N95 and Nokia 5800 Express Music. It is possible that some device doesn't implement the function or has it disabled, thus added assertion for debugging purposes to see if some device returns KErrNotSupported.
Also reported the gettimeofday -issue to Open C guys, so that will be fixed in future releases.
Attachment 49276 [details] did not pass style-queue:
Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
JavaScriptCore/runtime/TimeoutChecker.cpp:92: Missing space after , [whitespace/comma] [3]
Total errors found: 1 in 2 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 49278 [details]
proposed fix for timeoutchecker.cpp style fixed
fixed style issue with ,
I changed the title to better reflect what this patch does. Approach looks good to me I think Symbian specific code is justified here. Comment on attachment 49278 [details] proposed fix for timeoutchecker.cpp style fixed Clearing flags on attachment: 49278 Committed r55296: <http://trac.webkit.org/changeset/55296> All reviewed patches have been landed. Closing bug. |