`
bkhh
  • 浏览: 13540 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

Yourkit Introduce

 
阅读更多

Profiling your application (Yourkit)

 

Install Yourkit

Linux

./yjp.sh

Windows

yjp-12.0.5.exe

 

Profile your application by Yourkit

Plugin IDE

 

Manual config

-agentpath:<profiler directory>\bin\win64(win32)\yjpagent.dll

-agentpath:<profiler directory>/bin/linux-x86-64(linux-x86-32)/libyjpagent.so

default port:10001

-agentpath:<profiler directory>\bin\win64(win32)\yjpagent.dll=port=1090

more options: http://www.yourkit.com/docs/java/help/startup_options.jsp

 

Attach in runtime

a. Attach for local connect purpose

b. Attach for remote connet purpose

(1) The attach mode is only supported for Sun Java (HotSpot) and JRockit

(2) Attach may fail due to insufficient access rights

(3) Requires kernel 2.6

...

not suggestion using attach mode

 

Before profiling

JVM memory structure

 

Shallow size/Retained size

Shallow heap is the memory consumed by one object. An object needs 32 or 64 bits (depending on the OS architecture) per reference, 4 bytes per Integer, 8 bytes per Long, etc. Depending on the heap dump format the size may be adjusted (e.g. aligned to 8, etc...) to model better the real consumption of the VM.

 

Retained set of X is the set of objects which would be removed by GC when X is garbage collected.

 

Retained heap of X is the sum of shallow sizes of all objects in the retained set of X, i.e. memory kept alive by X.

 

Generally speaking, shallow heap of an object is its size in the heap and retained size of the same object is the amount of heap memory that will be freed when the object is garbage collected.

 

GC root

A garbage collection root is an object that is accessible from outside the heap. The following reasons make an object a GC root:

 

System Class

Class loaded by bootstrap/system class loader. For example, everything from the rt.jar like java.util.* .

 

JNI Local

Local variable in native code, such as user defined JNI code or JVM internal code.

 

JNI Global

Global variable in native code, such as user defined JNI code or JVM internal code.

 

Thread Block

Object referred to from a currently active thread block.

 

Thread

A started, but not stopped, thread.

 

Busy Monitor

Everything that has called wait() or notify() or that is synchronized. For example, by calling synchronized(Object) or by entering a synchronized method. Static method means class, non-static method means object.

 

Java Local

Local variable. For example, input parameters or locally created objects of methods that are still in the stack of a thread.

 

Native Stack

In or out parameters in native code, such as user defined JNI code or JVM internal code. This is often the case as many methods have native parts and the objects handled as method parameters become GC roots. For example, parameters used for file/network I/O methods or reflection.

 

Finalizer

An object which is in a queue awaiting its finalizer to be run.

 

Unfinalized

An object which has a finalize method, but has not been finalized and is not yet on the finalizer queue.

 

Unreachable

An object which is unreachable from any other root, but has been marked as a root by MAT to retain objects which otherwise would not be included in the analysis.

 

Unknown

An object of unknown root type. Some dumps, such as IBM Portable Heap Dump files, do not have root information. For these dumps the MAT parser marks objects which are have no inbound references or are unreachable from any other root as roots of this type. This ensures that MAT retains all the objects in the dump.

 

CPU time/Work time

 

CPU time is the time on scheduler

Work time is the total time from request in to response out

 

Thread status

NEW: The thread is created but has not been processed yet.

RUNNABLE: The thread is occupying the CPU and processing a task. (It may be in WAITING status due to the OS's resource distribution.)

BLOCKED: The thread is waiting for a different thread to release its lock in order to get the monitor lock.

WAITING: The thread is waiting by using a wait, join or park method.

TIMED_WAITING: The thread is waiting by using a sleep, wait, join or park method. (The difference from WAITING is that the maximum waiting time is specified by the method parameter, and WAITING can be relieved by time as well as external changes.)

 

5 CPU profile

# Telemetry

# Sampling

# Tracking

To begin obtaining profiling results, start CPU measuring when your application requires it.

You can choose either of two available measurement modes: sampling or tracing.

 
Sampling
Tracing
Measured time accuracy
High for long running methods, low for short running methods
Low to high, depending on profiled application and settings
Invocation counts
Not available
Available
Overhead
Negligible unless J2EE high-level profiling is enabled in the settings
Low to high, depending on profiled application and settings

 

# Filter methods

 

6 Thread monitor

# Telemetry

# Monitor profile

 

 

7 Memory profile

# Telemetry

The "Memory" tab shows live memory usage statistics:

 

The bottom table on "Memory" tab provides a class instance count statistics - a quick overview of current heap state:

# Record by thread/method/classloader/GC root (allocation)

# Compare two snapshot

# Object generations

# Support of HPROF format snapshots

 

8 Exception profile

# Show where the exception throws

 

Conclusion

# Out of memory occurd

# Memory leak

# Timeout

# Deadlock

# Also anytime when you want to refine your application

分享到:
评论

相关推荐

    yourkit9.5绿色版本

    YourKit Java Profiler 9.5 绿色版本是一款强大的性能分析工具,专为Java应用程序设计,用于诊断和优化性能问题。YourKit 提供了一种直观的用户界面,使得开发者和系统管理员能够深入理解应用程序的运行时行为,找出...

    yourkit v12.0.5 keygen

    yourkit v12.05版本使用说明: 1.用winrar打开lib目录下的yjp.jar 2.进入目录yjp.jar\com\yourkit\g 3.将k.class替换到同名文件 使用下面命令生成注册码: java -jar yourkit_keygen_v1205.jar 根据提示输入注册...

    yourkit java profiler 2015 注册码

    yourkit java profiler 2015 注册码 实测可进行正常安装 服务器进程内存分析不可多得的工具

    YourKit get start 资料

    【YourKit概述】 YourKit是一款强大的Java和.NET性能分析工具,专为开发人员和运维团队设计,用于深入分析应用程序的性能瓶颈,内存泄漏以及线程问题。它提供了丰富的功能,如CPU和内存profiling,线程分析,实时...

    YourKit Java Profiler 2017 破解版本

    YourKit Java Profiler 2017 破解版本,仅供学习交流,如需商用,请到官方网站下载正版软件

    YourKit 9.5.2

    YourKit 9.5.2安装包 YourKit 9.5.2安装包

    yourkit破解版

    YourKit Java Profiler,注册机,破解: 使用方法: 用bat打开注册机,先点击patch按钮打补丁,选择yourkit安装目录下的/lib/yjp.jar然后确定,打补丁后生成注册码就可以了

    YourKit Java Profiler 2020.09 build 410

    【YourKit Java Profiler 2020.09 build 410】是一款专业的Java性能分析工具,专为开发者和系统管理员设计,用于优化Java应用程序的性能和内存使用情况。这款工具以其强大的功能和易用性在IT行业内备受推崇。 在...

    yourkit的使用技术

    YourKit是一款功能强大的Java性能分析工具,主要用于监测和优化Java应用程序的性能。通过深入解析给定文件中的描述和部分内文,我们可以提炼出YourKit在IT行业中的关键使用技术和概念,帮助开发人员理解和掌握如何...

    yourkit v11 v12 keygen

    yourkit v11版本使用说明: 1.用winrar打开lib目录下的yjp.jar 2.进入目录yjp.jar\com\yourkit\f 3.将k.class替换到同名文件 yourkit v12版本使用说明: 1.用winrar打开lib目录下的yjp.jar 2.进入目录yjp.jar\...

    YourKit 11.0

    【YourKit 11.0】是一款强大的Java和.NET性能分析工具,专为开发者和运维人员设计,旨在帮助他们深入洞察应用程序的性能状况,找出瓶颈并优化代码。YourKit提供了全面的功能,包括CPU和内存剖析、线程分析、数据库...

    YourKit Java Profiler 2019.01 最新破解版 build 111

    最新YourKit Java Profiler 2019.01 最新破解版 build 111 绿色安装。 欢迎大家试用。 免责声明:这只是供个人开发爱好者使用,如用于商业或公司目的,请购买正版,否则由此产生的后果,本人概不负责。 毕竟这只是...

    yourkit 2020.9-b416

    yourkit 2020.9-b416

    YourKit Java Profiler 2017 破解版

    YourKit Java Profiler 2017 破解版YourKit Java Profiler 2017 破解版YourKit Java Profiler 2017 破解版YourKit Java Profiler 2017 破解版

    yourkit_11,12keygen破解文件

    yourkit-11、12破解文件,可以完美破解yourkit,yourkit_11,12keygen破解文件

    YourKit jProfiler eclipse3.5插件

    YourKit jProfiler eclipse3.5插件

    yourkit V11.0.9 免费版

    YourKit是一款广受开发者欢迎的Java性能分析工具,主要用于深入分析和优化JVM(Java虚拟机)上的应用程序。YourKit V11.0.9免费版提供了强大的功能,帮助开发者定位并解决性能瓶颈,提高应用的运行效率。下面将详细...

    YourKit Java Profiler 2019.08 build 141

    YourKit Java Profiler 2019.08 build 141 是一款强大的性能分析工具,专为Java应用程序设计,旨在帮助开发者深入洞察代码执行的效率和内存使用情况。这款工具提供了丰富的功能,包括CPU和内存分析,线程监控,...

    yourkit java profiler for unix

    YourKit Java Profiler是一款强大的性能分析工具,专为Unix操作系统设计,用于监控和优化Java应用程序。它提供了详尽的内存和CPU使用情况分析,帮助开发者深入理解项目的性能瓶颈,从而提高应用的运行效率。 在内存...

Global site tag (gtag.js) - Google Analytics