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

Issue 9496010: Fix secondary stub cache and add a test for the stub cache lookups. (Closed)

Created:
8 years, 9 months ago by Erik Corry
Modified:
8 years, 9 months ago
Reviewers:
Sven Panne
CC:
v8-dev
Visibility:
Public.

Description

Fix secondary stub cache and add a test for the stub cache lookups. Committed: https://code.google.com/p/v8/source/detail?r=10864

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -65 lines) Patch
M src/arm/ic-arm.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M src/arm/stub-cache-arm.cc View 5 chunks +59 lines, -26 lines 2 comments Download
M src/flag-definitions.h View 1 chunk +7 lines, -0 lines 2 comments Download
M src/ia32/stub-cache-ia32.cc View 7 chunks +53 lines, -12 lines 0 comments Download
M src/serialize.cc View 1 chunk +10 lines, -2 lines 0 comments Download
M src/stub-cache.h View 5 chunks +18 lines, -6 lines 0 comments Download
M src/stub-cache.cc View 2 chunks +8 lines, -5 lines 0 comments Download
M src/v8-counters.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 5 chunks +40 lines, -10 lines 0 comments Download
M test/cctest/test-api.cc View 1 chunk +76 lines, -0 lines 4 comments Download

Messages

Total messages: 3 (0 generated)
Erik Corry
8 years, 9 months ago (2012-02-28 16:36:15 UTC) #1
Sven Panne
LGTM with tiny nits. https://chromiumcodereview.appspot.com/9496010/diff/1/src/arm/stub-cache-arm.cc File src/arm/stub-cache-arm.cc (right): https://chromiumcodereview.appspot.com/9496010/diff/1/src/arm/stub-cache-arm.cc#newcode199 src/arm/stub-cache-arm.cc:199: // entry size being 12. ...
8 years, 9 months ago (2012-02-29 09:37:42 UTC) #2
Erik Corry
8 years, 9 months ago (2012-02-29 10:45:59 UTC) #3
https://chromiumcodereview.appspot.com/9496010/diff/1/src/arm/stub-cache-arm.cc
File src/arm/stub-cache-arm.cc (right):

https://chromiumcodereview.appspot.com/9496010/diff/1/src/arm/stub-cache-arm....
src/arm/stub-cache-arm.cc:199: // entry size being 12.
On 2012/02/29 09:37:42, Sven Panne wrote:
> Hmmm, I can see multiplication by 3 and a left shift by one, but that leaves a
> factor of 2. To be honest, I don't fully understand the calculations in
> ProbeTable, some comments in prose would be helpful...

Done.

https://chromiumcodereview.appspot.com/9496010/diff/1/src/flag-definitions.h
File src/flag-definitions.h (right):

https://chromiumcodereview.appspot.com/9496010/diff/1/src/flag-definitions.h#...
src/flag-definitions.h:566: DEFINE_bool(test_secondary_stub_cache,
On 2012/02/29 09:37:42, Sven Panne wrote:
> These should probably be debug-only flags.

That is already the case.

https://chromiumcodereview.appspot.com/9496010/diff/1/test/cctest/test-api.cc
File test/cctest/test-api.cc (right):

https://chromiumcodereview.appspot.com/9496010/diff/1/test/cctest/test-api.cc...
test/cctest/test-api.cc:16112: static int* LookupCounter(const char* name) {
On 2012/02/29 09:37:42, Sven Panne wrote:
> It seems that all those statics here are only used in DEBUG mode, so I guess
> that gcc will complain in release mode.

It does not complain about probes_counter etc. but it does complain about
kMegaMorphicTestProgram.  Go figure.

https://chromiumcodereview.appspot.com/9496010/diff/1/test/cctest/test-api.cc...
test/cctest/test-api.cc:16138: TEST(SecondaryStubCache) {
On 2012/02/29 09:37:42, Sven Panne wrote:
> This differs from TEST(PrimaryStubCache) only in a single line, so a separate
> method for the common code might be appropriate.

Done
 
> Just out of curiosity: Where/how do we set/reset the i::FLAG_foo flags for
each
> test?

Each test is run in its own process, which terminates, so no need to reset
anything.  This is why these tests are not THREADED_TEST tests.

Powered by Google App Engine
This is Rietveld 408576698