Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Issue 225853003: Force more inlining in Skia ARM NEON optimizations (Closed)

Created:
6 years, 8 months ago by Kimmo Kinnunen
Modified:
6 years, 7 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Force more inlining in Skia ARM NEON optimizations The Skia ARM NEON optimizations suffer from lack of inlining somewhat. Force more agressive optimization and inline bigger functions for the skia_opts_neon target. BUG=363073

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M skia/skia_library_opts.gyp View 1 chunk +5 lines, -0 lines 1 comment Download

Dependent Patchsets:

Messages

Total messages: 6 (0 generated)
Kimmo Kinnunen
or any idea where would the 'variables': { 'optimize': 'max' } or similar thing go ...
6 years, 8 months ago (2014-04-14 12:28:47 UTC) #1
tomhudson
Nice catch! I'll leave it to the others to figure out gyp layout & provide ...
6 years, 8 months ago (2014-04-14 12:30:40 UTC) #2
Kimmo Kinnunen
Ping? Anybody know anybody willing to look at the patch?
6 years, 7 months ago (2014-05-07 12:11:38 UTC) #3
tomhudson
Not sure why we're listing Ben? Added Leon & Mike as potential ARM reviewers. Fired ...
6 years, 7 months ago (2014-05-07 13:10:53 UTC) #4
mtklein
https://codereview.chromium.org/225853003/diff/1/skia/skia_library_opts.gyp File skia/skia_library_opts.gyp (right): https://codereview.chromium.org/225853003/diff/1/skia/skia_library_opts.gyp#newcode248 skia/skia_library_opts.gyp:248: # The special cases are performance critical and suffer ...
6 years, 7 months ago (2014-05-07 14:49:42 UTC) #5
Kimmo Kinnunen
6 years, 7 months ago (2014-05-13 12:12:53 UTC) #6
On 2014/05/07 13:10:53, tomhudson wrote:
> Have you measured code size impact, or quantified the performance
improvements?
> We're looking at similar changes at higher levels of the stack right now on
> Android, but the time/space tradeoff is a tight one.

The library size does not change at all, eg.
out/Release/obj/skia/libskia_opts_neon.a is 8108 bytes before and after the
change. I tried to inspect the other libraries too, but I did not manage to see
any difference.

The perf improvement is quite significant on NV hw today, but it's probably due
to us hitting a degenerate case in our hw/sw with the un-inlined case. The
badness will probably be fixed, so the perf improvement in the end should be
small(ish), in this case.

I'm not sure the implications. One could consider inspecting that functions
using neon are forced to be inlined. They seem to be somewhat big, and thus
might remain uninlined otherwise. Of course, such an inspection is quite a task
for project like Chromium or Android.


On 2014/05/07 14:49:42, mtklein wrote:
> https://codereview.chromium.org/225853003/diff/1/skia/skia_library_opts.gyp
> File skia/skia_library_opts.gyp (right):
> 
>
https://codereview.chromium.org/225853003/diff/1/skia/skia_library_opts.gyp#n...
> skia/skia_library_opts.gyp:248: # The special cases are performance critical
and
> suffer from lack
> Is there any way we can do this with SK_ALWAYS_INLINE (==
> __attribute__((always_inline)) ) tagged on particular functions in source?  My
> concerns about doing in the build are:
>   1) Next time we come to fiddle with this, we won't know which functions this
> was meant to help.
>   2) We're only doing this in Chrome, so Android loses out, and we're not
> testing it on our Skia bots.

That's a good idea, thanks. I submitted a patch to Skia,
https://codereview.chromium.org/280403005/ . Closing this one.

Powered by Google App Engine
This is Rietveld 408576698