Profile: simplify Memory in heap snapshot#60930
Conversation
73efe43 to
b177941
Compare
Memory in heap snapshotMemory in heap snapshot
7d38e0e to
2d7d91f
Compare
2d7d91f to
ff33b90
Compare
|
I took a closer look and it turns out I was wrong about this bug. This memory was being accounted for in the snapshot after all, but it was being put into secret "hidden" edges. This PR now moves those bytes from the "hidden" edge to the Re-requesting review given the major re-work. |
ff33b90 to
9c94069
Compare
Memory in heap snapshotMemory in heap snapshot
Memory in heap snapshotMemory in heap snapshot
Memory in heap snapshotMemory representation in heap snapshot
Memory representation in heap snapshotMemory in heap snapshot
Memory in heap snapshotMemory representation in heap snapshot
Memory representation in heap snapshotMemory in heap snapshot
If I recall correctly, I might have suggested this in case the memory buffer wrapped is aliased between multiple different objects. |
9c94069 to
ca075d3
Compare
| // Memory's that are string-owned or point to foreign memory have | ||
| // explicit snapshot edges to pointee data. Otherwise the array | ||
| // contents are treated as part of the Memory itself. | ||
| self_size += jl_genericmemory_nbytes(mem); |
ca075d3 to
5b5c445
Compare
This makes `Memory` more intuitive to interpret in heap snapshots.
5b5c445 to
c4a4c28
Compare
|
Why do the indices in the screenshot appear to be random numbers? |
It's being sorted and it's a very large array, so those are the largest elements |
|
Ah, of course. |
`Memory` somewhat awkwardly encodes the size of its data in an "internal" edge in the heap snapshot. This is reasonable for String-owned Memory's, but it is pointlessly complex / confusing for GC-managed and inline-allocated Memory data arrays. This changes those bytes to be directly attributed to the `Memory` itself instead. Also fix a bug that caused all Memory indices to be `[0]` in the heap snapshot. (cherry picked from commit 7f14dc3)
Memorysomewhat awkwardly encodes the size of its data in an "internal" edge in the heap snapshot.This is reasonable for String-owned Memory's, but it is pointlessly complex / confusing for GC-managed and inline-allocated Memory data arrays. This changes those bytes to be directly attributed to the
Memoryitself instead.Also fix a bug that caused all Memory indices to be
[0]in the heap snapshot.Before:

After:
