Papers/Static&Dynamic Analysis

JProbe에 의한 Dynamic Analysis 활용

tomato13 2009. 5. 10. 17:15

JProbe이라는 도구를 간단하게 평가해보고 활용방안에 대해서 소개한다.

http://www.quest.com/jprobe/


도구는 Coverage, Performance 그리고 Memory에 대한 Profiling기능을 제공한다.


1. Coverage

기존의 많은 도구들도 제공하기에 크게 새로운 것은 없을 듯 하다. 다만 실시간으로 Coverage 데이타의 추이가 보여지는 것이 기존에 내가 본 도구의 결과와는 다른 듯 하였다.


2. Performance/Memory

내가 관심있게 본 것은 도구보다는 Users' manual이다. 사실 보여주는 view는 여느 도구와 큰 차이는 없었다. 그런데 이러한 view들을 어떻게 활용할 수 있는가에 대해서 manual에 자세하게 소개가 되어 있었다. 아래는 공감하는 내용에 대해서 인용을 한 것이다.


If the real hotspot is from someone else’s code, you still need to focus on your own calling method. Try to reduce calls to an expensive method, or try to find more efficient ways to call it.

(hotspot을 개선하는 작업은 두가지로 진행될 수 있을 듯 하다. 첫째는 해당 부분을 직접 개선하는 것이다. 다른 하나는 hotspot에 대한 referencing을 줄이는 것이다.)


Sorting on Number of Exception Exits can help to identify performance hot spots caused by frequent exception generation. It may also highlight unexpected exception processing which could indicate an issue in your application code.

(Exception handling이 예상치 못하게 빈번하게 발생하여 성능을 저하시킬 수 있다.)


Steep spikes in the Memory Pools chart represent short-lived objects being allocated and garbage collected. Frequent garbage collections may cause your program to run more slowly.

(GC가 빈번하게 동작한다면 오히려 성능을 저하시킬 수 있다.)


Heap pools contain things normally found in the Java heap, like Java objects. Non-heap pools normally contain things the JVM uses internally, such as the compiled

representation of method code or class information.

(Heap 영역만이 아닌 Non-heap에 대한 영역도 보여준다.)


Consider switching to CPU time to avoid including time spent in program pauses or while waiting for I/O. For more information,

(Elapse time과 CPU time을 optional하게 선택할 수 있다. 후자의 경우 I/O 환경등 program 외적 resource에 따른 시간비용을 제외시킬 수 있다. 즉, 순수하게 software상에서만의 시간을 계산할 수 있다.)


Loitering object에 대한 정보를 제공한다. 이는 사용하지는 않지만 heap에 잔류하고 있는 object를 가리킨다. 정말 필요가 없는 object인데 어디선가 계속 referencing하고 있기 때문일 수도 있는데 이 경우에는 object가 free될 수 있도록 조치를 취하는 것이 좋을 것이다.


Visualizing기능이 좋아 보였다. 첨부한 그림과 같이 시각적으로 hotspot 혹은 hit rate가 높은 지역을 쉽게 확인할 수가 있다. list box의 선택을 통해서 time, hit rate등을 지정할 수 있다.

Pic.jpg


Pic.jpg
0.07MB