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

Issue 11547015: Use a filter instead of a visitor to deoptimize selected functions in a context. (Closed)

Created:
8 years ago by ulan
Modified:
8 years ago
CC:
v8-dev
Visibility:
Public.

Description

Use a filter instead of a visitor to deoptimize selected functions in a context. This makes the DeoptimizeAll function O(n) instead of O(n^2) where n in the number of optimized functions. Before this change, DeoptimizeAll iterated over the optimized function list and called DeoptimizingVisitor for each function. The visitor iterated over the optimized function list again to remove the functions that share the same optimized code. This change partitions the optimized function list into one or more lists of related functions in one pass over the optimized function list. R=mstarzinger@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=13226

Patch Set 1 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+213 lines, -131 lines) Patch
M src/arm/deoptimizer-arm.cc View 2 chunks +6 lines, -5 lines 1 comment Download
M src/deoptimizer.h View 3 chunks +17 lines, -3 lines 3 comments Download
M src/deoptimizer.cc View 3 chunks +131 lines, -88 lines 0 comments Download
M src/ia32/deoptimizer-ia32.cc View 1 chunk +8 lines, -6 lines 0 comments Download
M src/liveedit.cc View 2 chunks +7 lines, -15 lines 0 comments Download
M src/mips/deoptimizer-mips.cc View 2 chunks +6 lines, -5 lines 0 comments Download
M src/objects.h View 3 chunks +20 lines, -4 lines 0 comments Download
M src/objects-inl.h View 1 chunk +12 lines, -0 lines 0 comments Download
M src/x64/deoptimizer-x64.cc View 2 chunks +6 lines, -5 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
ulan
Please take a look. This is needed for the upcoming "weak maps in optimized code" ...
8 years ago (2012-12-12 13:50:57 UTC) #1
Sven Panne
Quick DBC... https://chromiumcodereview.appspot.com/11547015/diff/4010/src/deoptimizer.h File src/deoptimizer.h (right): https://chromiumcodereview.appspot.com/11547015/diff/4010/src/deoptimizer.h#newcode90 src/deoptimizer.h:90: class OptimizedFunctionFilter BASE_EMBEDDED { This is what ...
8 years ago (2012-12-12 14:31:48 UTC) #2
Michael Starzinger
LGTM. I like this change!
8 years ago (2012-12-12 14:33:54 UTC) #3
Michael Starzinger
https://codereview.chromium.org/11547015/diff/4010/src/deoptimizer.h File src/deoptimizer.h (right): https://codereview.chromium.org/11547015/diff/4010/src/deoptimizer.h#newcode90 src/deoptimizer.h:90: class OptimizedFunctionFilter BASE_EMBEDDED { On 2012/12/12 14:31:48, Sven Panne ...
8 years ago (2012-12-12 14:39:42 UTC) #4
ulan_google
8 years ago (2012-12-12 15:00:46 UTC) #5
https://codereview.chromium.org/11547015/diff/4010/src/deoptimizer.h
File src/deoptimizer.h (right):

https://codereview.chromium.org/11547015/diff/4010/src/deoptimizer.h#newcode90
src/deoptimizer.h:90: class OptimizedFunctionFilter BASE_EMBEDDED {
On 2012/12/12 14:39:42, Michael Starzinger wrote:
> On 2012/12/12 14:31:48, Sven Panne wrote:
> > This is what is commonly called a predicate (even in STL ;-), and it might
be
> > nicer to move this in a templatized version to utils.h. Perhaps we should
even
> > add a unary_function template there from which can subclass.
> > OptimizedFunctionFilter can be a typedef if it is needed at all then.
> > 
> > Anyway, overloading function invocation (i.e. operator()) seems to be more
> > natural than making up a name like TakeFunction.
> 
> I am fine with both solutions (a templetized filter/predicate or a
type-specific
> filter). Given that we already have several of these home-grown filters (e.g.
> HeapObjectsFilter) I have no problem with adding another one. Having one
> templetized class is also fine with me. My opinion is not strong enough to
sway
> either way.
After offline discussion, I am leaving this as it is for now.

Powered by Google App Engine
This is Rietveld 408576698