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

Issue 269543016: Move cache line size calculation directly into CPU::FlushICache. (Closed)

Created:
6 years, 7 months ago by Sven Panne
Modified:
6 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Move cache line size calculation directly into CPU::FlushICache. This disentagles the initialization/dependency mess quite a bit and makes things vastly simpler. If the 'mrs' on every flush is too expensive (which it is hopefully not), the cache line sizes will have to be instance variables of the CPU class and FlushICache will have to be a member function. This would involve some more or less tricky refactorings, which we shouldn't do until we are *really* forced to do. BUG=359977 LOG=y R=rodolph.perfetta@gmail.com Committed: https://code.google.com/p/v8/source/detail?r=21119

Patch Set 1 #

Patch Set 2 : Polished. #

Patch Set 3 : Typo #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -63 lines) Patch
M src/arm64/cpu-arm64.h View 1 chunk +0 lines, -9 lines 0 comments Download
M src/arm64/cpu-arm64.cc View 1 2 4 chunks +28 lines, -54 lines 2 comments Download

Messages

Total messages: 7 (0 generated)
Sven Panne
6 years, 7 months ago (2014-05-02 11:59:39 UTC) #1
Rodolph Perfetta
lgtm. You may have to give the review to my arm address for the lgtm ...
6 years, 7 months ago (2014-05-02 12:28:11 UTC) #2
Sven Panne
6 years, 7 months ago (2014-05-02 12:34:51 UTC) #3
Sven Panne
Committed patchset #3 manually as r21119 (presubmit successful).
6 years, 7 months ago (2014-05-02 12:35:57 UTC) #4
Rodolph Perfetta
https://codereview.chromium.org/269543016/diff/40001/src/arm64/cpu-arm64.cc File src/arm64/cpu-arm64.cc (right): https://codereview.chromium.org/269543016/diff/40001/src/arm64/cpu-arm64.cc#newcode42 src/arm64/cpu-arm64.cc:42: return 1 << ((cache_type_register_ >> cache_line_size_shift) & 0xf); Argh, ...
6 years, 7 months ago (2014-05-02 13:12:07 UTC) #5
Sven Panne
https://codereview.chromium.org/269543016/diff/40001/src/arm64/cpu-arm64.cc File src/arm64/cpu-arm64.cc (right): https://codereview.chromium.org/269543016/diff/40001/src/arm64/cpu-arm64.cc#newcode42 src/arm64/cpu-arm64.cc:42: return 1 << ((cache_type_register_ >> cache_line_size_shift) & 0xf); On ...
6 years, 7 months ago (2014-05-05 07:57:33 UTC) #6
Rodolph Perfetta
6 years, 7 months ago (2014-05-06 17:42:27 UTC) #7
Message was sent while issue was closed.
On 2014/05/05 07:57:33, Sven Panne wrote:
> https://codereview.chromium.org/269543016/diff/40001/src/arm64/cpu-arm64.cc
> File src/arm64/cpu-arm64.cc (right):
> 
>
https://codereview.chromium.org/269543016/diff/40001/src/arm64/cpu-arm64.cc#n...
> src/arm64/cpu-arm64.cc:42: return 1 << ((cache_type_register_ >>
> cache_line_size_shift) & 0xf);
> On 2014/05/02 13:12:07, Rodolph Perfetta wrote:
> > Argh, the original code was wrong (my bad), the size is in words not bytes
so
> a
> > further shift by 2 is required to get the size in bytes.
> > 
> > In practice this has no bad side effects as we do more cache operations than
> > required and the result will be the same.
> > 
> > Sorry for not spotting it earlier.
> 
> So the "1 << ..." should be replaced by a "4 << ..." (and the comment should
be
> improved)? Could you prepare a CL?

Done: https://codereview.chromium.org/268673020/

Powered by Google App Engine
This is Rietveld 408576698