코드삽입을 이용한 자바프로그램의 힙 사용정보 분석기법

A Technique to Analyze Heap Usage of Java Programs Using Code Inserting

  • 주성용 (동아대학교 컴퓨터공학과) ;
  • 조장우 (동아대학교 컴퓨터공학과)
  • 발행 : 2007.05.31

초록

자바에서는 가상기계와 프로파일러의 통신을 목적으로 JVM TI 같은 프로파일러 인터페이스를 제공한다. 그러나 자바 가상기계 구현명세는 프로파일러 인터페이스 구현을 요구하지 않는다. 따라서 프로파일러 인터페이스를 제공하지 않는 자바 가상기계에서는 JVM TI를 사용하는 프로파일러는 이용할 수 없다. 이러한 문제를 해결하기 위해서 코드 삽입 기법을 이용해서 프로파일러 인터페이스를 사용하지 않고 힙 사용정보를 분석하는 기법을 제안한다. 제안한 방법을 검증하기 위해서 코드 삽입기를 구현하였다. 실험은 공개되고 자주 사용되는 자바 응용 프로그램을 대상으로 하였고, 실험결과는 대상 프로그램에서 생성된 객체의 수와 최대 할당된 객체의 수 그리고 객체의 사용형태를 보여준다.

In the Java a profiler interface such as JVM TI is provided for communication between a Java virtual machine and a profiler. The JVM TI specification, however does not require an implementation of a profiler interface. Consequently the JVM without an implementation of a profiler interface cannot use a profiler with the JVM TI. For solving the problem, we propose a technique which analyzes heap usage without a profiler interface. This technique inserts codes to extract heap usage into source files in the Java. We implemented a code inserter to verify the proposed technique. We experimented with Java programs that are frequently used and opened. the experimental result presents the number of created objects. the maximum number of allocated objects, and the used pattern of the objects.

키워드