Commit Graph

17 Commits

Author SHA1 Message Date
Diogenes Nunez ced696af69 Calculates retaining paths through user fields and ignores VM objects
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 .
2017-07-27 13:24:48 -07:00
Ryan Macnak 2abda1fdd7 Observatory:
- Add M.Isolate.collectAllGarbage.
 - Add 'count' parameter to ObjectRepository.get.
 - Set hover text in heap map so it is usable when it doesn't fit on one page.

R=asiva@google.com, devoncarew@google.com

Review-Url: https://codereview.chromium.org/2914283002 .
2017-06-01 14:26:46 -07:00
Ryan Macnak 0cf02040f8 Add a version of heap snapshots that use only fields and stack frames as roots and only include instances.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2502283003 .
2016-11-28 16:00:06 -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 6eaa45058c Perform a full GC by default when requesting a heap snapshot.
Prevents the snapshot from include objects that are only weakly
reachable.

BUG=http://dartbug.com/25994
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1811713002 .
2016-03-17 11:11:38 -07:00
Ryan Macnak 75cd019a9c Add RPC and UI for reachable size of an object / all instances of a class.
BUG=http://dartbug.com/24945
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1453983002 .
2015-11-20 10:02:16 -08:00
Srdjan Mitrovic b9426418d8 Get rid of deprecated methods accessing mutator_thread_ instead of current thread
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/1410643008 .
2015-10-20 10:26:08 -07:00
Ryan Macnak bad1ccb2f7 Heap snapshot visualizations:
- 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
2015-05-26 14:46:28 -07:00
koda@google.com 96576ad59e vmservice: basic object graph serialization.
Sends a service event with binary data encoding the basic shape of the object graph; for each object, its:
* size
* class id
* neighbors (excluding smis and nulls)

This is a minimal implementation to make the first unit test pass (TDD).

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//773573005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42070 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 19:33:09 +00:00
rmacnak@google.com bd4263bff2 Incoming references service request and UI.
Misses references from stack frames and embedder handles.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//483103003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39534 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 22:31:45 +00:00
koda@google.com 655b16b2d6 Include parent field/list index in retaining path.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//350403005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37956 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 20:37:56 +00:00
koda@google.com 61bde80790 Retaining path in Observatory.
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
2014-05-22 17:31:47 +00:00
koda@google.com b9c9bb5dfe ObjectGraph::RetainingPath
Adds a utility method to find a retaining path and unit test.
Next step is to expose it via VM service and Observatory.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//286203015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36381 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-20 20:38:02 +00:00
koda@google.com 65635f2516 Make ObjectGraph a StackResource.
R=iposva@google.com
TBR=iposva@google.com

Review URL: https://codereview.chromium.org//261753012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35775 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 22:20:09 +00:00
koda@google.com 1c3a41ad13 Retained size for instance in Observatory.
Add objects/$id/retained message that uses ObjectGraph to compute retained size for an instance.
In the instance view, the user can request the size to be calculated.

R=turnidge@google.com

Review URL: https://codereview.chromium.org//263803009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35757 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 19:41:12 +00:00
koda@google.com f9b6613cf4 Object graph visitor: general depth-first search.
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
2014-05-02 21:38:30 +00:00