Closed Bug 1166678 Opened 9 years ago Closed 9 years ago

2% Win7/win8 kraken regression on Mozilla-Inbound-Non-PGO on May 20, 2015 from push 1410ca139039

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
firefox41 --- affected

People

(Reporter: jmaher, Assigned: bhackett1024)

References

Details

(Keywords: perf, regression, Whiteboard: [talos_regression])

Attachments

(2 files)

Talos has detected a Firefox performance regression from your commit 1410ca139039 in bug 1163091.  We need you to address this regression.

This is a list of all known regressions and improvements related to your bug:
http://alertmanager.allizom.org:8080/alerts.html?rev=48fa8f0a227c&showAll=1

On the page above you can see Talos alert for each affected platform as well as a link to a graph showing the history of scores for this test. There is also a link to a treeherder page showing the Talos jobs in a pushlog format.

To learn more about the regressing test, please see: https://wiki.mozilla.org/Buildbot/Talos/Tests#kraken

Reproducing and debugging the regression:
If you would like to re-run this Talos test on a potential fix, use try with the following syntax:
try: -b o -p win32,win64 -u none -t dromaeojs  # add "mozharness: --spsProfile" to generate profile data

To run the test locally and do a more in-depth investigation, first set up a local Talos environment:
https://wiki.mozilla.org/Buildbot/Talos/Running#Running_locally_-_Source_Code

Then run the following command from the directory where you set up Talos:
talos --develop -e <path>/firefox -a kraken

Making a decision:
As the patch author we need your feedback to help us handle this regression.
*** Please let us know your plans by Monday, or the offending patch will be backed out! ***

Our wiki page oulines the common responses and expectations:
https://wiki.mozilla.org/Buildbot/Talos/RegressionBugsHandling
This regression is present on AWFY too, Mac machines and Win 8.
Attached patch patchSplinter Review
I think this is the same issue as bug 1146597 comment 35.  We spend a lot of time in the VM running array functions in these stanford-crypto tests, and are hitting ObjectGroup::maybeSweep a lot.  The attached patch makes this an inline function, like I should have done in the first place in bug 1146597.
Assignee: nobody → bhackett1024
Flags: needinfo?(bhackett1024)
Attachment #8608412 - Flags: review?(jdemooij)
Attachment #8608412 - Flags: review?(jdemooij) → review+
Keywords: leave-open
The last patch helped some but not that much.  I haven't looked at instruction counts again to see what's up, but it's kind of dumb to be spending so much time in the VM when we can optimize this stuff better from Ion.  This patch optimizes Array.slice, which is used by all the stanford-crypto tests, and improves our kraken score by maybe 2% or so.
Attachment #8611379 - Flags: review?(jdemooij)
Comment on attachment 8611379 [details] [diff] [review]
inline Array.slice

Review of attachment 8611379 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit/MCallOptimize.cpp
@@ +1057,5 @@
> +    if (callInfo.argc() > 0) {
> +        begin = callInfo.getArg(0);
> +    } else {
> +        begin = MConstant::New(alloc(), Int32Value(0));
> +        current->add(begin->toInstruction());

Nit: this can be |begin = constant(Int32Value(0));|

::: js/src/jsarray.cpp
@@ +2901,5 @@
> +            return 0;
> +    } else if (value > length) {
> +        return length;
> +    }
> +    return (uint32_t) value;

Nit: uint32_t(value); here and below while you're refactoring this.

@@ +2905,5 @@
> +    return (uint32_t) value;
> +}
> +
> +static inline uint32_t
> +NormalizeSliceTerm(int32_t value, uint32_t length)

You don't think it's worth templatizing this and the previous function, so there's just one copy that takes an int32/double value?
Attachment #8611379 - Flags: review?(jdemooij) → review+
(In reply to Jan de Mooij [:jandem] from comment #7)
> @@ +2905,5 @@
> > +    return (uint32_t) value;
> > +}
> > +
> > +static inline uint32_t
> > +NormalizeSliceTerm(int32_t value, uint32_t length)
> 
> You don't think it's worth templatizing this and the previous function, so
> there's just one copy that takes an int32/double value?

I tried doing this but the int32_t version needs a uint32_t cast for the comparison.  I didn't think that was correct to do for the double version but experimenting now it looks like it will be ok (casting a double > UINT32_MAX to a uint32 will produce UINT32_MAX) so I'll go back to the template version.
(In reply to Brian Hackett (:bhackett) from comment #8)
> I tried doing this but the int32_t version needs a uint32_t cast for the
> comparison.  I didn't think that was correct to do for the double version
> but experimenting now it looks like it will be ok (casting a double >
> UINT32_MAX to a uint32 will produce UINT32_MAX) so I'll go back to the
> template version.

... and after reading some more the semantics of this conversion are unspecified by the standard.  I'll just use a template and cast both sides of the comparison to double.
Nice!

A regression/improvement was reported on AWFY:
- slave: Mac OS X 10.10 64-bit (Mac Pro, shell)
- mode: Ion

Regression(s)/Improvement(s):
- kraken: -0.76% (improvement)
- kraken: oscillator: -1.21% (improvement)
- kraken: crypto-aes: -7.17% (improvement)
- kraken: crypto-pbkdf2: -5.96% (improvement)
- octane: Richards: 2.34% (improvement)
- asmjs-ubench: mandelbrot-native: -2.9% (improvement) (noasmjs)

Recorded range:
- http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=b779fae94e88&tochange=0d29fb828423

More details: http://arewefastyet.com/regressions/#/regression/1696890
verified the graphs show this as fixed!  Thanks for the work on it:)
is there any need to keep this open?  I would like to resolve this bug as fixed.
Flags: needinfo?(bhackett1024)
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(bhackett1024)
Resolution: --- → FIXED
Removing leave-open keyword from resolved bugs, per :sylvestre.
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: