DOI QR코드

DOI QR Code

Virtual Machine Code Optimization using Profiling Data

프로파일링 데이터를 이용한 가상기계 코드 최적화

  • Published : 2007.06.30

Abstract

VM(Virtual Machine) can be considered as a software processor which interprets the machine code. Also, it is considered as a conceptional computer that consists of logical system configuration. But, the execution speed of VM system is much slower than that of a real processor system. So, it is very important to optimize the code for virtual machine to enhance the execution time. Especially the optimizer for a virtual machine code on embedded devices requires the highly efficient performance to the ordinary optimizer in the respect to the optimized ratio about cost. Fundamentally, functions and basic blocks which influence the execution time of virtual machine is found, and then an optimization for them nay get the high efficiency. In this paper, we designed and implemented the optimizer for the virtual(or abstract) machine code(VMC) using profiling. Firstly, we defined the profiling information which is necessary to the optimization of VMC. The information can be obtained from dynamically executing the machine code. And we implemented VMC optimizer using the profiling information. In our implementation, the VMC is SIL(Standard Intermediate Language) that is an intermediate code of EVM(Embedded Virtual Machine). Also, we tried a benchmark test for the VMC optimizer and obtained reasonable results.

가상기계(Virtual Machine)는 소프트웨어로 제작되어 논리적인 시스템 구성을 갖는 컴퓨터이기 때문에 그 수행 속도와 필요 저장 공간 측면에서 성능이 떨어질 수밖에 없다. 이러한 환경에서의 가상기계 코드 최적화는 실행 성능을 향상시킬 수 있기에 중요하다. 특별히 임베디드 장치(Embedded Device)에서 작동하는 가상기계 환경에서의 최적화는 기존의 최적화에 비해 수행 비용 대비 효과에서 높은 효율을 요구한다. 이에 따라 프로파일링을 통하여 성능에 크게 영향을 주는 함수 또는 기본 블록(Basic Block)을 찾아 최적화하는 것이 효과적이다. 본 논문에서는 프로파일링을 이용한 가상기계 코드 최적화기를 설계하고 구현하였다. 먼저, 가상기계 코드 최적화를 위해 코드를 실행하여 얻을 수 있는 동적 정보인 프로파일링 데이터(Profiling Data)를 정의하였고, 프로파일링 정보를 이용한 가상기계 코드 최적기를 구현하였다. 또한, 구현과 실험에 있어서 가상기계 코드는 EVM(Embedded Virtual Machine)의 중간 언어인 SIL(Standard Intermediate Language)를 사용하였고, 구현된 최적화기에 대한 실험을 통해 최적화기의 효과를 확인하였다.

Keywords

References

  1. Tim Liajndholm, Frank Yellin, 'The Java Virtual Machine Specification', 2nd Ed., Addison Wesley, 1999
  2. 'MSIL Instruction Set Specification-Version 1.9 Final', Microsoft Corporation, 2000.10
  3. 남동근, 윤성림, 오세만 '가상기계를 위한 어셈블리 언어', 정보처리학회 학술 발표 논문집, 제11권, 제9호, pp.519-522, 2004.3
  4. D. Sugalsk, Perl.org sites, www.parrotcode.org
  5. 오세만, 이양선, 고광문, '임베디드 시스템을 위한 가상기계의 설계 및 구현', 멀티미디어학회 논문지, 제8권, 9호, pp.1282-1291, 2005.8
  6. Kris Kaspersky , 'Code Optimization: Effective Memory Usage', A-List Publishing, 2003.9
  7. 오세만, 컴파일러 입문 개정판, 정익사, 2005
  8. V. Bala, E. Duesterwald, and S. Banerjia, 'Dynamo: A Transparent Dynamic Optimization System,' in PLDI'00, pp.1 - 12, ACM Press, 2000 https://doi.org/10.1145/349299.349303
  9. Thomas Bell, 'The Concept of Dynamic Analysis,' ACM SIGSOFT international symposium on Foundations of software engineering table of contents, pp.216-234, 1999 https://doi.org/10.1145/318774.318944
  10. Jon Louis Bentley, 'Bumper-Sticker Computer Science,' Communications of the ACM, Volume 28, Issue 9, pp.896-901, 1985.9 https://doi.org/10.1145/4284.315122
  11. Thomas Ball, Peter Mataga, Mooly Sagiv, 'Edge Profiling versus Path Profiling,' ACM Symposium on Principles of Programming Languages, pp.l34-148, 1998 https://doi.org/10.1145/268946.268958
  12. Michael D. Bond, Kathryn S. McKinley, 'Continuous Path and Edge Profiling,' IEEE/ACM International Symposium on Micro-architecture table of contents, pp.130-140, 2005 https://doi.org/10.1109/MICRO.2005.16
  13. Pohua P. Chang, Scott A. Mahlke, Wen-rnei W. Hwu, 'Using Profile Information to Assist Classic Code Optimizations,' IEEE Software Practice and Experience, Vol.21, No.12, pp.1301-1321, 1991 https://doi.org/10.1002/spe.4380211204
  14. James E. Smith, Ravi Nair, 'Virtual Machines - Versatile Platforms for Systems and Processes', Morgan Kaufmann, 2005