Bug tracking the progress of improving the API for instantiating objects.
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/d9ceb017cc60f8dcf609e5967e45708e97a681a9 commit d9ceb017cc60f8dcf609e5967e45708e97a681a9 Author: cbruni <cbruni@chromium.org> Date: Tue Jul 26 17:29:36 2016 More inlineable Isolate functions The showed up unnaturally high while profiling DOM node creation. BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2181323002 Cr-Commit-Position: refs/heads/master@{#38068} [modify] https://crrev.com/d9ceb017cc60f8dcf609e5967e45708e97a681a9/src/isolate-inl.h [modify] https://crrev.com/d9ceb017cc60f8dcf609e5967e45708e97a681a9/src/isolate.cc [modify] https://crrev.com/d9ceb017cc60f8dcf609e5967e45708e97a681a9/src/isolate.h
For reference: the original performance bug was issue 595492.
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/ba6e348ffe703b858730a7d10b06c2f92f8a205c commit ba6e348ffe703b858730a7d10b06c2f92f8a205c Author: cbruni <cbruni@chromium.org> Date: Thu Jul 28 14:02:47 2016 [api] Remove HistogramTimerScope from high-frequency API-Functions The timing scopes don't come for free and in the case of wrapper creation only add overhead. This CL removes the histogram timer for CallAs(Function|Constructor) and Function::(NewInstance|Call). BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2188193002 Cr-Commit-Position: refs/heads/master@{#38138} [modify] https://crrev.com/ba6e348ffe703b858730a7d10b06c2f92f8a205c/src/api.cc [modify] https://crrev.com/ba6e348ffe703b858730a7d10b06c2f92f8a205c/src/log-inl.h [modify] https://crrev.com/ba6e348ffe703b858730a7d10b06c2f92f8a205c/src/log.cc [modify] https://crrev.com/ba6e348ffe703b858730a7d10b06c2f92f8a205c/src/log.h
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/f3f738fe8e670f95e003656f671f18c6095533cc commit f3f738fe8e670f95e003656f671f18c6095533cc Author: cbruni <cbruni@chromium.org> Date: Thu Jul 28 17:16:33 2016 [api] Introduce fast instantiations cache This CL introduces a new fast flat instantiations cache for the first 1024 object templates. After that we fall back to the existing slower dictionary cache. Drive-by-fix: de-handlify and clean up some code in api-natives.cc BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2170743003 Cr-Commit-Position: refs/heads/master@{#38146} [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/api-natives.cc [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/bootstrapper.cc [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/contexts.h [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/debug/liveedit.cc [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/heap/object-stats.cc [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/objects-inl.h [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/objects.cc [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/objects.h [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/src/wasm/wasm-module.cc [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/test/cctest/heap/test-heap.cc [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden [modify] https://crrev.com/f3f738fe8e670f95e003656f671f18c6095533cc/test/cctest/test-api.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/9aa4496278472612d5c39195d1fdcc3503f1e486 commit 9aa4496278472612d5c39195d1fdcc3503f1e486 Author: cbruni <cbruni@chromium.org> Date: Mon Aug 01 14:28:06 2016 [api] Cleaning up: Replace NeanderArray with FixedArray implementation BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2196533003 Cr-Commit-Position: refs/heads/master@{#38213} [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/api-natives.cc [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/api.cc [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/api.h [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/bootstrapper.cc [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/contexts.h [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/heap/heap.cc [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/heap/heap.h [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/messages.cc [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/objects-inl.h [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/objects.cc [modify] https://crrev.com/9aa4496278472612d5c39195d1fdcc3503f1e486/src/objects.h
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/7e5119045894eb47ebd008076593dfce5d47b492 commit 7e5119045894eb47ebd008076593dfce5d47b492 Author: cbruni <cbruni@chromium.org> Date: Tue Aug 02 14:39:53 2016 [api] Remove NeanderObject We no longer need NeanderObject, the only user left was the message listener machanism which could be replace by direct uses of FixedArrays. BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2195243003 Cr-Commit-Position: refs/heads/master@{#38249} [modify] https://crrev.com/7e5119045894eb47ebd008076593dfce5d47b492/src/api.cc [modify] https://crrev.com/7e5119045894eb47ebd008076593dfce5d47b492/src/api.h [modify] https://crrev.com/7e5119045894eb47ebd008076593dfce5d47b492/src/messages.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/60f9e60be0fc0ef4c767365d163fc373c0bda604 commit 60f9e60be0fc0ef4c767365d163fc373c0bda604 Author: cbruni <cbruni@chromium.org> Date: Wed Aug 03 07:49:23 2016 [api] Fix IsSimpleInstantion check in InstantiatObject We have a simple instantiation at hand if the new.target is from the same context, not the other way around. BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2201113002 Cr-Commit-Position: refs/heads/master@{#38279} [modify] https://crrev.com/60f9e60be0fc0ef4c767365d163fc373c0bda604/src/api-natives.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/bdb4e2cb4c780e1463e67a2f543172f726242c3b commit bdb4e2cb4c780e1463e67a2f543172f726242c3b Author: cbruni <cbruni@chromium.org> Date: Wed Aug 03 11:44:21 2016 [api] Fix possible OOB when using SetAndGrow R=jkummerow@chromium.org BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2201023004 Cr-Commit-Position: refs/heads/master@{#38287} [modify] https://crrev.com/bdb4e2cb4c780e1463e67a2f543172f726242c3b/src/objects.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/ce49c329735530d66bb98cb13b4a8f5b1f48500f commit ce49c329735530d66bb98cb13b4a8f5b1f48500f Author: cbruni <cbruni@chromium.org> Date: Wed Aug 03 14:38:37 2016 [api] Add v8::Object::SetAlignedPointerInInternalFields This new API function allows for setting several internal fields at once. By avoiding crossing the API each time for setting an internal property we can speed up the wrapper creation which has to set two fields for every new object. BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2185963002 Cr-Commit-Position: refs/heads/master@{#38299} [modify] https://crrev.com/ce49c329735530d66bb98cb13b4a8f5b1f48500f/include/v8.h [modify] https://crrev.com/ce49c329735530d66bb98cb13b4a8f5b1f48500f/src/api.cc [modify] https://crrev.com/ce49c329735530d66bb98cb13b4a8f5b1f48500f/test/cctest/test-api.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/a2496b942cad524f0f3144b107936eaa9a7c9fd5 commit a2496b942cad524f0f3144b107936eaa9a7c9fd5 Author: cbruni <cbruni@chromium.org> Date: Thu Aug 04 16:39:48 2016 [api] Clean up scopes and precheck instantiations cache Make sure all the scopes used in api-natives.cc have inlineable constructors and destructors. Additionally directly precheck the instantiations cache before trying to enter the InvokeScope which sets the save_context. BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2206773003 Cr-Commit-Position: refs/heads/master@{#38346} [modify] https://crrev.com/a2496b942cad524f0f3144b107936eaa9a7c9fd5/src/api-natives.cc [modify] https://crrev.com/a2496b942cad524f0f3144b107936eaa9a7c9fd5/src/isolate-inl.h [modify] https://crrev.com/a2496b942cad524f0f3144b107936eaa9a7c9fd5/src/isolate.cc [modify] https://crrev.com/a2496b942cad524f0f3144b107936eaa9a7c9fd5/src/isolate.h
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/56c8814c0bfca2f4993a4f23537aed1ac4363a6f commit 56c8814c0bfca2f4993a4f23537aed1ac4363a6f Author: cbruni <cbruni@chromium.org> Date: Fri Aug 05 20:20:57 2016 Reland of [api] Clean up scopes and precheck instantiations cache (patchset #1 id:1 of https://codereview.chromium.org/2216903003/ ) Reason for revert: asan failures are caused by a flaky stack-verflow (see https://codereview.chromium.org/2218033002 for a fix). Original issue's description: > Revert of [api] Clean up scopes and precheck instantiations cache (patchset #3 id:40001 of https://codereview.chromium.org/2206773003/ ) > > Reason for revert: > [Sheriff] Leads to mac asan failures: > https://build.chromium.org/p/client.v8/builders/V8%20Mac64%20ASAN/builds/7835 > > Original issue's description: > > [api] Clean up scopes and precheck instantiations cache > > > > Make sure all the scopes used in api-natives.cc have inlineable constructors > > and destructors. Additionally directly precheck the instantiations cache before > > trying to enter the InvokeScope which sets the save_context. > > > > BUG=chromium:630217 > > > > Committed: https://crrev.com/a2496b942cad524f0f3144b107936eaa9a7c9fd5 > > Cr-Commit-Position: refs/heads/master@{#38346} > > TBR=yangguo@chromium.org,cbruni@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=chromium:630217 > > Committed: https://crrev.com/e1b5cb43a9b90546ff5d6cea89ba17c485e842fb > Cr-Commit-Position: refs/heads/master@{#38356} TBR=yangguo@chromium.org,machenbach@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2217353002 Cr-Commit-Position: refs/heads/master@{#38401} [modify] https://crrev.com/56c8814c0bfca2f4993a4f23537aed1ac4363a6f/src/api-natives.cc [modify] https://crrev.com/56c8814c0bfca2f4993a4f23537aed1ac4363a6f/src/isolate-inl.h [modify] https://crrev.com/56c8814c0bfca2f4993a4f23537aed1ac4363a6f/src/isolate.cc [modify] https://crrev.com/56c8814c0bfca2f4993a4f23537aed1ac4363a6f/src/isolate.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/31cc1d1f5b9f4bdcbc69cbc788ffc31696895a60 commit 31cc1d1f5b9f4bdcbc69cbc788ffc31696895a60 Author: cbruni <cbruni@chromium.org> Date: Fri Aug 05 22:25:52 2016 [bindings] Use new SetAlignedPointerInInternalFields V8 API This should help to reduce the overhead of setting up DOM wrappers. BUG=chromium:630217,chromium:595492 Review-Url: https://codereview.chromium.org/2184113002 Cr-Commit-Position: refs/heads/master@{#410191} [modify] https://crrev.com/31cc1d1f5b9f4bdcbc69cbc788ffc31696895a60/third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c247b6bc05d0695d85b1a3c2343d2bb14c18018d commit c247b6bc05d0695d85b1a3c2343d2bb14c18018d Author: cbruni <cbruni@chromium.org> Date: Fri Aug 05 23:36:06 2016 Make ScriptForbiddenScope inlineable Stack allocated scopes work considerably faster if they have inlineable constructors and destructors. This CL moves ScriptForbiddenScope to it's header file. BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2213903002 Cr-Commit-Position: refs/heads/master@{#410209} [modify] https://crrev.com/c247b6bc05d0695d85b1a3c2343d2bb14c18018d/third_party/WebKit/Source/platform/ScriptForbiddenScope.cpp [modify] https://crrev.com/c247b6bc05d0695d85b1a3c2343d2bb14c18018d/third_party/WebKit/Source/platform/ScriptForbiddenScope.h
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/b920d5f3ff33e8202f3218521c8335723d384e03 commit b920d5f3ff33e8202f3218521c8335723d384e03 Author: cbruni <cbruni@chromium.org> Date: Mon Aug 08 11:16:12 2016 [api] Stay in C++ when constructing an API-function This CL applies the same optimization already present for calling API-function. Execution::New and Execution::Call now both check whether the target is an API-function and avoid calling out into the construct/call stub. BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2203353002 Cr-Commit-Position: refs/heads/master@{#38433} [modify] https://crrev.com/b920d5f3ff33e8202f3218521c8335723d384e03/src/builtins/builtins-api.cc [modify] https://crrev.com/b920d5f3ff33e8202f3218521c8335723d384e03/src/builtins/builtins.h [modify] https://crrev.com/b920d5f3ff33e8202f3218521c8335723d384e03/src/execution.cc [modify] https://crrev.com/b920d5f3ff33e8202f3218521c8335723d384e03/src/objects.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/87c7b7f62e9a948d8f647fed2b651b55327aaa0e commit 87c7b7f62e9a948d8f647fed2b651b55327aaa0e Author: cbruni <cbruni@chromium.org> Date: Tue Aug 09 08:46:21 2016 Don't include MicrotasksScope in ConstructorMode All the outgoing calls that are wrapped by a ConstructorMode scope object already explicitly disallow microtasks by using a MicrotaskScope. BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2229523002 Cr-Commit-Position: refs/heads/master@{#410618} [modify] https://crrev.com/87c7b7f62e9a948d8f647fed2b651b55327aaa0e/third_party/WebKit/Source/bindings/core/v8/V8ObjectConstructor.h
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/0cabbd3d60acf1e040113d59e4cdbc99b953843b commit 0cabbd3d60acf1e040113d59e4cdbc99b953843b Author: cbruni <cbruni@chromium.org> Date: Tue Aug 09 13:57:29 2016 [api] Templatize do_callback parameter in CallDepthScope Drive-by-fix: mark isolates as const in stack-allocated scopes BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2220993003 Cr-Commit-Position: refs/heads/master@{#38496} [modify] https://crrev.com/0cabbd3d60acf1e040113d59e4cdbc99b953843b/include/v8.h [modify] https://crrev.com/0cabbd3d60acf1e040113d59e4cdbc99b953843b/src/api.cc [modify] https://crrev.com/0cabbd3d60acf1e040113d59e4cdbc99b953843b/src/isolate.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c0363fda786a59496d6170b33be55f96bdf3b06e commit c0363fda786a59496d6170b33be55f96bdf3b06e Author: cbruni <cbruni@chromium.org> Date: Wed Aug 31 16:21:33 2016 [gin] Use new SetAlignedPointerInInteralFields api function R=jochen@chromium.org BUG=chromium:630217 Review-Url: https://codereview.chromium.org/2236443002 Cr-Commit-Position: refs/heads/master@{#415651} [modify] https://crrev.com/c0363fda786a59496d6170b33be55f96bdf3b06e/gin/wrappable.cc
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/85575cd8ee33fa3dd49ffc58de6e0b958df29094 commit 85575cd8ee33fa3dd49ffc58de6e0b958df29094 Author: cbruni <cbruni@chromium.org> Date: Fri Sep 23 16:01:20 2016 Revert of [api] Clean up scopes and precheck instantiations cache (patchset #3 id:40001 of https://codereview.chromium.org/2206773003/ ) Reason for revert: Regresses API see go/v8-startup-api Original issue's description: > [api] Clean up scopes and precheck instantiations cache > > Make sure all the scopes used in api-natives.cc have inlineable constructors > and destructors. Additionally directly precheck the instantiations cache before > trying to enter the InvokeScope which sets the save_context. > > BUG=chromium:630217 > > Committed: https://crrev.com/a2496b942cad524f0f3144b107936eaa9a7c9fd5 > Cr-Commit-Position: refs/heads/master@{#38346} TBR=yangguo@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=chromium:630217, chromium:635912 Review-Url: https://codereview.chromium.org/2366903003 Cr-Commit-Position: refs/heads/master@{#39680} [modify] https://crrev.com/85575cd8ee33fa3dd49ffc58de6e0b958df29094/src/api-natives.cc [modify] https://crrev.com/85575cd8ee33fa3dd49ffc58de6e0b958df29094/src/isolate-inl.h [modify] https://crrev.com/85575cd8ee33fa3dd49ffc58de6e0b958df29094/src/isolate.cc [modify] https://crrev.com/85575cd8ee33fa3dd49ffc58de6e0b958df29094/src/isolate.h
Comment 1 by bugdroid1@chromium.org
, Jul 26 2016