Memory Profilers

  Heap Viewer, Memory Monitor, and Allocation Tracker are complementary tools that visualize the memory your app uses.

  1. Use the Memory Monitor Tool to find out whether undesirable garbage collection (GC) event patterns might be causing your performance problems.

    Memory Monitor Tool 可分析出哪里有内存问题。
  2. Run Heap Viewer to identify object types that get or stay allocated unexpectedely or unecessarily.
    Heap Viewer 标识出哪个对象是不必要的分配。
  3. Use Allocation Tracker to identify where in your code the problem might be.
    Allocation Tracker 定位问题代码

2.Memory Monitor

  • Shows available and used memory as they both change over time for your app in a graph, with dips indicating Garbage Collection (GC) events.
  • Provides a quick way to test whether app slowness might be related to excessive GC events.

    可测试是否由于过多的GC导致应用变慢。
  • Provides a quick way to see whether app crashes might be related to running out of memory.
    检查是否由于内存不足导致应用崩溃。
  • Runs live on your application and updates about once a second.
  • Helps quickly identify the potential of memory leaks.
    标识潜在的内存泄漏。
  • Helps identify GC patterns for your application and determine whether they are healthy and what you expect.
    标识GC运行是否健康。
  • Is easy to use, and it is easy to interpret what you see.
  • However, Memory Monitor does not tell you which objects are the cause of your problems, or where in your code it might be.
    它的缺点是并不能指出是哪个对象有问题,哪句代码有问题。

    

      Figure 1. Memory Monitor.

3.Heap Viewer

  • Shows snapshots of a number of objects allocated by type.
  • Samples data every time a garbage collection event occurs naturally or triggered by you.
    采集每次自动或手动GC的对象。
  • Helps identify which object types might be involved in memory leaks.
    标识出哪些对象可能与内存泄漏有关。
  • However, you have to look for changes over time yourself by tracking what's happening in the graph.

    

          Figure 2. Heap Viewer.

4.Allocation Tracker

  • Shows when and where your code allocates object types, their size, allocating thread, and stack traces.

    记录内存分配信息。
  • Helps recognize memory churn through recurring allocation/deallocation patterns.
    识别重复无效的内存分配。
  • Can be used in combination with Heap Viewer to track down memory leaks. For example, if you see a bitmap object resident on the heap, you can find its allocation location with Allocation Tracker.
    帮助Heap Viewer, Memory Monitor 分析内存泄漏。
  • However, it takes time and experience to learn to interpret the output from this tool.
     
        Figure 3. Allocation Tracker.
 
 
 

最新文章

  1. [原] KVM 虚拟化原理探究 —— 目录
  2. 谈谈我的微软特约稿:《SQL Server 2014 新特性:IO资源调控》
  3. oracle--函数--bai
  4. ORACLE10g创建表空间,角色与授权
  5. C# 溢出检查
  6. java.lang.ClassNotFoundException: Didn't find class "*****(转载)
  7. css中的字体及文本相关属性
  8. java2集合框架的一些个人分析和理解
  9. xcode duplicate symbol _GAD_MD5 解决方法
  10. 【转载】 stm32之PWM
  11. how to select checkbox on cli environment?
  12. Object冷知识
  13. Android中竖线随内容高度变化而变化的问题和解决办法
  14. ZJOI2019二试游记
  15. C++获取当前执行程序文件所在的全路径
  16. Idea解决打开大文件消耗CPU问题
  17. 分布式计算开源框架Hadoop入门实践
  18. ArcGIS案例学习笔记3_1
  19. 【c++】构造函数初始化列表中成员初始化的次序性
  20. window下pip install Scrapy报错解决方案

热门文章

  1. Codeforces908G. New Year and Original Order
  2. ubuntu忘记root密码的解决办法
  3. 选择器的使用(nth-of-type和nth-last-of-type选择器)
  4. Servlet的Cookies处理
  5. springmvc @ResponseBody 乱码
  6. mybatis xml标签,批量插入
  7. laravel 实时facade
  8. Ubuntu14.04 忘记rootpassword的解决方法
  9. formData 对象
  10. MySQL系列:innodb源代码分析之内存管理