dump

dump 已加载类的 bytecode 到特定目录

参数说明

参数名称 参数说明
class-pattern 类名表达式匹配
[c:] 类所属 ClassLoader 的 hashcode
[E] 开启正则表达式匹配,默认为通配符匹配

使用参考

  1. $ dump -E org\.apache\.commons\.lang\.StringUtils
  2. HASHCODE CLASSLOADER LOCATION
  3. 29505d69 +-tddl-client's ModuleClassLoader /Users/zhuyong/middleware/taobao-tomcat/output/build/bin/classdump/com.taobao.pandora
  4. .service.loader.ModuleClassLoader-29505d69/org.apache.commons.lang.StringUtils.class
  5. 6e51ad67 +-java.net.URLClassLoader@6e51ad67 /Users/zhuyong/middleware/taobao-tomcat/output/build/bin/classdump/java.net.URLClassL
  6. +-sun.misc.Launcher$AppClassLoader@6951a712 oader-6e51ad67/org.apache.commons.lang.StringUtils.class
  7. +-sun.misc.Launcher$ExtClassLoader@6fafc4c2
  8. 2bdd9114 +-pandora-qos-service's ModuleClassLoader /Users/zhuyong/middleware/taobao-tomcat/output/build/bin/classdump/com.taobao.pandora
  9. .service.loader.ModuleClassLoader-2bdd9114/org.apache.commons.lang.StringUtils.class
  10. 544dc9ba +-com.taobao.tomcat.container.context.loader.AliWebappClassLoader /Users/zhuyong/middleware/taobao-tomcat/output/build/bin/classdump/com.taobao.tomcat.
  11. +-org.apache.catalina.loader.StandardClassLoader@2302e984 container.context.loader.AliWebappClassLoader-544dc9ba/org.apache.commons.lang.String
  12. +-sun.misc.Launcher$AppClassLoader@6951a712 Utils.class
  13. +-sun.misc.Launcher$ExtClassLoader@6fafc4c2
  14. 22880c2b +-java.net.URLClassLoader@22880c2b /Users/zhuyong/middleware/taobao-tomcat/output/build/bin/classdump/java.net.URLClassL
  15. +-sun.misc.Launcher$AppClassLoader@6951a712 oader-22880c2b/org.apache.commons.lang.StringUtils.class
  16. +-sun.misc.Launcher$ExtClassLoader@6fafc4c2
  17. Affect(row-cnt:5) cost in 156 ms.
  18. $ dump -E org\.apache\.commons\.lang\.StringUtils -c 22880c2b
  19. HASHCODE CLASSLOADER LOCATION
  20. 22880c2b +-java.net.URLClassLoader@22880c2b /Users/zhuyong/middleware/taobao-tomcat/output/build/bin/classdump/java.net.URLClassLoader-22880c2b/org
  21. +-sun.misc.Launcher$AppClassLoader@6951a712 .apache.commons.lang.StringUtils.class
  22. +-sun.misc.Launcher$ExtClassLoader@6fafc4c2
  23. Affect(row-cnt:1) cost in 67 ms.

原文: https://alibaba.github.io/arthas/dump.html