Commit Graph

22524 Commits

Author SHA1 Message Date
Tess Strickland 1125460f2e [vm,dyn_modules] Allow desugared const constructors.
The front end may desugar some const constructors into procedures, so be
less strict with what is expected in the list of const constructors.

Also updates SourceReport to check all Functions with is_const() true
against the collected const constructor hits and not just Constructors.

TEST=ci

Fixes: https://github.com/dart-lang/sdk/issues/61947

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I092938eeeb0459de9b3d95400a538ec6528c43fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462442
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-11-17 06:56:33 -08:00
Lasse R.H. Nielsen 9a39b8972b Split zone.dart into smaller parts.
I want to do some refactoring, and it's easier to manage if everything
isn't in one big file.

No change to functionality in this CL, only moving declarations.

CoreLibraryReviewExempt: No code change, only moved to new part files.
Change-Id: I4b5e244172302b52a04387372738c46a07807a31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462100
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-11-17 01:37:52 -08:00
Alexander Aprelev de77c6b766 [vm/shared] Introduce ScopedThreadLocal to allow keeping state on
thread, outside of isolate, on isolate-group bound callback.

Fixes https://github.com/dart-lang/sdk/issues/61523
TEST=scoped_thread_local_test

Change-Id: I0c8280d2808d940a5fb0d628db191932400a5edb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/451402
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-11-13 09:50:34 -08:00
Ryan Macnak b0c305b8e4 [vm] Fix unused variable warning on GCC.
TEST=ci
Change-Id: I19740707337e437d7135d9b6803c01cad59097ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461541
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-11-12 12:48:59 -08:00
Ryan Macnak f1e659e503 [vm] Enable store-store fence after allocation on all architectures.
TEST=ci
Change-Id: Ibde13e87f9a083b54a7cecffcfbac2c083fe47cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461183
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-11-12 09:22:32 -08:00
Ryan Macnak a08c958346 [vm] Remove leftover from Zones moving from Isolate to Thread.
TEST=ci
Change-Id: I1fc0217dff937ce0aefe333b96eba30a223ec467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461240
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-11-12 07:17:59 -08:00
Ryan Macnak 3125f46f5b [vm] Add Zicfiss.
TEST=ci, local qemu
Change-Id: Iea22fff14362a6eef937f22ab9121376c7e27014
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460883
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-11-11 11:21:46 -08:00
Tess Strickland 4a41653f6a [vm] Rework handling of section indices in the MachOWriter.
Store the index of the section in the load commands in the section.

Initialize it at the same time as the symbol tables are initialized,
since they are the primary client of this index.

Instead of storing the section index separately in symbols, which
means they must be updated after any reordering, just keep a pointer
to the owning section (or nullptr, if this is a global symbol).

This also allows us to lazily determine the final value written for
section-owned symbols using the owning section's memory address,
so now there is no finalization step needed for symbol tables.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-aot-dwarf-linux-product-x64-try,vm-aot-linux-debug-x64-try,vm-aot-mac-debug-arm64-try
Change-Id: I87473a8fedf085e08492db62f133882c886bd9cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460045
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-11-11 04:59:31 -08:00
Ryan Macnak 7d7f461ad9 [vm] Improve packing of Thread.
Fix dart_stream_ and service_extension_stream_ appearing after the end-of-accessed-from-generated-code comment.

TEST=ci
Change-Id: I8f10d32b082125d7ed090cd118089309022c0f3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459700
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-11-10 13:04:31 -08:00
Slava Egorov b5e4f412ab [vm] Fix quadratic behavior in AssignSafepoints
Rework register allocator to assign safepoints eagerly
as live ranges are being built and safepoint instruction
is being visited instead of doing it post-factum when 
each range is being finalized.

Fixes https://github.com/flutter/flutter/issues/176619

TEST=ci, manually tested equivalence of safepoint lists

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-x64-try,vm-aot-mac-debug-x64-try,vm-aot-mac-debug-arm64-try,vm-aot-mac-product-arm64-try,vm-aot-mac-release-arm64-try,vm-aot-linux-debug-x64-try
Change-Id: Ieebda2796c2397a701b9184f6b8675fe6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460100
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-11-10 02:29:41 -08:00
Alexander Markov bfb0766bdf [vm] Fix msvc product build
Fixes the following build error:

