2007 2013 Kandroid
www.kandroid.org »
kandroid s/w fundamentals 교육 »
안드로이드 Platform 
▶ HTC Dream Platform Images
Dalvik VM and SQlite 3.5.5
작성자 오호라
작성일 2008-03-14 (금) 17:30
ㆍ추천: 0  ㆍ조회: 2126      
IP: 211.xxx.161

SQLite

2008-Jan-31 - Version 3.5.5

Version 3.5.5 changes over 8% of the core source code of SQLite in order to convert the internal virtual machine from a stack-based design into a register-based design. This change will allow future optimizations and will avoid an entire class of stack overflow bugs that have caused problems in the past. Even though this change is large, extensive testing has found zero errors in the new virtual machine and so we believe this to be a very stable release
 
주내용은 이러합니다.
 
기존 내부 스택기반 가상머신( www.sqlite.org )을 레지스터기반 가상머신으로 디자인을 변경하다. 이는 클래스 오버플로우 버그를 피하고, 최적화를 위해서이다. ...
 
핵심은 소스코드의 8%가량을 수정했다는 겁니다. 이는 이례적인 일인거 같습니다. 결국 SQLite 가 android에 built-in 되면서 어느 정도 최적화를 위해서 이를 수정한 듯 합니다. 물론 이에 대한 공식적인 내용은 없습니다.
 
이번 수정된 부분을 분석해보면 DalVik VM 의 실마리가 보일지 않을까 모르겠습니다.
 
sqlite.3.5.5/src/vdbe.c
The SQL parser generates a program which is then executed by
the VDBE to do the work of the SQL statement.  VDBE programs are
similar in form to assembly language.  The program consists of
a linear sequence of operations.  Each operation has an opcode
and 5 operands.  Operands P1, P2, and P3 are integers.  Operand P4
is a null-terminated string.  Operand P5 is an unsigned character.
Few opcodes use all 5 operands.
이름아이콘 들풀
2008-03-14 17:39
아주 좋은 정보네여....오호라님..감사합니다.
   
이름아이콘 invain
2008-03-15 00:03
2008-Feb-6 - Version 3.5.6
Version 3.5.6 fixes a minor regression in 3.5.5 - a regression that had nothing to do with the massive change ove the virtual machine to a register-based design. No problems have been reported with the new virtual machine. This release of SQLite is considered stable and ready for production use.
--> 제 생각은 sqlite를 통해 dalvik의 실마리까지 추측은 다소무리가 있을것으로 생각되고, 다만 sqlite의 이러한 변화를 통해서 dalvik vm이 라이센스문제로 새로운 vm으로 바뀔가능성은 낮아질것이라는 것을 확신할수 있는 이유중의 한가지 요인으로 생각해볼수 있지 않을까 합니다.
   
이름아이콘 오호라
2008-03-15 01:50
예. 저도 그럴것같습니다. 혹시나 아래의 내용과 연관이 있지 않을까 했는데. 잘 모르겠습니다. (^^;)
Specific registers are designated to hold the most important parts the JVM state, registers r0-r3 hold an alias of the top of the Java stack, r4 holds Java local operand zero (pointer to *this) and r6 contains the Java stack pointer.[15]
Jazelle reuses the existing Program Counter register r15[16]. A pointer to the next bytecode goes in r14[17], so the use of the PC is not generally user-visible except during debugging.
(http://en.wikipedia.org/wiki/ARM_architecture)
DalVik VM 을 제대로 개발해서 Apache 라이센스로만 오픈해준다면 그것만으로도 안드로이드는 반은 성공한것이 아닐까하는 생각이 드네요. OSGi 쪽에서도 대환영할듯한데, 의외 VM때문에 좌절하는 곳도 많으니...
   
이름아이콘 wonsuk
2008-03-18 14:59
제가 보기에는 Dalvik이 register 기반 VM이기 때문에, 구글이 엔지니어를 지원해서 SQLite 코드를 수정하지 않았나 싶네요. 결국 위의 작업은 Dalvik에 최적화 했다는 내용으로 보입니다.^^
   
 
덧글 쓰기 0
3500
※ 회원등급 레벨 0 이상 읽기가 가능한 게시판입니다.
    N     분류     제목    글쓴이 작성일 조회
47 Google IO: Anatomy & Physiology of an Android [1] 들풀 2008-06-06 2064
46 Ubuntu 8.04 vs. Fedora 9 invain 2008-06-04 1658
45 ELC2008 - Development of Mobile Linux Open Platform invain 2008-06-03 1007
44 Nine-Patch Stretchable Image [1] invain 2008-06-02 2316
43 구글 안드로이드 플랫폼 분석 [12] 성공하자 2008-05-28 7023
42 Development of Mobile Linux Open Platform 들풀 2008-05-14 1667
41 안드로이드 플랫폼 시작시의 Red Eye [4] invain 2008-05-09 2080
40 Spring 2008 Release of Sourcery G++ for ARM [2] invain 2008-04-17 1598
39 당신이 VM에 대해 알아야 하는 모든 것... [4] 들풀 2008-04-09 3558
38 Dalvik VM and SQlite 3.5.5 [4] 오호라 2008-03-14 2126
37 Tool to read Android binary XML files [1] 들풀 2008-03-09 2515
36 yaffs2포맷으로 System.img 및 userdata.img 생성 및 추출.. invain 2008-03-04 4576
35 Dalvik VM의 .dex [1] invain 2008-03-04 2977
34    Overview of ARM Jazelle DBX (Direct Bytecode eXecution) Tech [1] invain 2008-03-04 2163
33 [인베인] ARM EABI Port 들풀 2008-03-04 2097
32 [인베인] Android Emulator의 Internals 들풀 2008-03-04 2215
1234567