Commit graph

10 commits

Author SHA1 Message Date
Devon Carew a3256e6b2f [pkg/vm_snapshot_analysis] switch to using package:lints
Change-Id: Ia36b1bf1127e0b78e0294422cff78338ef19ec26
TEST=this CL updates static analysis settings and address associated warnings
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204640
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-24 17:07:48 +00:00
Vyacheslav Egorov 458be23fa7 [vm_snapshot_analysis] Migrate to null-safety
Fixes https://github.com/dart-lang/sdk/issues/45683

TEST=pkg-*-try bots

Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: Ie10f313da9778d001f9c4fb618997e3b3c781dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195263
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-04-15 12:03:47 +00:00
Vyacheslav Egorov 4d182203ca [vm] Include static call references into V8 profile
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>
2020-09-08 12:11:34 +00:00
Kenzie Schmoll 42dfb9d304 Add generateCallGraphWithDominators method to generate a CallGraph from a precompiler trace.
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>
2020-09-02 16:24:42 +00:00
Vyacheslav Egorov 3471490bb2 [vm_snapshot_analysis] Fix CallGraph.collapse by package
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>
2020-09-01 21:35:21 +00:00
Kenzie Schmoll d9860c8b4f [vm_snapshot_analysis] remove unused import
Change-Id: I42f5144e4f657d39a34cf2b1a4906af745372153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155220
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
2020-07-21 15:44:47 +00:00
Martin Kustermann 06183779d7 [vm/compiler] Make the compiler use dyn:* selectors when calling getters
We already make the callsites use dyn:* selectors for normal method
calls as well as setters, this is doing the same thing for getters.

Once callsites use dyn:get:* various pieces in runtime need to be
adjusted to accomodate for that (e.g. NSM handling, etc).

A follow-up CL will then start actually generating dyn:* getters in
certain situations.

Issue https://github.com/dart-lang/sdk/issues/40876

Change-Id: If219603bc0b8eb119edd08b211a8897d21ec0fb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154320
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2020-07-15 12:38:04 +00:00
Kenzie Schmoll 4f55ba2639 [vm_snapshot_analysis] rearrange dart:io dep and move commands to bin
Change-Id: Ib22ae8d1ec3c4032c646915bad94361efef48a2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154360
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2020-07-14 23:09:18 +00:00
Kenzie Schmoll 70bbc663e2 Remove dart:io dep from utils.dart and add conditional imports for File
Change-Id: I92c00dc0a44fffda81aaec13a4598815b4148d32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154283
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
2020-07-13 23:19:19 +00:00
Vyacheslav Egorov 69ec1a9965 [vm/aot] Add machine readable precompiler trace
This CL adds --trace-precompiler-to option which generates a machine readable
precompiler trace (list of all compiled functions and their dependencies).

It also expands package:vm_snapshot_analysis with tools for reading and
analysing this trace.

For example snapshot_analysis explain dynamic-calls command allows
to list all dynamic calls sorted by their impact on the size of the AOT
snapshot.

Issue https://github.com/dart-lang/sdk/issues/41249

Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: Ie49143f4da375067991991e2ad20a41ec67bb1c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152851
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-03 09:29:10 +00:00