heap_graph_tracker: Native size in flamegraph
Since r.android.com/194395971, trace_processor understands the native
size for certain objects (if the trace is from an Android T+ device).
This commit displays the native size of those objects in the flamegraph,
as an extra child node.
Bug: 194395971
Change-Id: I072feab99ee2b8ba04b2c0b215b46c8ee3e0dbf2
diff --git a/docs/data-sources/java-heap-profiler.md b/docs/data-sources/java-heap-profiler.md
index f03977e..1187b7a 100644
--- a/docs/data-sources/java-heap-profiler.md
+++ b/docs/data-sources/java-heap-profiler.md
@@ -21,6 +21,10 @@

+The native size of certain objects is represented as an extra child node in the
+flamegraph, prefixed with "[native]". The extra node counts as an extra object.
+This is available only on Android T+.
+
## SQL
Information about the Java Heap is written to the following tables:
@@ -29,6 +33,9 @@
* [`heap_graph_object`](/docs/analysis/sql-tables.autogen#heap_graph_object)
* [`heap_graph_reference`](/docs/analysis/sql-tables.autogen#heap_graph_reference)
+`native_size` (available only on Android T+) is extracted from the related
+`libcore.util.NativeAllocationRegistry` and is not included in `self_size`.
+
For instance, to get the bytes used by class name, run the following query.
As-is this query will often return un-actionable information, as most of the
bytes in the Java heap end up being primitive arrays or strings.