```
libdart_vm_precompiler.profiler.obj : error LNK2019: unresolved external symbol "public: static class dart::Sample * __cdecl dart::SampleBlock::ReserveSampleAndLink(class dart::Sample *,class dart::Isolate *)" (?ReserveSampleAndLink@SampleBlock@dart@@SAPEAVSample@2@PEAV32@PEAVIsolate@2@@Z) referenced in function "public: bool __cdecl dart::ProfilerStackWalker::Append(unsigned __int64,unsigned __int64)" (?Append@ProfilerStackWalker@dart@@QEAA_N_K0@Z)
```

TEST=vm-msvc-win-x64-try, vm-msvc-win-arm64-try

Change-Id: I0819a15c6201deb7933ebe01690a80e8d083134d
Cq-Include-Trybots: luci.dart.try:vm-msvc-win-arm64-try,vm-msvc-win-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460140
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-11-06 12:49:19 -08:00
Slava Egorov df5f9023e8 [vm] Fix product testing builds
Our product builds (used for testing) are setting dart_runtime_mode ==
"release", so we better align behavior of dart_product_config and 
dart_maybe_product_config in such case otherwise we create unexpected
skew between artifacts and dartaotruntime which is used to compile them.

In reality we should probably delete Product$ARCH build altogether
because all necessary artifacts are actually part of Relase$ARCH builds
anyway these days.

TEST=Run vm-aot-dyn-linux-product-x64 tests


Change-Id: Ifbc2b9679a666c9f22b289d6eb0b8b836a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460040
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-11-06 03:34:26 -08:00
Ryan Macnak 8c73b534f5 [vm] Use dmb ishst instead of dmb ish for store-store fence.
TEST=ci
Change-Id: Id7fb33bb4d9626ad420fd5aac2df86b47bd5c7bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459662
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-11-05 13:29:00 -08:00
Slava Egorov 270bc0855a [vm] Exclude timeline from Flutter linux release engine
This undoes size regression introduced 
commit 489f63a3bd

This also exclude timeline from Dart binaries built
in PRODUCT mode - but not from PRODUCT AOT runtime
built as part of normal SDK.

This CL also fixes the build with DART_DISABLE_TIMELINE.

TEST=manually by building Linux engine

Change-Id: Ie43826ea4150aac6bdb686f37215ba0c6a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459600
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-11-05 01:08:20 -08:00
Ryan Macnak 159bbb6f1b [vm] Improve packing of Sample.
TEST=ci
Change-Id: Iad37e5f7331d731f4bf0ec9978ac1d06dd8693d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459640
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-11-04 15:14:13 -08:00
Ryan Macnak 160fd0a5f9 [test] Shrink vm/dart/profiler_deep_stack_test.
This test is timing out on some configurations.

Change-Id: I42ec230e34b54a078ac52ea9a99782f6b4f88a97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459544
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-11-04 14:28:17 -08:00
Ryan Macnak 7e28e7d504 [profiler] Don't read from a previous block when a sample overflows to the another block.
TEST=dartfuzz
Bug: https://github.com/dart-lang/sdk/issues/61904
Change-Id: I0fd5176502e0d11c5af35f5c27653db8cc294eff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459523
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-11-04 13:14:10 -08:00
Slava Egorov 8656266eb4 [vm] Exclude Perfetto from Flutter release engines
This addresses size regression which was introduced by
commit 489f63a3bd.

Fixes https://github.com/flutter/flutter/issues/177943

TEST=manually built Flutter engine with this change to confirm

Change-Id: I42ea874a5b61e212ae0aab25f3da39666a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459461
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-11-04 06:29:09 -08:00
Ryan Macnak d91281fdb4 [vm] Fix Class::EnsureIsFinalized returning while another thread is only half-finished with finalization.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/61869
Change-Id: Ief55b2936f98fd4e9da83a8c44cf594afd796ce0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458481
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-11-03 10:50:27 -08:00
Alexander Aprelev ec6a01c47a [gardening] Remove raw_datagram_read_all_test from isolate stress test list.
The test has hardcoded timing expectations which don't seem to work reliably in isolate stress test setting.

