Monorail Project: v8 Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 3663 Clearing of ICs at GC degrades performance
Starred by 16 users Project Member Reported by u...@chromium.org, Oct 30 2014 Back to list
Status: Fixed
Owner:
Closed: Jan 2015
Cc:
HW: ----
OS: All
Priority: Medium
Type: Bug

Blocking:
issue 2935


Sign in to add a comment
We clear polymorphic, megamorphic, and generic ICs at each mark-compact GC to avoid memory leaks. This loses type-feedback information and leads to poor performance.

For example, "Complex List" test at http://samsaffron.github.io/ember-performance/?ember=1.8.0 runs:

- 203.53ms with clearing of ICs enabled (default flags)
- 182.59ms with clearing of ICs disabled(--js-flags="--nocleanup-code-caches-at-gc")


 
Project Member Comment 1 by u...@chromium.org, Oct 30 2014
Blocking: v8:2935
Project Member Comment 2 by bugdroid1@chromium.org, Dec 1 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/45a36948e1bb0f02d395ecbcfe6306553898268b

commit 45a36948e1bb0f02d395ecbcfe6306553898268b
Author: ulan <ulan@chromium.org>
Date: Mon Dec 01 10:41:01 2014

Use weak cells in map checks in polymorphic ICs.

BUG=v8:3663
LOG=N

Review URL: https://codereview.chromium.org/753993003

