- Introduce a slimmed down version of thread.h, which just depends on the
Zone and StackResource.
- Introduce a layering check that would prevent the coupling in the future.
This is the first step towards decoupling compiler from runtime.
There are multiple reasons to introduce the decoupling but the main
reason currently is to introduce a controlled surface through which
compiler reaches into runtime to catch any places where runtime word size
might influence the compiler and then enable building compiler that
targets 32-bit runtime but is embedded into a 64-bit runtime.
Issue https://github.com/dart-lang/sdk/issues/31709
Change-Id: Id63ebbaddca55dd097298e51c90d957a73fa476e
Reviewed-on: https://dart-review.googlesource.com/c/87182
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Previously there were places in the code where an API accepted a
`bool validate_frames` and call sites passed an enum value (which
implicitly got converted to a bool).
By changing the APIs to require an enum, the compiler will tell us if a
caller doesn't pass one.
Change-Id: I29fcd0b018e6cdd7e00b5bb03e83b9636d1345d4
Reviewed-on: https://dart-review.googlesource.com/57823
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
An object A is said to be owned by object B if all direct references to A come from B. In particular, an object that holds unshared lists and maps will own the heap size of those lists and maps, as well as any unshared elements. We hope a table of owned sizes will be more useful than a table of shallow sizes, since the latter typically says the heap is mostly lists.
R=cbernaschina@google.com
Review-Url: https://codereview.chromium.org/3009743003 .
before reporting a path that goes through VM objects.
When a user attempts to check the retaining path of an instance of a
class, previously Observatory would report the first path found, even
if the path contains multiple VM objects.
Now, Observatory will attempt to find a path through the user fields and
ignores all VM objects aside from said fields. If that fails, it
defaults to the original algorithm.
BUG=
R=asiva@google.com, cbernaschina@google.com, rmacnak@google.com
Review-Url: https://codereview.chromium.org/2990643002 .
User data in may be reachable only through a closure's environment, represented as a Context object. Note we still don't consider Functions to be user objects here, and so avoid blaming the size of compiled code against any user object.
R=cbernaschina@google.com
Review-Url: https://codereview.chromium.org/2947673002 .
deprecated isolate based API.)
- Update all code impacted by this change. E.g. DARTSCOPE
- TEST_CASE now passes the current thread as a parameter to the unit test.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1310463005 .
- Don't answer retaining paths that go through ICData.
- Associate edge labels with the referer instead of the referent.
- Give edge labels for VM classes (offsets only).
- Make is possible to distinguish closures and functions from their refs.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1246073005 .
Safepointing is not yet implemented, so helper threads can only allocate when growth control is off and no Dart code is running. But extend unit test to ensure this code path remains exercised as more functionality is added.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1250463004 .
Address issue 21620, by sharing code to wait for concurrent sweeper to finish, and freeing the caller from this responsibility. The new public interface is Heap::Iterate*, and the old Heap::Visit* are made private, for GC use only.
(Eventually, we'll want to support iterating over the heap while concurrent GC runs, but that will have to wait until all header accesss is synchronized.)
BUG=21620
R=asiva@google.com
Review URL: https://codereview.chromium.org//1212943010 .
- Dominator tree with retained sizes
- Merge nodes by class
- Split snapshot into chunks so the browser's websockets implementation can handle them.
- Use TypedData indexed by node ids instead of lists of objects and a higher time complexity but more memory efficient algorithm to find the dominator tree (reduces memory usage to ~2X the size of the heap being analyzed from >10X).
R=johnmccutchan@google.com, koda@google.com
Review URL: https://codereview.chromium.org//1124153006
Add retaining_path instance command to VM service, exposed in the Observatory
with a [find] eval-link in instance view. By default shows up to 10 elements,
possibly followed by [find more] which doubles the number of elements shown.
Change RetainingPath to include the object itself.
Always include an id in Object::PrintJSONImpl, to avoid instance-ref crashing on
internal objects.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//292663012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36516 260f80e4-7a28-3924-810f-c04153c831b5
Features:
* Performs a pre-order, depth-first search.
* Allows the visitor to direct whether to
proceed, backtrack, or abort.
* Provides a complete chain of parents to the root.
(unlike the GC marking stack).
The plan is to use this in the observatory, e.g.:
* inspect a path from the isolate roots to a particular object, or
* determine how much memory is kept alive by some particular object or class of objects.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//266643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35711 260f80e4-7a28-3924-810f-c04153c831b5