leakcanary icon indicating copy to clipboard operation
leakcanary copied to clipboard

Initial draft to dump a heap dump into Neo4j

Open pyricau opened this issue 2 years ago • 2 comments

Uses Neo4j embedded and dumps every object in the heap dump in a single transaction, without any edges yet.

Syntax:

shark-cli --hprof PATH_TO_HPROF neo4j

pyricau avatar Apr 22 '22 17:04 pyricau


match (roots: GcRoots) return roots
match (activity: Instance) -[:CLASS|SUPER*1..]-> (c:Class {className: "android.app.Activity"}) return activity
match (activity: Instance) -[:CLASS|SUPER*1..]-> (c:Class {className: "android.app.Activity"}) where "android.app.Activity.mDestroyed = true" in activity.fields return activity
match (roots: GcRoots) match (activity: Instance) -[:CLASS|SUPER*1..]->(c:Class {className: "android.app.Activity"}) where "android.app.Activity.mDestroyed = true" in activity.fields return shortestPath((roots)-[:ROOT|REF*]->(activity))

pyricau avatar Jun 17 '22 19:06 pyricau

nit: https://neo4j.com/docs/cypher-manual/current/styleguide/ ;)

fbiville avatar Jun 22 '22 13:06 fbiville

image

pyricau avatar Nov 08 '22 22:11 pyricau