Skip to content

Instantly share code, notes, and snippets.

@ChinaXing
Created July 1, 2019 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChinaXing/a0834b1348fd5baf45060ea6fe809681 to your computer and use it in GitHub Desktop.
Save ChinaXing/a0834b1348fd5baf45060ea6fe809681 to your computer and use it in GitHub Desktop.
-- 分析 unreachable对象 https://wiki.eclipse.org/MemoryAnalyzer/FAQ#How_to_analyse_unreachable_objects
-consoleLog -application org.eclipse.mat.api.parse -keep_unreachable_objects <heapDump.bin>
-- 查询 非unreachable的对象,GCRootInfo null 表名此对象非GcRoot,MAT keepunreachable 对象时,unreachable对象的gcroot是自身
SELECT * FROM byte[] s WHERE ((s.@length >= 2000000) and (s.@GCRootInfo = null))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment