Closed
Bug 898692
Opened 11 years ago
Closed 11 years ago
Wasted work in ArrayBufferObject::obj_trace()
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: pchang9, Assigned: pchang9)
Details
(Keywords: perf, Whiteboard: patch)
Attachments
(1 file, 3 obsolete files)
987 bytes,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0 (Beta/Release) Build ID: 20130116073211 Steps to reproduce: The problem appears in changeset 138350:18467a85acf6. I have attached a simple one-line patch that fixes it. In method main() in js/src/vm/TypedArrayObject.cpp, the loop on line 701 should break immediately after "found" is set to "true". All the iterations after "found" is set to "true" do not perform any useful work, at best they just set "found" again to "true". Expected results: Break loop after "found" is set to "true".
Updated•11 years ago
|
Attachment #782049 -
Attachment is patch: true
Comment 1•11 years ago
|
||
> In method main() in js/src/vm/TypedArrayObject.cpp, the loop It's about the DEBUG section in https://hg.mozilla.org/mozilla-central/file/18467a85acf6/js/src/vm/TypedArrayObject.cpp#l680
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Whiteboard: patch
Updated•11 years ago
|
Assignee: general → pchang9
Updated•11 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 2•11 years ago
|
||
This makes sense, yes. We don't care that much about DEBUG perf, but it's not entirely irrelevant, either. @pchang9, would you mind looking at [1] to prepare a patch for checkin? If it's too much work, then don't worry - we can fix things up for you. In that case, we'd at least know which name and email address the patch should contain as author information. [1]: https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Thanks for your information. Patch is prepared (898692.patch).
Attachment #783510 -
Flags: review?(sphink)
Comment 5•11 years ago
|
||
Comment on attachment 783510 [details] [diff] [review] 898692.patch Review of attachment 783510 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/vm/TypedArrayObject.cpp @@ +697,3 @@ > found = true; > + break; > + } Actually, I'd prefer if you made this *slower*. :-) Specifically, rather than breaking, can you JS_ASSERT(!found) just before setting found = true? That will check that each buffer shows up exactly once in the list (rather than at least once, as my slow version and your faster version did.) Thanks!
Attachment #783510 -
Flags: review?(sphink)
Updated•11 years ago
|
Attachment #782049 -
Attachment is obsolete: true
Attachment #783510 -
Attachment is obsolete: true
Attachment #785391 -
Flags: review?(sphink)
Comment 7•11 years ago
|
||
Comment on attachment 785391 [details] [diff] [review] 898692-1.patch Review of attachment 785391 [details] [diff] [review]: ----------------------------------------------------------------- Perfect, thanks!
Attachment #785391 -
Flags: review?(sphink) → review+
Landed on try server: https://tbpl.mozilla.org/?tree=Try&rev=3db32afd81f4
Keywords: checkin-needed
Updated•11 years ago
|
Attachment #785391 -
Attachment is obsolete: true
Comment 9•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9852ea4110eb
Keywords: checkin-needed
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9852ea4110eb
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Comment 11•11 years ago
|
||
Great, thank you for this. Now you're ready to dive in deeper, right? :-)
You need to log in
before you can comment on or make changes to this bug.
Description
•