Bug 185043 - Expose "$262.agent.monotonicNow()" for use in testing Atomic operation timeouts
Summary: Expose "$262.agent.monotonicNow()" for use in testing Atomic operation timeouts
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-26 13:24 PDT by rwaldron
Modified: 2018-05-02 10:08 PDT (History)
8 users (show)

See Also:


Attachments
$262.agent.monotonicNow() (2.32 KB, patch)
2018-04-26 17:44 PDT, rwaldron
no flags Details | Formatted Diff | Diff
$262.agent.monotonicNow() (4.37 KB, patch)
2018-04-27 08:02 PDT, rwaldron
no flags Details | Formatted Diff | Diff
$262.agent.monotonicNow() (3.13 KB, patch)
2018-04-27 08:12 PDT, rwaldron
fpizlo: review+
Details | Formatted Diff | Diff
$262.agent.monotonicNow() (2.39 KB, patch)
2018-04-27 08:36 PDT, rwaldron
no flags Details | Formatted Diff | Diff
$262.agent.monotonicNow() (3.00 KB, patch)
2018-04-30 07:43 PDT, rwaldron
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews200 for win-future (12.87 MB, application/zip)
2018-04-30 09:27 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rwaldron 2018-04-26 13:24:07 PDT
During a discussion (re: Atomics testing in Test262) with Filip Pizlo this afternoon, we determined that $262.agent should expose a new function that returns a monotonically increasing time value (to avoid relying on Date.now()). I believe this can be implemented by exposing a wrapper for MonotonicTime::now()

(Patch to follow)
Comment 1 rwaldron 2018-04-26 17:44:45 PDT
Created attachment 338943 [details]
$262.agent.monotonicNow()
Comment 2 Filip Pizlo 2018-04-27 06:39:35 PDT
Comment on attachment 338943 [details]
$262.agent.monotonicNow()

Looks good. All it needs is a change log and I can r+ it.
Comment 3 rwaldron 2018-04-27 08:02:12 PDT
Created attachment 338988 [details]
$262.agent.monotonicNow()
Comment 4 rwaldron 2018-04-27 08:12:26 PDT
Created attachment 338989 [details]
$262.agent.monotonicNow()
Comment 5 Filip Pizlo 2018-04-27 08:15:33 PDT
Comment on attachment 338989 [details]
$262.agent.monotonicNow()

R=me but the changelog looks pretty goofy. Why does it claim that you changed all of those functions?
Comment 6 rwaldron 2018-04-27 08:30:32 PDT
I'm not sure, but I wonder if the changelog program sees all of the uncommitted whitespace changes that exist in the file. I'd like to "discard changes" for those whitespace bits and regenerate the changelog entry.
Comment 7 rwaldron 2018-04-27 08:36:39 PDT
Created attachment 338991 [details]
$262.agent.monotonicNow()

Filip, sure enough—the whitespace changes that existed in jsc.cpp, but not committed, were treated as meaningful changes to report. I'll be more mindful of that in the future.
Comment 8 rwaldron 2018-04-30 07:43:25 PDT
Created attachment 339108 [details]
$262.agent.monotonicNow()
Comment 9 Build Bot 2018-04-30 09:27:28 PDT
Comment on attachment 339108 [details]
$262.agent.monotonicNow()

Attachment 339108 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/7507664

New failing tests:
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
Comment 10 Build Bot 2018-04-30 09:27:40 PDT
Created attachment 339112 [details]
Archive of layout-test-results from ews200 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews200  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 11 Filip Pizlo 2018-04-30 09:53:49 PDT
(In reply to rwaldron from comment #8)
> Created attachment 339108 [details]
> $262.agent.monotonicNow()

Did you mean to commit this version?  Looks like ews is having issues on Windows but it looks like an unrelated flaky failure. If you’d like, I can call+ it again or land manually.
Comment 12 rwaldron 2018-04-30 19:06:13 PDT
(In reply to Filip Pizlo from comment #11)
> (In reply to rwaldron from comment #8)
> > Created attachment 339108 [details]
> > $262.agent.monotonicNow()
> 
> Did you mean to commit this version?  

Yes, this new patch was intentional. Because I had to do interactive per-line staging to avoid committing all of the whitespace changes, I accidentally missed this line: 

  static EncodedJSValue JSC_HOST_CALL functionDollarAgentMonotonicNow(ExecState*);

So I had to replace the existing patch with a revised patch. 



> Looks like ews is having issues on
> Windows but it looks like an unrelated flaky failure. 


I have no idea why that windows test is failing, that's definitely odd. 

> If you’d like, I can call+ it again or land manually.


Whichever is easiest for you?
Comment 13 Filip Pizlo 2018-05-02 09:37:39 PDT
Comment on attachment 339108 [details]
$262.agent.monotonicNow()

Let’s try that again.
Comment 14 WebKit Commit Bot 2018-05-02 10:05:57 PDT
Comment on attachment 339108 [details]
$262.agent.monotonicNow()

Clearing flags on attachment: 339108

Committed r231238: <https://trac.webkit.org/changeset/231238>
Comment 15 WebKit Commit Bot 2018-05-02 10:05:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 16 Radar WebKit Bug Importer 2018-05-02 10:08:13 PDT
<rdar://problem/39908404>