Fixes https://github.com/dart-lang/sdk/issues/46982
TEST=ci

Change-Id: I557a22e897d6c61994755e02f9d8ead41f7407fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458940
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-10-31 10:25:24 -07:00
Ryan Macnak 2608c03824 [vm, gc] Avoid growth policy data race.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/61862
Change-Id: Icd16140999282b33fd9fbcceda901b82e4267c7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458421
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-29 15:46:01 -07:00
Ryan Macnak 1f96ba9281 [vm] Increase Android baseline to RVA23.
TEST=local build
Change-Id: Ibf0d13d0dd11a0c054e79da1365a385f16d41cb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458322
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-29 12:44:40 -07:00
Ryan Macnak 17a37d2fa6 [test] Avoid data race checking for isolate cleanup callback.
Remove manual MSAN unpoisoning that should happen automatically for Pointer/TypedData writes.

TEST=tsan, msan
Bug: https://github.com/dart-lang/sdk/issues/61503
Bug: https://github.com/dart-lang/sdk/issues/61772
Change-Id: I7c3af7ad769f36a869de7f4d8125d0ced47c9ec7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458069
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-29 08:28:41 -07:00
Slava Egorov 5d959c757f [io] Fix Flutter Android build
It seems that socklet_t is sometimes defined as a signed type which
causes a signed vs unsigned comparison warning and breaks the build as a
result.

TEST=manual build

Change-Id: Ie30c1b0615fc93b6589a0894b48ce7006a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458280
Auto-Submit: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2025-10-29 07:25:33 -07:00
Slava Egorov e50d3b98a3 [io] Support Unix domain sockets on Windows
Basic support for Unix domain sockets on Windows within
the limitations of the operating system itself: no 
support for abstract addresses, datagram or 
packet sockets and ancillary data.

This also fixes File::GetType on Windows to correctly
identify reparse points representing AF_UNIX sockets
as such, rather then identify them as links.

Finally, it is worth noting that there is an existing
discrepancy between POSIX OSes and Windows: on POSIX OSes
File(sockPath).existsSync() returns true, but on Windows the 
same code returns false because Unix domain sockets are not 
considered regular files by stat. 

This CL does a bunch of refactoring around RawAddr class which
surves as a wrapper around various structures in sockaddr_* family.
Distinguishing anonymous AF_UNIX address from abstract AF_UNIX
address requires passing around the length of the address
structure. Thus we incorporate this information into
RawAddr. This will also make possible to properly support
full-range of abstract AF_UNIX addresses in the future because
supporting these requires properly handling embedded NUL bytes.
(See https://github.com/dart-lang/sdk/issues/46158).

Fixes https://github.com/dart-lang/sdk/issues/41161

TEST=standalone/io/unix_socket

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-x64-try
Change-Id: I016cb33ebdd62f0cac1ae97d822105366a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457720
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-10-29 05:25:24 -07:00
Ryan Macnak 2efbf96aa6 [test] Remove cachable_idempotent_test from the isolate stress test.
This test observes side-effects of call site caching from other isolates.

Change-Id: I3c0c35a30cfa0b4d8ed6dc14d997ae81e79b3375
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456483
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-28 17:32:20 -07:00
Ryan Macnak b2f262a596 [vm, gc] Take the space lock for new-space Contains.
Remove several dead Contains variants.

TEST=iso-stress
Bug: https://github.com/dart-lang/sdk/issues/61760
Change-Id: Ic73706016f257f8328f91091bd1ef0460c0b1fb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458062
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-10-28 12:42:53 -07:00
Ryan Macnak 395c687688 [vm] Remove dead field TimelineEvent::next_.
TEST=build
Change-Id: I94541f2d66dd4b852f4cab226e04d9dac26a63b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458061
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-28 12:35:11 -07:00
Ryan Macnak 5541255c4e [vm] Fix data race over file timeline recorder's cached blocks.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/61475
Bug: https://github.com/dart-lang/sdk/issues/61796
Change-Id: I6995b00b47c3d67a7ea0a4a0e7d72509058ee392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458060
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-28 12:34:49 -07:00
Hassnaa Mohamed 2482ee273d [vm] Fix data race in Function::unoptimized_code (#61800)
Closes https://github.com/dart-lang/sdk/pull/61823

GitOrigin-RevId: 271acaa4d1e40af5410d94d0eaf95337b7b53add
Change-Id: I0d350dadb93f178edf4288b914dd3c8bf6936254
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457660
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-28 10:27:49 -07:00
Johnni Winther 6d70657fad [kernel] Add RedirectingFactoryInvocation
This adds an internal wrapper expression for redirecting factory invocations. This holds a reference to the original redirecting factory constructor along with the resulting invocation of the generative or factory constructor. The node is removed during constant evaluation and only available to backends through the pre-modular transformations.

TEST=existing

Change-Id: I35c19766117ab2942aefddb4ccebcd2df66babf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454820
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-28 03:03:44 -07:00
Ryan Macnak 3a46c47601 [vm] Don't feed the simulator's registers into ProfilerNativeStackWalker.
Default the simulators to --no-profile-vm same as the non-simulators.

TEST=vm/dart/stream_timeline_to_test
Bug: https://github.com/dart-lang/sdk/issues/61811
Change-Id: I26cf956e240ffa542f3d52345e680404bc2d2021
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457840
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-10-27 14:34:39 -07:00
Ryan Macnak 1f0437ea34 [vm, profiler] Don't tear down sample buffers while there are pending signal handlers.
TEST=dartfuzz
Bug: https://github.com/dart-lang/sdk/issues/42401
Bug: https://github.com/dart-lang/sdk/issues/52052
Bug: https://github.com/dart-lang/sdk/issues/60809
Change-Id: Ic61968fd312de6f84f2a064be18cbed8f2c68e5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456820
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-10-27 11:17:38 -07:00
Ryan Macnak a1739da4e3 [vm] Avoid data race during ICData cloning.
TEST=iso-stress
Bug: https://github.com/dart-lang/sdk/issues/61790
Change-Id: I3007429216e27e0e84b49bc36a0076b9b460fa53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456860
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-27 10:20:01 -07:00
Alexander Aprelev 2532cf395a [vm] Grab read program lock when querying Class functions.
Fixes https://github.com/dart-lang/sdk/issues/61734
TEST=tsan ci

Change-Id: Id0c905109ad88f9a0e4abc302b7ad90b8239a86a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457140
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2025-10-27 09:57:36 -07:00
Alexander Aprelev 542a11bf3b [gardening] Increase running time of a stream_timeline_to_test.
This is to ensure test makes enough progress on sim architectures, so that gc events are generated.

Fixes https://github.com/dart-lang/sdk/issues/61811
TEST=ci

Change-Id: Iafd3db8312a728fdfe749abcb76a47d78a697fe2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457440
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2025-10-27 09:35:31 -07:00
Tess Strickland 5729e6b87d [vm,dyn_modules] Handle traced allocation of classes.
Add a check in TryAllocate for whether allocations for the class id
should be traced and, if so, return false so the allocation runtime
entry is called instead.

TEST=pkg/vm_service/test/get_allocation_traces_test

Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: I6107423d099841c321c0eee440bedddddfacaccc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457020
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2025-10-24 05:28:40 -07:00
Vyacheslav Egorov 489f63a3bd [vm] Add NativeRuntime.streamTimelineTo
This API allows to programmatically generate timeline information 
including profiling samples if timeline format supports it.

This change also includes Perfetto timeline writer and profiler 
into non-mobile PRODUCT builds. The size of Mac OS X dartaotruntime
has increased by 34352 bytes (0.7%).

This relands commit 553887bc56 with fixes
for Android builds.

TEST=vm/dart/stream_timeline_to_test

CoreLibraryReviewExempt: VM specific dart:developer API.
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-product-arm-try,vm-ffi-android-release-arm-try,vm-aot-android-release-arm64c-try
Change-Id: Ifb7c66982fe9d17d2f5c9acb163a94c56a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457301
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-10-24 04:34:01 -07:00
Slava Egorov b24698b9b5 Revert "[vm] Add NativeRuntime.streamTimelineTo"
This reverts commit 553887bc56.

Reason for revert: Broken android builds

Original change's description:
> [vm] Add NativeRuntime.streamTimelineTo
>
> This API allows to programmatically generate timeline information 
> including profiling samples if timeline format supports it.
>
> This change also includes Perfetto timeline writer and profiler 
> into non-mobile PRODUCT builds. The size of Mac OS X dartaotruntime
> has increased by 34352 bytes (0.7%).
>
> TEST=vm/dart/stream_timeline_to_test
>
> CoreLibraryReviewExempt: VM specific dart:developer API.
> Change-Id: I326f5fd29ee82a503160f5f5a2a857a7c55330ec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426220
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Slava Egorov <vegorov@google.com>

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I583ad74b850514fb47054149da464a07874fc2f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457000
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2025-10-23 04:58:29 -07:00
Vyacheslav Egorov 553887bc56 [vm] Add NativeRuntime.streamTimelineTo
This API allows to programmatically generate timeline information 
including profiling samples if timeline format supports it.

This change also includes Perfetto timeline writer and profiler 
into non-mobile PRODUCT builds. The size of Mac OS X dartaotruntime
has increased by 34352 bytes (0.7%).

TEST=vm/dart/stream_timeline_to_test

CoreLibraryReviewExempt: VM specific dart:developer API.
Change-Id: I326f5fd29ee82a503160f5f5a2a857a7c55330ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426220
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2025-10-23 04:47:13 -07:00
Alexander Markov d16ce70617 [vm] Improve inline 'is' tests against Function and Record
Testing for kClosureCid/kRecordCid is exhaustive in those cases,
so we do not need a subsequent STC type test.

Follow-up to https://dart-review.googlesource.com/c/sdk/+/456406.

TEST=ci

Change-Id: I7cb4487408b3b181f1f5384966340cc4c9a9a86f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456720
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-10-22 14:10:49 -07:00
Ryan Macnak 4fe0461368 [test] Further weaken many_interfaces_flat_test to avoid timeouts.
Change-Id: Iec6987c816b07b4402b82579af32265e49054be1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456484
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-22 09:36:20 -07:00
Alexander Markov 2626836f36 [aot,dyn_modules] Fix inlined 'is' tests for classes which can be extended in dynamic modules
Bug: b/453914353
Change-Id: I5739913010b9331f6e060150680a0051ed580a2d
TEST=pkg/dynamic_modules/test/data/extend_class3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456406
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2025-10-22 08:51:48 -07:00
Ryan Macnak a4a5bc4fc9 [vm] Fix TSAN crashes due to TSAN's own overflow.
TEST=vm/cc/DartAPI_StackOverflow
Change-Id: If5456f4f0a194332b38901f9bd677f3cd9af561c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2025-10-21 15:57:35 -07:00
Ryan Macnak fca41fa22f [vm, compiler] Refactor IA32 leaf runtime calls to be more like the other architectures.
TEST=ci
Change-Id: I2e5902649df3a09c83240ecda26d0f514755e56d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456101
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-21 10:22:01 -07:00
Ryan Macnak 16dac1c61d Roll Clang from 9d7449a82b83 to 8b93f27cf7e6
TEST=build
Change-Id: I4c7ad19d9b5d9a7f329516296c1cd01dd64053b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456160
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
2025-10-21 09:22:50 -07:00
Ryan Macnak 90cb9e4c31 [dartfuzz] Fix flag fuzzer after dart2wasm change that requires output have the wasm extension.
Change-Id: I9e89e6e91b5b279e5310e3fd3f51f5e3b6c6c1b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456108
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2025-10-21 08:00:00 -07:00
Ryan Macnak 4e3f44fb95 [vm] Synchronize between switchable call patching and loading in the runtime.
TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/61718
Change-Id: I8938b3243144a24febaa58a48a98fe6d328fd6be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456105
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-20 17:51:13 -07:00
Ryan Macnak f8e61ad148 [vm] Fix TSAN symbolization for Mac.
TEST=tsan
Change-Id: I44456d685737c0fe59c25d0f2cc9f6fc8a4ded56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456106
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-20 15:58:20 -07:00
Ryan Macnak fd7ddd4cd0 [vm] Fix Android ARM32 build.
Change-Id: I9467bc4145f09ffbbf4a10ecde627dec59fc023c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456140
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-10-20 15:36:20 -07:00