Improve accounting of native roots in hprof

Native roots from VisitReferences are not real roots, they are
actually references held live by the object. Instead of
reporting these as roots in hprof, report them as objects in a
runtimeInternalObjects field containing an object array.

Also added runtimeInternalObjects to dex caches.

Changed non-app image and zygote space objects to be roots since
this is how the GC treats them.

These changes make it easier to debug class unloading since you
can more easily see the path to root keeping a dex cache or
classloader live.

Bug: 36457259
Bug: 22720414
Test: test/run-test --host 130
Test: take hprof dump and look at a class loader

Change-Id: I089b2aed6831043160f0657a46cf71087d1cdbb6
1 file changed