* Add a chromium LICENSE file for binary_size.
* Update BUILD.gn files to still work.
Tested: CQ+flutter-linux-try
Cq-Include-Trybots: luci.dart.try:flutter-linux-try
Bug: b/286184681
Change-Id: Ia52839bc3edd9e42c2df27d0cb7d290851712249
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332963
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
While in more recent SDK versions the 'patched_class_' field has
been replaced with 'wrapped_class_', this package can still be
used with the earlier SDK versions if we fall back to checking it.
Issue: https://github.com/flutter/flutter/issues/130009
Change-Id: Ifb1250393b72e58bbdc0764c7e2ce96269e659ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312802
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Also remove the '<anonymous signature>' check, since we stopped
generating function objects for function types before the current
minimum SDK version for the package.
Change-Id: I47c0522ae4ba778221ee98f93fdae8c22a57d688
Bug: https://github.com/flutter/flutter/issues/128402
Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-win-release-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307860
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Closes https://github.com/dart-lang/sdk/pull/50920
GitOrigin-RevId: fa87531bd0f52b69485c9d02ff9e44a4a29c6a91
Change-Id: I0ae8574a5b77087895e004079f221201bb550cf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278535
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This CL:
* Removed the redirect from .packages to .dart_tool/package_config.json
(whenever such a file existed).
* Removes support for the old format entirely.
* Updates all tests etc that were found.
Fixes https://github.com/dart-lang/sdk/issues/48939
TEST=Existing tests updated.
Change-Id: Iccf711c455ac1885189aa773ca74dd8f55012964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248603
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.
For additional background information see go/dart-sdk-owners.
TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
After 7131d318 landed, the instruction size for the modified function
(which removes all but one closure) shrank enough to more than outweigh
the extra nodes that get attributed to it compared to the original.
TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test
Cq-Include-Trybots: luci.dart.try:pkg-mac-release-try
Change-Id: I05f2dbd6ec2850a66b38c9f70fb67a905208c384
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199660
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Instead of special-casing the current fields that may have
WeakSerializationReferences, handle WSRs appearing as elements
or properties of objects more generally. This removes existing
special casing and avoids the need for it in case of new
future uses of WSRs.
For artificial nodes being added for dropped
WeakSerializationReference targets, add them as kArtificial nodes
(not kSnapshot) that has the original offset (element) or
name (property). The replacement is added as a kSnapshot node
that has a negative offset with the same magnitude as the
artificial node (element) or ":real_<property name>" (property).
This simplifies the work done in pkg/vm_snapshot_analysis to
use the artificial nodes instead of replacement ones for
reassembling hierarchies and the like.
This CL also cleans up the old SerializerWritingObjectScope
class, both moving it to Serializer::WritingObjectScope and
allowing nesting of WritingObjectScopes with the correct
semantics.
Thanks to this, not only can we recur when under a WritingObjectScope
instead of lifting recursion outside of those scopes, but we can
also create artificial nodes for non-empty per-code object pools and
static call target tables instead of attributing their contents
as supposed elements of the Code object being written.
TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: Ib945c5afcd89b1458b8be3559b6eae24048aba2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194243
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Creates HasParent() as a predicate for Function objects with a non-null
parent function and makes IsLocalFunction() specific to local closures
(i.e. explicit closures with non-null parent functions).
Creates HasSavedArgumentsDescriptor() as a predicate to determine when
saved_args_desc() can be used, to avoid the caller having to do explicit
predicate checks for each dispatcher type that contains one.
Also simplifies Function::PrintName, creates different suffixes for a
SyncGenClosureMaker and its associateed SyncGenClosure, adds suffixes
for skipping more than one generated body when printing the parent name,
and changes ArgumentsDescriptor::PrintTo to match the compact syntax
Function::PrintName used for signifying the arguments descriptor for
certain dispatchers.
TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test
Cq-Include-Trybots: luci.dart.try:app-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,pkg-linux-release-try
Change-Id: I0ac1226d1ffe1d81743b5c6788da170d5a4010c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191560
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
* When looking for Code node owner simply always check for synthetic
owner (referenced through ':owner_' property) first. If it is present
then it means 'owner_' property is invalid anyway. 25fd0200ef changed
how WSRs are written into snapshot (instead of writing WSRs we are
simply writing SMI CIDs) which broke previous logic.
* When building ProgramInfoNode for a Class node accommodate for the
existence of classes which don't have 'library_' property (e.g. base
objects like void and dynamic). Additionally, adjust how these base
objects are written into the snapshot profile so that we preserve
their names.
* Tweak tests diff and diff-collapse tests to pass, they were failing
because prologue removal compiler change made some of the diffs so
tiny that they are ignored by threshold filtering.
* Add two more tests: one that verifies that tracings flags don't have
any impact on the snapshot size and one that checks we correct
attribute instructions size to the function node from which these
instructions originated. This last test is added in anticipation of
Code object removal to make sure that vm_snapshot_analysis continues
to work correctly.
* Adjust sorting rules for Code cluster to make it more stable between
slightly different programs to stabilize output of
--print-instructions-sizes-to (depends on the sorting algorithm used
in libc, the test was failing on Mac but not on Linux).
These fixes should unblock relanding of b6dc4dad4dFixes#44507Fixesflutter/flutter#76313
TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: Iee0221dd3a507cb4f36d530404693ebfab3b7bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185826
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Emphasize that the operation is going away,
and mark constructor as deprecated.
TEST= Refactoring+deprecation only, covered by existing tests.
Change-Id: I82aa044cd2cf7bf347b624371399f44bda8f4a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173261
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Code objects might be connected by static calls and these references
were not included into the profile. This lead to some objects being
unreachable from the root.
This CL also adds a test which computes dominators for all nodes
in the snapshot (this in turn verifies that there are no
unreachable nodes).
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I2af4107fdb7f875624192e892ce1cec78cbf0dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161709
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This CL addresses two problems, which only reveal themselves when
analysing snapshots produced when function dropping is enabled.
When tests for snapshot analysis were written functions were dropped
in PRODUCT build by default - by currently this functionality needs
to be enabled separately or is automatically enabled when DWARF stack
traces are enabled. This CL changes test suite to enable DWARF stack
traces.
* When constructing ProgramInfo from V8 snapshot profile we should
not assume that Function nodes have any fields outside of owner_,
because Function node might be artificial and thus have no real
fields except for owner link.
* When writing V8 snapshot profile we should take care not to call
CreateArtificalNodeIfNeeded inside TraceStartWritingObject scope,
because CreateArtificalNodeIfNeeded might itself call
TraceStartWritingObject and these calls don't nest, the second one
overwrites the first one.
R=sstrickl@google.com
Bug: b/167601345
Change-Id: I40879ee087c38992388776af58b81bbefd147631
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161703
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Exposing this functionality makes it possible to use this logic in Dart DevTools.
This CL also includes some renames that make the code more readable. When there are both `ProgramInfoNode`s and `CallGraphNode`s in scope, the name "node" is ambiguous.
Bug: https://github.com/dart-lang/sdk/issues/43169
Change-Id: Ic8ef04e10c48db011cd28e1786bee34223766e47
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160342
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Take into account that not all libraries are grouped into packages
avoid collapsing such libraries into the root node.
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I73a14a2498c0399073be432d1e22badf99eca3eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161167
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Some compiler changes introduce small fluctuation into the output sizes
which make the test too brittle. Ignore this fluctuation by introducing
sensitivity threshold.
Fixes https://github.com/dart-lang/sdk/issues/43030R=rmacnak@google.com
Fixed: 43030
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I411144db199d36f40b71739965a44802305970b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158386
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
dart:core contains a class Type and it can also contain objects which
are instances of this class. Previously we would try to put size
information for both under dart:core/Type bucket which caused issues.
To prevent the clash we now wrap snapshot node types in '<...>' before using
them as path components, so that the first case would remain dart:core/Type
but size of Type instances would be written into dart:core/<Type> bucket.
Fixes https://github.com/dart-lang/sdk/issues/42969
Fixed: 42969
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: Ie6c3400e90511507ff37b7ca037bd385dea1b11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157493
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Exposing this helper method will allow comparison between program info without using buildComparisonTreemap
Change-Id: Ib771801530dd34515ccecc4ec01e39cd4546e916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157080
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Support splitting paths that look like: `package:foo.bar.baz/src/foobar.dart` as well
as "normal" paths (`package:foo/bar/baz/src/foobar.dart`).
Change-Id: I7816b7d6fd34d786a735bf74e3ea2a2606c27af5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157023
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
We were getting the type error "type 'Future<Object>' is not a subtype of type 'Map<String, dynamic>'" because we weren't awaiting this future.
Change-Id: I1247151d5a7bcf688eb90f0188c783cbffc432fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156918
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
Do not include package nodes names into path when building treemap from
ProgramInfo. Library names already contain full package name.
Fixes#42907
Fixed: 42907
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I91c4fc73edb3b345dfcc485e418d50b2ec5f4fe7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156910
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>