Reviewers: Vitaly, zarko,
Description:
[Isolates] Propagating 'isolate' and 'heap' in more places.
I took http://golem.spb:9013/golem/ws-dicepoker.html , and started running
traces to
figure out where do we hit a lot of Isolate::Current calls. Took a few hot
spots, and in there just passed
isolate or heap pointer down the call tree as a parameter, until the spot
cools
and some other spot becomes
the new hottness. I am only partly along the way, but the test above dropped
down 4%.
It seems one approach could be to follow hot spots and perhaps create a
'duplicate' functions
that take isolate pointer, and continue to use both variants in cases where
complete replacement
would take a lot of code churn. In addition, it doesn't seem that
propagating
isolate pointer
down the call tree is universally a great idea, sometimes it can actually
cause
slowdown because
more stuff needs to be passed down...
We can continue along the line of 'cooling hotspots' rather then just do big
wholesale replacements - or
we can combince both ways. In either way, the potential merges between Luke
and
me should be easy.
This patch, although partial, brings some benefit so please review it, I'd
like
to land it.
the test I used makes a lot of 'eval' calls so the changes are mostly in the
call tree of
Runtime_ResolvePossiblyDirectEvalNoLookup. Here some changes:
* CALL_HEAP_FUNCTION got sibling CALL_HEAP_FUNCTION_WITH_HEAP
* Factory::NewFunctionFromSharedFunctionInfo now takes isolate
internal::HandleScope now has ctor that takes isolate, destructor does not
query
Current as well.
HandleScope::CreateCurrent and Handle constructor take isolate
Please review this at http://codereview.chromium.org/3067019/show
Affected files:
M src/api.cc
M src/bootstrapper.cc
M src/compiler.h
M src/compiler.cc
M src/debug.cc
M src/factory.h
M src/factory.cc
M src/handles-inl.h
M src/handles.h
M src/handles.cc
M src/heap-inl.h
M src/heap.h
M src/liveedit.cc
M src/objects-inl.h
M src/objects.h
M src/runtime.cc
M src/top.cc
M test/cctest/test-compiler.cc
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev