Closed
Bug 1058651
Opened 10 years ago
Closed 10 years ago
Add MOZ_UNLIKELY to codegen argc and exception checks
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: Ms2ger, Assigned: akshendra521994, Mentored)
References
(Blocks 1 open bug)
Details
(Whiteboard: [lang=python][lang=c++])
Attachments
(1 file)
1.85 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
The codegen for DOM bindings (<https://mxr.mozilla.org/mozilla-central/source/dom/bindings/Codegen.py>) generates code that includes checks on the number of arguments and checks if the native function threw an exception.
We expect that these checks are only quite rarely true, so it seems worthwhile to wrap those checks in the MOZ_UNLIKELY() macro, to potentially improve the compiled code.
For number of arguments: <https://mxr.mozilla.org/mozilla-central/source/dom/bindings/Codegen.py?rev=1a3d7ec1a840&mark=6710-6712#6707>
For exceptions: <https://mxr.mozilla.org/mozilla-central/source/dom/bindings/Codegen.py?rev=1a3d7ec1a840&mark=6156-6158#6153>
Updated•10 years ago
|
Whiteboard: [lang=python][lang=c++]
Comment 1•10 years ago
|
||
I want to patch this,but need some help.
Comment 2•10 years ago
|
||
Thanks, Mohit. The first thing to do is get your development environment set up; a good place to read how to do that is here:
https://developer.mozilla.org/en-US/docs/Introduction
BZ, can you point to an example of where we're already using MOZ_UNLIKELY() so Mohit can get a sense of what a successful patch looks like here?
Comment 3•10 years ago
|
||
I've gone through the docs and also completed the code for firefox exercise which was a part of it and as I'm working on linux I've setup an enviroment by the help of instructions given in the docs.
Assignee | ||
Comment 4•10 years ago
|
||
What is the status of this bug?
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8507854 -
Flags: review?(bzbarsky)
Comment 6•10 years ago
|
||
Comment on attachment 8507854 [details] [diff] [review]
1058651.patch
I missed the part of comment 2 directed at me. :(
r=me
Attachment #8507854 -
Flags: review?(bzbarsky) → review+
Comment 7•10 years ago
|
||
Akshendra, are you able to push this to try yourself, or do you need me to do it?
Assignee: nobody → akshendra521994
Flags: needinfo?(akshendra521994)
Assignee | ||
Comment 8•10 years ago
|
||
I don't seem to have a level 1 hg account, so I cannot I suppose.
Flags: needinfo?(akshendra521994)
Comment 9•10 years ago
|
||
Keywords: checkin-needed
Comment 10•10 years ago
|
||
Keywords: checkin-needed
Comment 11•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•