Closed
Bug 1439788
Opened 7 years ago
Closed 7 years ago
Having performance.now added to spidermonkey's shell would help with perf diagnosis
Categories
(Core :: JavaScript Engine, enhancement, P5)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: canuckistani, Assigned: diorahman, Mentored)
References
()
Details
(Keywords: good-first-bug, Whiteboard: [lang=c++])
Attachments
(1 file)
1.25 KB,
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
Spidermonkey and V8 can have different performance characteristics, and access to performance apis in the shell might make certain kinds of investigations more convenient:
"[I wanted to sprinkle performance.now() but SpiderMonkey shell apparently does not support it.]"
See http://mrale.ph/blog/2018/02/03/maybe-you-dont-need-rust-to-speed-up-your-js.html
Comment 1•7 years ago
|
||
We have dateNow in the shell; we could rename/alias it.
Updated•7 years ago
|
Priority: -- → P5
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Required code changes are following:
1. Define `performance` object in the shell global
2. Define `now` property to the `performance` object, with the same value as `dateNow` [1][2]
Bug 1118158 would be a good example, which added `console.log` [3][4][5].
You'll need basic knowledge of C++, and be able to build and test SpiderMonkey shell [6][7].
A skilled first-time contributor should be able to finish this in a month. Leave comments / questions here, or ask me (:arai) in IRC [8] #introduction or #jsapi channels.
[1] https://searchfox.org/mozilla-central/rev/47cb352984bac15c476dcd75f8360f902673cb98/js/src/shell/js.cpp#6848-6850
[2] https://searchfox.org/mozilla-central/rev/47cb352984bac15c476dcd75f8360f902673cb98/js/src/shell/js.cpp#2274-2281
[3] https://hg.mozilla.org/mozilla-central/rev/58d6a621d9626547407708b7c78cf5dbf1fa935a
[4] https://searchfox.org/mozilla-central/rev/47cb352984bac15c476dcd75f8360f902673cb98/js/src/shell/js.cpp#7387-7402
[5] https://searchfox.org/mozilla-central/rev/47cb352984bac15c476dcd75f8360f902673cb98/js/src/shell/js.cpp#8305-8306
[6] https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Build_Documentation
[7] https://developer.mozilla.org/en-US/docs/Simple_Firefox_build
[8] https://wiki.mozilla.org/index.php?title=IRC
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → diorahman
Status: NEW → ASSIGNED
Assignee | ||
Updated•7 years ago
|
Attachment #8955760 -
Flags: review?(arai.unmht)
Comment 5•7 years ago
|
||
Comment on attachment 8955760 [details] [diff] [review]
Add performance.now() function to JS shell
Review of attachment 8955760 [details] [diff] [review]:
-----------------------------------------------------------------
Thank you for taking this :)
Looks great!
Attachment #8955760 -
Flags: review?(arai.unmht) → review+
Updated•7 years ago
|
Flags: needinfo?(arai.unmht)
Keywords: checkin-needed
Keywords: checkin-needed
Pushed by evilpies@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c59eff0e8209
Add performance.now() function to JS shell. r=arai
Comment 7•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•