Ben Konyi
74af4a00b2
[ VM / Service ] Created public implementation of getAllocationProfile RPC
...
Change-Id: I8c8cb4d47466ae6a298961652eeded762c769568
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105730
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2019-06-13 23:45:52 +00:00
Liam Appelbe
e4196ce8c6
[vm] Namespace constants like offsets and sizeofs to use runtime_api.h
...
Second sub-CL of https://dart-review.googlesource.com/c/sdk/+/100644
The first was here https://dart-review.googlesource.com/c/sdk/+/103487
Now that offsets_extractor is checked in, and we have a big header full
of hard coded constants, the next step is to make sure everything is
using those constants. This is essentially everything in the original
CL, except the new simarm_x64 architecture.
Bug: https://github.com/dart-lang/sdk/issues/36839
Change-Id: I236e4f30aa1df6d92209891c983b792d1835b608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104286
Commit-Queue: Liam Appelbe <liama@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2019-06-10 02:55:25 +00:00
Liam Appelbe
5b72293f49
Reland "[vm] Create offsets_extractor tool."
...
This reverts commit 224f82c21c .
Reason for revert: Just need to split DBC section into 32 and 64 bit
Original change's description:
> Revert "[vm] Create offsets_extractor tool."
>
> This reverts commit 3015d79371 .
>
> Reason for revert: Fails the Flutter build
> /b/s/w/ir/cache/builder/mac_sdk -mmacosx-version-min=10.12 -m32 -fno-strict-aliasing -fstack-protector-all -fcolor-diagnostics -Wall -Wextra -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wunguarded-availability -fvisibility=hidden -stdlib=libc++ -Wheader-hygiene -Wstring-conversion -Wthread-safety -O2 -fno-ident -fdata-sections -ffunction-sections -g2 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Wno-conversion-null -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -O3 -fvisibility-inlines-hidden -std=c++14 -fno-rtti -fno-exceptions -c ../../third_party/dart/runtime/vm/dart.cc -o clang_x86/obj/third_party/dart/runtime/vm/libdart_vm_nosnapshot_with_precompiler.dart.o
> In file included from ../../third_party/dart/runtime/vm/dart.cc:9:
> ../../third_party/dart/runtime/vm/compiler/runtime_offsets_extracted.h:958:50: error: implicit conversion from 'long long' to 'const dart::word' (aka 'const long') changes value from 576460752303423487 to -1 [-Werror,-Wconstant-conversion]
> static constexpr dart::word Array_kMaxElements = 576460752303423487;
> ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~
> ../../third_party/dart/runtime/vm/compiler/runtime_offsets_extracted.h:965:51: error: implicit conversion from 'long long' to 'const dart::word' (aka 'const long') changes value from 2305843009213693951 to -1 [-Werror,-Wconstant-conversion]
> static constexpr dart::word String_kMaxElements = 2305843009213693951;
> ~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
> 2 errors generated.
>
> Change-Id: Iaf509c6ee7a2ce75664935519ac02a933a9eb2bf
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104402
> Reviewed-by: Siva Annamalai <asiva@google.com >
> Commit-Queue: Siva Annamalai <asiva@google.com >
> Auto-Submit: Siva Annamalai <asiva@google.com >
TBR=asiva@google.com
Change-Id: Ibf749ceee274b03cdffa6d7ed46fcbe75d1a1e94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104620
Reviewed-by: Liam Appelbe <liama@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Liam Appelbe <liama@google.com >
2019-06-03 22:14:16 +00:00
asiva
224f82c21c
Revert "[vm] Create offsets_extractor tool."
...
This reverts commit 3015d79371 .
Reason for revert: Fails the Flutter build
/b/s/w/ir/cache/builder/mac_sdk -mmacosx-version-min=10.12 -m32 -fno-strict-aliasing -fstack-protector-all -fcolor-diagnostics -Wall -Wextra -Wendif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wunguarded-availability -fvisibility=hidden -stdlib=libc++ -Wheader-hygiene -Wstring-conversion -Wthread-safety -O2 -fno-ident -fdata-sections -ffunction-sections -g2 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field -Wnon-virtual-dtor -Wvla -Wno-conversion-null -Woverloaded-virtual -Wno-comments -g3 -ggdb3 -fno-rtti -fno-exceptions -Wimplicit-fallthrough -O3 -fvisibility-inlines-hidden -std=c++14 -fno-rtti -fno-exceptions -c ../../third_party/dart/runtime/vm/dart.cc -o clang_x86/obj/third_party/dart/runtime/vm/libdart_vm_nosnapshot_with_precompiler.dart.o
In file included from ../../third_party/dart/runtime/vm/dart.cc:9:
../../third_party/dart/runtime/vm/compiler/runtime_offsets_extracted.h:958:50: error: implicit conversion from 'long long' to 'const dart::word' (aka 'const long') changes value from 576460752303423487 to -1 [-Werror,-Wconstant-conversion]
static constexpr dart::word Array_kMaxElements = 576460752303423487;
~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~
../../third_party/dart/runtime/vm/compiler/runtime_offsets_extracted.h:965:51: error: implicit conversion from 'long long' to 'const dart::word' (aka 'const long') changes value from 2305843009213693951 to -1 [-Werror,-Wconstant-conversion]
static constexpr dart::word String_kMaxElements = 2305843009213693951;
~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
2 errors generated.
Change-Id: Iaf509c6ee7a2ce75664935519ac02a933a9eb2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104402
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
Auto-Submit: Siva Annamalai <asiva@google.com >
2019-06-01 00:51:58 +00:00
Liam Appelbe
3015d79371
[vm] Create offsets_extractor tool.
...
First sub-CL of https://dart-review.googlesource.com/c/sdk/+/100644
A big chunk of the original CL is to do with switching anything that tries
to get the offset of a field in a class to do so using constants generated
by offsets_extractor, rather than introspecting the C++ classes with macros.
This CL just checks in the offsets_extractor tool and its output, as well as
a few bits and pieces needed to make it run.
Bug: https://github.com/dart-lang/sdk/issues/36839
Change-Id: I0d2055c21e2d19260cd77abea7e0a1d880bea6d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103487
Commit-Queue: Liam Appelbe <liama@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2019-05-30 18:41:56 +00:00
Alexander Markov
a8d034f3e1
[vm/reload] Make sure classes in saved class table are visited by GC
...
Previously, IsolateReloadContext::CheckpointClasses() was filling
local_saved_class_table with raw pointers to classes and at the same
time it was adding classes to the set which is based on Array.
After that local_saved_class_table was saved into saved_class_table_
were it becomes visible to GC. However, adding an element to the set
may trigger GC in the middle and pointers for already processed
classes in local_saved_class_table are not visited and are not updated
if GC moves a Class object.
Also, IsolateReloadContext::VisitObjectPointers was not visiting
classes in saved_class_table_ properly as it was interpreting it as
an array of saved_num_cids_ pointers (while it is an array of
ClassAndSize elements).
This change fixes flaky crashes in vm/dart/trigger_gc_in_native_test.
Change-Id: I25b2e50995cf580bc9347f06875d344f75a1a950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100728
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-04-30 17:07:20 +00:00
Ryan Macnak
90c757c766
[vm, interpreter] Allocation fast paths.
...
Bug: https://github.com/dart-lang/sdk/issues/36410
Change-Id: If753e60ac70f7c016e1caa3b296378d3ebc0a91c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/87267
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-04-05 22:37:58 +00:00
Ryan Macnak
565e56dba6
[vm] Reduce cost of allocation tracing.
...
Remove separate table for predefined classes. The original allocation stats CL had this separate to allow directly embedding the table address into code, but we no longer embed addresses to support AppAOT and AppJIT.
Change-Id: Ida3d0764ac8ff179c0541ee73a3283c9c50affab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97286
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-03-19 22:46:59 +00:00
Ryan Macnak
a3ab6b6514
[vm, gc] Reduce cost of maintaining allocation stats during scavenges.
...
Change-Id: If44fe99c87b96f4f370efb3716009e230b5c4f25
Reviewed-on: https://dart-review.googlesource.com/c/94583
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-02-27 22:01:00 +00:00
Ryan Macnak
dc2422ef84
[vm, gc] Fix accounting of external sizes in the class table.
...
- Reset both new and old external sizes for both new and old space GC. Every GC visits weak handles for both generations.
- Don't double count external old size during promotion.
Change-Id: Ic6ad1b4cad58ad18637cee974b170a2eab8afe29
Reviewed-on: https://dart-review.googlesource.com/c/93881
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-02-21 01:27:29 +00:00
Ryan Macnak
3afac84840
[vm, aot] Remove KernelProgramInfo etc before Symbols::Compact.
...
Eliminates some symbols that were memory-reachable but not snapshot-reachable.
Compact the canonical type and type arguments tables along with the symbol table.
flutter_gallery, Android release
Total(CodeSize): 11158045 -> 11055480 (-0.92%)
Change-Id: I63bd1353906ea66c6f82a932cff57f7c25331200
Reviewed-on: https://dart-review.googlesource.com/c/92221
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-02-08 17:16:26 +00:00
Ryan Macnak
93dcfaa289
[vm, gc] Concurrent marking.
...
Fall back to parallel marking
- on IA32 (barrier unimplemented)
- when write_protect_code is enabled (protection dependency on marking state unimplemented)
Bug: https://github.com/dart-lang/sdk/issues/34002
Change-Id: If093f24e4dc6bf29f407cc45e95bb2274fc53dcf
Reviewed-on: https://dart-review.googlesource.com/71389
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2018-09-21 21:30:33 +00:00
Erik Corry
c8ad75d44a
[VM] Make classes movable in sliding compactor
...
Store class sizes off heap so we can determine the size
of their instances even while the classes are moving.
R=rmacnak@google.com
Change-Id: I7b935114f76eb8b6aaa57d65e5b7cc0070afa75f
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/52104
Commit-Queue: Erik Corry <erikcorry@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2018-04-26 09:38:25 +00:00
Ryan Macnak
d9c3190e44
[vm] Remove some bin -> vm includes.
...
Change-Id: Id304de9618a299a201b946a901a54352772f56fb
Reviewed-on: https://dart-review.googlesource.com/48704
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-03-28 23:16:09 +00:00
Martin Kustermann
cf8a6063f8
[VM] Improve AssertAssignable/InstanceOf by having a fast case for non-generic, instantiated types
...
When the type to test against is instantiated and has no type arguments
there is a high probability that we receive instances of that class or
subclasses at runtime.
This CL therefore extends the fast-path of AssertAssignable/InstanceOf
by checking whether the instance class id is within the cid ranges that
directly/indirectly implement/extend the type to test against.
Currently we have an almost depth-first preorder numbering of class ids
in AOT, but there are exceptions. So each class can have a number of
cid-ranges as subclasses / classes which implement it's interface.
This seems to improve performance of dart-aot-v2
* flutter stock build by 15+%
* DeltaBlueClosures by 10+%
and reduces code size on
* flutter gallery by -3%
Issue https://github.com/dart-lang/sdk/issues/31798
Change-Id: I07dd91589cc3fcd8c5952bdba339e2e2a459e08e
Reviewed-on: https://dart-review.googlesource.com/35620
Commit-Queue: Martin Kustermann <kustermann@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
2018-01-25 07:13:42 +00:00
Ryan Macnak
b0f203db19
[vm-service] Include external sizes in the allocation table.
...
Bug: https://github.com/dart-lang/sdk/issues/30380
Change-Id: Ieec5adf13548b73bac886816d4a2174de7585880
Reviewed-on: https://dart-review.googlesource.com/7685
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Todd Turnidge <turnidge@google.com >
2017-09-25 18:33:07 +00:00
Erik Corry
c6a199e40b
Sort class IDs before training AppJIT snapshots
...
R=fschneider@google.com , rmacnak@google.com
BUG=
Review-Url: https://codereview.chromium.org/2699853002 .
2017-02-20 12:14:17 +01:00
Siva Annamalai
d77809e15f
Fix the following tsan errors:
...
1. Race updating the allocation stats for a class
WARNING: ThreadSanitizer: data race (pid=16346)
Write of size 8 at 0x7bac00011930 by thread T4:
#0 dart::AllocStats<long>::AddOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.h:56 (dart+0x000000769278)
#1 dart::ClassTable::UpdateAllocatedOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:423 (dart+0x00000076923a)
#2 dart::Object::Allocate(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:1880 (dart+0x00000092ddff)
#3 dart::Array::New(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21586 (dart+0x00000098d3fd)
Previous write of size 8 at 0x7bac00011930 by thread T3:
#0 dart::AllocStats<long>::AddOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.h:56 (dart+0x000000769278)
#1 dart::ClassTable::UpdateAllocatedOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:423 (dart+0x00000076923a)
#2 dart::Object::Allocate(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:1880 (dart+0x00000092ddff)
#3 dart::Array::New(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21586 (dart+0x00000098d3fd)
#4 dart::Array::New(long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21575 (dart+0x000000932f6d)
2. Race while updating c++ table entry into Object::builtin_vtables_
WARNING: ThreadSanitizer: data race (pid=16346)
Atomic write of size 8 at 0x00000210c970 by main thread:
#0 __tsan_atomic64_compare_exchange_val <null> (dart+0x0000005bad8a)
#1 dart::AtomicOperations::CompareAndSwapWord(unsigned long*, unsigned long, unsigned long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/atomic_linux.h:63 (dart+0x00000074b744)
#2 dart::ClassTable::Register(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:127 (dart+0x000000767cbc)
#3 dart::Isolate::RegisterClass(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/isolate.cc:170 (dart+0x0000008e0046)
#4 dart::RawClass* dart::Class::New<dart::Array>() /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:2037 (dart+0x000000931055)
Previous read of size 8 at 0x00000210c970 by thread T3:
#0 dart::ClassTable::Register(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:130 (dart+0x000000767cc9)
#1 dart::Isolate::RegisterClass(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/isolate.cc:170 (dart+0x0000008e0046)
#2 dart::RawClass* dart::Class::New<dart::Array>() /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:2037 (dart+0x000000931055)
BUG=
R=regis@google.com
Review-Url: https://codereview.chromium.org/2602123002 .
2016-12-29 13:20:58 -08:00
Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Zachary Anderson
103881d01c
Make header include guards great again
...
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER
This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/2450713004 .
2016-10-26 00:26:03 -07:00
Ryan Macnak
6a5a868a4e
AOT: Reassign class ids so class hierarchies have contiguous ranges.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2281263002 .
2016-08-26 16:17:05 -07:00
Ryan Macnak
6b5f29fb70
Reload: Don't free the saved class table while another thread may be reading it.
...
Fixes #27016 .
R=asiva@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2240283002 .
2016-08-12 16:12:25 -07:00
Ryan Macnak
9470c085c3
Fix allocation stats for cross-compiled AOT targeting ARM or MIPS.
...
Resolves disagreement between SIMARM and ARM on the size of ClassHeapStats. Fixes assertion failures in AllocStats::Verify.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2172803002 .
2016-07-21 16:04:57 -07:00
Ryan Macnak
a6f954b0f3
Don't track allocations in product mode.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2143153002 .
2016-07-12 14:15:02 -07:00
Zachary Anderson
a503570e3a
Fuchsia: Initial check-in.
...
Instructions to build and run are in README.fuchsia.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2117593002 .
2016-07-01 12:42:05 -07:00
Ryan Macnak
524fbc1e0f
Use clustered serialization for full snapshots.
...
Retain the recursive-descent format for script and message snapshots.
Flutter gallery app on a Nexus 4
- Snapshot, excluding instruction/rodata sections 3429177 -> 2874997B (-16%)
- InitOnce 54.1 -> 8.4ms (-84%)
- InitializeIsolate 374.3 -> 170.8ms (-54%)
R=asiva@google.com
Review URL: https://codereview.chromium.org/2032153003 .
2016-06-29 19:50:06 -07:00
John McCutchan
48c8ffa7f3
Initial isolate reload support
...
This is a cut of the work that Todd and I collaborated on in the reload branch.
In this CL, we've dropped the loader port hacks, in other words, on stack reloading in the standalone embedder does not work yet.
- [x] Support for hot reloading of isolate source code
- [x] Unit test harness and many tests
- [x] Service protocol and Observatory support
- [x] Product build does not include support for hot reloading.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1965823002 .
2016-05-17 12:19:06 -07:00
Ryan Macnak
4b112c6d25
Precompilation: drop unused types and type arguments and empty classes and libraries.
...
precompiled dart2js arm 20748837 -> 20639848 (-0.52%)
precompiled flutter asteriods arm64 8926398 -> 8782136 (-1.6%)
R=regis@google.com
Review URL: https://codereview.chromium.org/1686773002 .
2016-02-22 14:05:03 -08:00
Ivan Posva
4f392df85e
Fix some more shorten-64-to-32 warnings:
...
- Remove duplicate check for javascript integer overflow.
- Make sure the BitField class knows the type it is
encoding into.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1644223006 .
2016-02-02 13:58:06 -08:00
Daniel Andersson
b62e3204ed
Make old-space heap stats safe for parallel marking.
...
Record live count/size stats locally in each marking task and sum the
results at the end.
This is needed for parallel (and later, concurrent) marking.
This also yields a more compact representation of
the stats compared to ClassHeapStats, which interleaves new/old/etc.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1346333003 .
2015-09-16 15:09:05 -07:00
John McCutchan
ec675a3b0d
Enable allocation tracing for classes owned by vm isolate
...
- Don't store the allocation tracing toggle bit in the class.
- Make sure that array and context slow path stubs are added to the code object's static call table.
- Add missing MaybeTraceAllocation to context allocation stub.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//1292723002 .
2015-08-14 06:55:05 -07:00
Regis Crelier
5e2dbbbba4
This fixes a typo.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//1271013005 .
2015-08-04 16:46:08 -07:00
Florian Schneider
8d38a58c18
Make array allocation stub shared between isolates.
...
This allows to make the last explicitly named stubs shared between isolates.
When sharing code stubs, we can't do patching at their entry anymore.
Therefore, I had to remove patching support of the array allocation stub.
Is this a functionality we want to keep?
The change is mostly performance-neutral because optimized code has an inlined fast
path for array allocation and only uses the stub for the slow-case.
The only isolate-specific stubs left are object allocation stubs which are
associated with their Class are per-isolate.
Since this CL removes any isolate-specific stubs from StubCode, it becomes AllStatic.
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org//1247783002 .
2015-07-23 12:56:16 +02:00
Florian Schneider
0cf617ef13
VM: Refactor allocation stats code and remove duplicate code.
...
Make context allocation stub shared between isolates.
The fast-path used in optimized code still has isolate-specific
addresses inlined for performance reasons.
Common functions are moved into class_table.h/.cc.
This is a preparation for adding an isolate-independent version of the
allocation code and allocation tracking code.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1241863002 .
2015-07-17 15:15:33 +02:00
Florian Schneider
141d6bdcd2
Make subtype test cache stub shared between isolates.
...
Also remove an the unused pp paramters from LoadIsolate on ARM64.
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org//1235843003 .
2015-07-13 15:42:16 +02:00
John McCutchan
598c67001b
Update Assembler::TryAllocate to support inline allocation tracing
...
- Track whether class allocation should be traced in existing ClassHeapStats structure.
- Emit compare and branch at top of ::TryAllocate
These changes appear to be performance neutral.
An alternative approach is to deoptimize all code that inlined allocations for a specific class. I do not think this is a good approach because we will spoil the water- allocations that aren't occurring in the (optimized steady state) running program will appear in the allocation profile. This will make the data much less actionable bordering on misleading. The approach used in this CL will guarantee the allocation profile aligns with the actual running program.
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//1213013002 .
2015-07-10 12:19:01 -07:00
koda@google.com
d4481420e0
Copy-on-write class table for concurrent reading.
...
Make ClassTable::At thread safe by keeping old copies of the class table.
They can be safely deallocated during the stop-the-world phase of GC.
This avoids making a copy for every sweeper task, and is the first step towards removing the fake Isolate workaround.
R=iposva@google.com
Review URL: https://codereview.chromium.org//816773005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43048 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 18:13:12 +00:00
koda@google.com
f0959282a3
Fix build (make Verify public).
...
R=zra@google.com
TBR=zra@google.com
Review URL: https://codereview.chromium.org//744643003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41866 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 20:18:02 +00:00
koda@google.com
f346d2ec7a
Fix allocation stats bug on ARM; add unit test.
...
Also add sanity checks to ClassHeapStats.
Array allocation stub was using an address instead of a size for the allocation size.
R=zra@google.com
Review URL: https://codereview.chromium.org//747463002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41862 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 19:20:17 +00:00
fschneider@google.com
855541d88e
Make subtype test stubs isolate-specific.
...
This avoids loading the current isolate from the context
register and makes those stubs not depend on having the context
stored in the CTX register.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//605533003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40714 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 16:06:30 +00:00
iposva@google.com
2ee3263277
- Add and enable concurrent sweeper.
...
- Keep separate lists for normal sized executable and data pages.
R=koda@google.com
Review URL: https://codereview.chromium.org//503363005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39593 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 13:37:55 +00:00
koda@google.com
015211b474
Track per-class promotion stats.
...
This will be useful for allocation policy and heap growth policy.
Also include these stats in the VM service.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//487973002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39415 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 17:57:12 +00:00
koda@google.com
bd979f84d5
Send allocation stats with each class and show in class view.
...
For each class, if there are any allocations, shows current number of instances, shallow size, and the already existing link for retained size.
Also refactor code in ClassTable to reduce duplication.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//345543003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37566 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 20:17:42 +00:00
turnidge@google.com
9243ffc4ff
Always use the same json for null in the vm service.
...
PrintToJSONStream -> PrintJSON.
ALSO:
Fix <em> tags in the Observatory.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//257053003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35532 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 18:10:02 +00:00
koda@google.com
00ae3f7848
Fix accumulated size stats for fixed-size instances.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//249843003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35321 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 18:17:03 +00:00
koda@google.com
9a8671276b
Add class and address information to heap map; display on hover.
...
Display a string like "String @ 0xe97c3328" while hovering over the map.
Also add page separators (black).
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//204103009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34195 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 18:56:45 +00:00
asiva@google.com
a01ab16991
1. When reading a full snapshot use the class id from the snapshot instead
...
of generating a new one. This ensures that assumptions made about the
class id when generating a snapshot will still hold in the version that
runs from a snapshot.
2. remove ObjectHistogram code as it is not used anymore and has been replaced
by VM service.
R=johnmccutchan@google.com , regis@google.com
Review URL: https://codereview.chromium.org//187133004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33340 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 19:24:02 +00:00
johnmccutchan@google.com
0f79171efb
Add user resetable accumulator to allocation profiler.
...
Display aggregate of new and old space in a separate table.
Speed up display of tables by 10x.
Fix heap display bug (heap stats were always for new space).
Keep sort across refreshes.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//173013004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33220 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 15:39:06 +00:00
johnmccutchan@google.com
9ca09b50e7
Track live instance and allocation counts for classes.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//51653006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31978 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-22 19:21:22 +00:00
johnmccutchan@google.com
c86bdc5bcf
Expose field data, use class id, and merge all collections into "objects"
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//24075002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27684 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 00:59:42 +00:00