- 바이너리 코드 패칭에 기반한 자바스크립트 엔진의 JIT 컴파일 코드 재사용
- ㆍ 저자명
- 전상훈,최재영,Jeon. Sang-Hoon,Choi. Jae-Young
- ㆍ 간행물명
- 정보과학회논문지. Journal of KIISE. 소프트웨어 및 응용
- ㆍ 권/호정보
- 2012년|39권 4호|pp.338-346 (9 pages)
- ㆍ 발행정보
- 한국정보과학회
- ㆍ 파일정보
- 정기간행물| PDF텍스트
- ㆍ 주제분야
- 기타
자바스크립트의 사용 빈도가 증가함에 따라 자바스크립트의 엔진의 처리속도가 중요한 이슈로 대두되었다. 많은 자바스크립트 엔진들이 성능 향상을 위해 JIT(Just-in-Time) 컴파일러를 도입하였지만, JIT 컴파일은 어플리케이션의 실행 시간의 일부를 컴파일 작업에 할당해야 하기 때문에, 시스템 자원이 제한된 환경에서 JIT 컴파일 기술을 활용하기가 용이하지 않다. 이에 본 논문은 JIT 컴파일러를 내장한 자바스크립트 엔진에서 JIT 컴파일된 코드를 재사용하여 컴파일러 오버헤드를 줄이는 방법을 제안한다. 자바스크립트 엔진에서 적시 컴파일된 코드를 재사용하기 위해서는 적시 컴파일된 코드의 런타임 의존성 문제를 해결해야 한다. 이를 위해 WebKit의 SquirrelFish eXtreme (SFX) 자바스크립트 엔진에 직접 바이너리 코드 패칭을 통한 코드 재사용 모듈을 개발하여 적용하였다. 수정된 자바스크립트 엔진은 이전에 비해 최대 49%, 평균 44% 정도로 전체 컴파일 시간이 감소하는 것을 확인하였다.
JavaScript is a core language of web applications, and it is the most frequently used web language, which is used in more than 90% of web pages around the world. The performance of JavaScript engines becomes an important issue. In order to increase the execution speed of web applications, many JavaScript engines embedded JIT (just-in-time) Compiler. However, JIT compilers are required to execute and compile applications at the same time. Therefore, this technique has been hardly applicable to embedded systems, in which system resources are limited. In this paper, we present a reusing technique for JIT compiled code in the JavaScript engine to reduce compilation overhead. In order to reuse JIT compiled code, problems for runtime dependency in JIT compiled binary code must be resolved. We used a direct binary code patching method on SquirrelFish eXtreme (SFX) JavaScript engine of WebKit for the experiment. Through the experiment, we found that the total compilation time of the modified SFX JavaScript engine was slightly increased up to 9.4% because of code saving, but the time was reduced up to 49%, averagely 44%, depending on web services when the code was reused.