Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans, Lieven Eeckhout, Koen De Bosschere Department of Electronics.

Similar presentations


Presentation on theme: "Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans, Lieven Eeckhout, Koen De Bosschere Department of Electronics."— Presentation transcript:

1 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans, Lieven Eeckhout, Koen De Bosschere Department of Electronics and Information Systems Ghent University - Belgium 21st European Conference on Object-Oriented Programming July 30 – August 3, 2007. Berlin, Germany

2 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 2 Objects have different sizes in 32-bit and 64-bit mode 32-bit : 64-bit : ref 1 alignment ref 1 int 1 class Example { int int 1 ; Example ref 1 ; }

3 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 3 Prior work 64-bit Pointer compression techniques:  Adl-Tabatabai et al. Improving 64-bit Java IPF performance by compressing heap references. At CGO 2004.  Lattner and Adve. Transparent pointer compression for linked data structures. At MSP 2005. 32-bit Pointer compression technique:  Zhang and Gupta. Data compressing transformations for dynamically allocated data structures. In Computational Complexity 2002.

4 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 4 Referencing objects are often located close to each other heap: 0x0000 5454 1110 2020 0x0000 5454 1111 4440 0x0001 2420 relative offset: ro 1 = ref 1 – ref 0 ro 1 ref 0 ref 1 0x0

5 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 5 Object-Relative Addressing: goal 32-bit : 64-bit : ref 1 ORA : ro 1 ref 0 ref 1 = ref 0 + ro 1

6 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 6 What if some referencing objects aren’t located close to each other? Long Address Table (LAT): referentie 0 … 012…n012…n 64 bits old object reference field: 630 reference new object reference field: 310 rel.offset0 310 index1 Check at compression time ! heap: ?

7 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 7 read 64-bit reference from LAT ref 1 = ref 0 + ro 1 bit 0==0 ? yes no Decompression requires extra test ro 1 ref 0 read ref 1 : read 32-bit relative offset next instruction read 32-bit relative offset ref 1 = ref 0 + ro 1 next instruction Jump to read 64-bit reference from LAT ref 1 = ref 0 + ro 1 bit 0==0 ? yes no

8 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 8 Rebuilding the Long Address Table 0x0000 5454 1110 2020 0x0000 5454 1111 4440 0x0001 2420 relative offset: ref 0 ref 1 nursery LAT: reference 0 … 012…012… mature LAT: reference m … m m+1 m+2 … new mature LAT: reference k … k k+1 k+2 …

9 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 9 0x0000 0000 Compressing the null-reference - 32 least significant bits zero after decompression 0x0000 0000 0000 0000 - 32 zero bits - through LAT: 0x0123 4567 0000 0AAA 0xFFFF F556 0x0123 4567 0000 0000 null … 012…012… +

10 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 10 Experimental setup 64-bit Jikes RVM, version 2.3.5 IBM Power4, AIX benchmarks:  dacapo (beta-2006-08)  pseudojbb2000

11 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 11 On average, ORA reduces 10% of total allocated bytes

12 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 12 On average, ORA has no significant impact on performance antlr bloat fop hsqldb jython pmd pseudojbb avg speedup

13 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 13 We envision ORA to be used with a smart MM strategy Try to limit the number of inter-object references that cross the 32-bit address range using techniques such as:  Object colocation ( Guyer and McKinley, OOPSLA 2003)  Connectivity-based memory allocation and collection (Hirzel et al, OOPSLA 2003)  Region-based systems ( Cherem and Rugina, ISMM 2002; Qian and Hendren, ISMM 2002; Hallenberg et al, PLDI 2002)  …

14 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 14 Conclusions 64-bit mode uses a lot more memory than 32-bit mode ORA reduces allocated bytes by 10%, and up to 14,5% ORA does not give up on performance

15 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 15 … and next? we should rethink about how to use the 64-bit virtual address space:  not efficient to look at it as just one linear blok  better to give a functional meaning: encode information, make regions based on age, connectivity, … construct smart memory managers  fast analysis: points-to, escape, pointer interference  preferably (partially) at runtime

16 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 16 Questions ?

17 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 17 Extra: L3 misses

18 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 18 Extra performance measurements antlr bloat fop hsqldb jython pmd pseudojbb avg

19 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 19 Extra performance measurements db jack javac jess antlr fop hsqldb pmd crypt heapsort lufact moldyn search sor sparse pseudojbb avg

20 Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans – Aug. 1 st 2007 – ECOOP 2007, Berlin pag. 20 Extra: reduction in bytes


Download ppt "Object-Relative Addressing: Compressed Pointers in 64-bit Java Virtual Machines Kris Venstermans, Lieven Eeckhout, Koen De Bosschere Department of Electronics."

Similar presentations


Ads by Google