Cr-Commit-Position: refs/heads/master@{#25581}

[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/arm/macro-assembler-arm.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/arm/macro-assembler-arm.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/arm64/lithium-codegen-arm64.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/arm64/macro-assembler-arm64.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/arm64/macro-assembler-arm64.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/factory.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/heap/objects-visiting-inl.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ia32/macro-assembler-ia32.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ia32/macro-assembler-ia32.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ic/arm/ic-compiler-arm.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ic/arm64/ic-compiler-arm64.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ic/ia32/ic-compiler-ia32.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ic/mips/ic-compiler-mips.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ic/mips64/ic-compiler-mips64.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ic/x64/ic-compiler-x64.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/ic/x87/ic-compiler-x87.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/mips/macro-assembler-mips.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/mips/macro-assembler-mips.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/mips64/macro-assembler-mips64.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/mips64/macro-assembler-mips64.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/objects-inl.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/objects-printer.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/objects.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/objects.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/x64/macro-assembler-x64.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/x64/macro-assembler-x64.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/x87/macro-assembler-x87.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/src/x87/macro-assembler-x87.h
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/test/cctest/cctest.status
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/test/cctest/test-heap.cc
[modify] http://crrev.com/45a36948e1bb0f02d395ecbcfe6306553898268b/test/mjsunit/opt-elements-kind.js

Project Member Comment 3 by bugdroid1@chromium.org, Dec 2 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/d9c83f6bd0c9bd6806146caaa8053f61a800543d

commit d9c83f6bd0c9bd6806146caaa8053f61a800543d
Author: machenbach <machenbach@chromium.org>
Date: Tue Dec 02 08:16:43 2014

Revert of Use weak cells in map checks in polymorphic ICs. (patchset #8 id:140001 of https://codereview.chromium.org/753993003/)

Reason for revert:
[Sheriff] Speculative revert for breaking chromium asan (roll blocker):
http://build.chromium.org/p/client.v8/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/1683

Original issue's description:
> Use weak cells in map checks in polymorphic ICs.
>
> BUG=v8:3663
> LOG=N

TBR=mvstanton@chromium.org,akos.palfi@imgtec.com,weiliang.lin@intel.com,ulan@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=v8:3663

Review URL: https://codereview.chromium.org/771033003

Cr-Commit-Position: refs/heads/master@{#25597}

[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/arm/macro-assembler-arm.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/arm/macro-assembler-arm.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/arm64/lithium-codegen-arm64.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/arm64/macro-assembler-arm64.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/arm64/macro-assembler-arm64.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/factory.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/heap/objects-visiting-inl.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ia32/macro-assembler-ia32.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ia32/macro-assembler-ia32.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ic/arm/ic-compiler-arm.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ic/arm64/ic-compiler-arm64.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ic/ia32/ic-compiler-ia32.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ic/mips/ic-compiler-mips.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ic/mips64/ic-compiler-mips64.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ic/x64/ic-compiler-x64.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/ic/x87/ic-compiler-x87.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/mips/macro-assembler-mips.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/mips/macro-assembler-mips.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/mips64/macro-assembler-mips64.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/mips64/macro-assembler-mips64.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/objects-inl.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/objects-printer.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/objects.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/objects.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/x64/macro-assembler-x64.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/x64/macro-assembler-x64.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/x87/macro-assembler-x87.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/src/x87/macro-assembler-x87.h
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/test/cctest/cctest.status
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/test/cctest/test-heap.cc
[modify] http://crrev.com/d9c83f6bd0c9bd6806146caaa8053f61a800543d/test/mjsunit/opt-elements-kind.js

Project Member Comment 4 by bugdroid1@chromium.org, Dec 2 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/2ac522ab15061bdf93025a1f0d7dea82af9f9029

commit 2ac522ab15061bdf93025a1f0d7dea82af9f9029
Author: ulan <ulan@chromium.org>
Date: Tue Dec 02 14:25:17 2014

Reland parts of 'Use weak cells in map checks in polymorphic ICs'

This relands macroassembler instructions and weak cell caching and
does not include parts that caused "Linux ASan LSan" test failures.

BUG=v8:3663
LOG=N

Review URL: https://codereview.chromium.org/764003003

Cr-Commit-Position: refs/heads/master@{#25615}

[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/arm/macro-assembler-arm.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/arm/macro-assembler-arm.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/arm64/lithium-codegen-arm64.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/arm64/macro-assembler-arm64.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/arm64/macro-assembler-arm64.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/factory.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/ia32/macro-assembler-ia32.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/ia32/macro-assembler-ia32.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/mips/macro-assembler-mips.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/mips/macro-assembler-mips.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/mips64/macro-assembler-mips64.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/mips64/macro-assembler-mips64.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/objects-inl.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/objects-printer.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/objects.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/objects.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/x64/macro-assembler-x64.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/x64/macro-assembler-x64.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/x87/macro-assembler-x87.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/src/x87/macro-assembler-x87.h
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/test/cctest/cctest.status
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/test/cctest/test-heap.cc
[modify] http://crrev.com/2ac522ab15061bdf93025a1f0d7dea82af9f9029/test/mjsunit/opt-elements-kind.js

Project Member Comment 6 by bugdroid1@chromium.org, Dec 18 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/9ffdae66e24b7d7a5aaa1699ed9302b6583e2aa6

commit 9ffdae66e24b7d7a5aaa1699ed9302b6583e2aa6
Author: ulan <ulan@chromium.org>
Date: Thu Dec 18 13:09:37 2014

Monomorphic and polymorphic ICs with cleared maps should not go megamorphic.

BUG=v8:3663
TEST=cctest/test-heap/MonomorphicStaysMonomorphicAfterGC
LOG=N

Review URL: https://codereview.chromium.org/816653002

Cr-Commit-Position: refs/heads/master@{#25882}

[modify] http://crrev.com/9ffdae66e24b7d7a5aaa1699ed9302b6583e2aa6/src/ic/ic.cc
[modify] http://crrev.com/9ffdae66e24b7d7a5aaa1699ed9302b6583e2aa6/test/cctest/test-heap.cc

Project Member Comment 7 by u...@chromium.org, Jan 16 2015
Owner: u...@chromium.org
Status: Fixed
After CL in comment #5, V8 no longer clears polymorphic IC in GC.
Project Member Comment 9 by bugdroid1@chromium.org, Feb 2 2015
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/d834db864f694f550c0a5a9cbfea691e097b9ef0

commit d834db864f694f550c0a5a9cbfea691e097b9ef0
Author: balazs.kilvady <balazs.kilvady@imgtec.com>
Date: Mon Feb 02 19:44:58 2015

MIPS: Use weak cell to embed known map in CompareIC

Port 246a749a6f7e7e3a025bb032bc0c643656c9b08f

BUG=v8:3663
LOG=N

Review URL: https://codereview.chromium.org/881533004

Cr-Commit-Position: refs/heads/master@{#26388}

[modify] http://crrev.com/d834db864f694f550c0a5a9cbfea691e097b9ef0/src/mips/code-stubs-mips.cc
[modify] http://crrev.com/d834db864f694f550c0a5a9cbfea691e097b9ef0/src/mips64/code-stubs-mips64.cc

Sign in to add a comment