Your SlideShare is downloading. ×
  • Like
Retrospective: Seven VM Engineering Years
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Retrospective: Seven VM Engineering Years

  • 78 views
Published

Title: Retrospective: Seven VM Engineering Years …

Title: Retrospective: Seven VM Engineering Years
Speaker: Andres Valloud
Wed, August 20, 2:00pm – 2:30pm

Video Part1: https://www.youtube.com/watch?v=LdDIW2lrIrU
Video Part2: https://www.youtube.com/watch?v=0EcTg3shdq8

Description
Abstract: In this talk the presenter will summarize the lessons learned during 7 years of virtual machine development, looking at Smalltalk from the dual perspective of a VM engineer.

Bio: Andres Valloud has been lead VM engineer at Cincom from 2007 to 2014. He has also authored 3 books on Smalltalk, and currently works at LabWare.

Published in Software
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Video Part1: https://www.youtube.com/watch?v=LdDIW2lrIrU
    Video Part2: https://www.youtube.com/watch?v=0EcTg3shdq8
    Are you sure you want to
    Your message goes here
    Be the first to like this
No Downloads

Views

Total Views
78
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
1
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Retrospective Seven VM Engineering Years Andres Valloud
  • 2. A typical VM project
  • 3. A typical VM project “do something about 64 bits”
  • 4. do something about 64 bits
  • 5. do something about 64 bits ImageWriter
  • 6. do something about 64 bits ImageWriter image format
  • 7. Serialization image do something about 64 bits ImageWriter format
  • 8. Serialization image do something about 64 bits ImageWriter format 32 vs 64 bits
  • 9. Serialization image do something about 64 bits ImageWriter FFI, types format 32 vs 64 bits
  • 10. Serialization image do something about 64 bits ImageWriter FFI, types format platform specs 32 vs 64 bits
  • 11. Serialization do something about 64 bits ImageWriter FFI, types SmallInteger image format platform specs 32 vs 64 bits
  • 12. Serialization do something about 64 bits ImageWriter FFI, types SmallInteger image format platform specs 32 vs 64 bits x86 code generators
  • 13. Serialization do something about 64 bits ImageWriter FFI, types SmallInteger image format platform specs 32 vs 64 bits x86 code generators x86 specs
  • 14. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types Floating point image format platform specs 32 vs 64 bits x86 code generators x86 specs
  • 15. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types x86 specs Floating point image format platform specs 32 vs 64 bits x86 code generators IEEE-754
  • 16. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types x86 specs IEEE-754 Floating point image format platform specs 32 vs 64 bits x86 code generators FPU specs
  • 17. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types x86 specs IEEE-754 Floating point image format platform specs 32 vs 64 bits x86 code generators SmallDouble FPU specs
  • 18. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types IEEE-754 Floating point image format platform specs 32 vs 64 bits x86 code generators SmallDouble FPU specs 32 bit bugs x86 specs
  • 19. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types IEEE-754 Floating point image format platform specs prim returns 32 vs 64 bits x86 code generators SmallDouble FPU specs 32 bit bugs x86 specs
  • 20. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types IEEE-754 Floating point prim returns pointer aliasing image format platform specs 32 vs 64 bits x86 code generators SmallDouble FPU specs 32 bit bugs x86 specs
  • 21. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types Floating point prim returns pointer aliasing image format platform specs 32 vs 64 bits x86 code generators FPU specs C99 compiler manuals IEEE-754 SmallDouble 32 bit bugs x86 specs
  • 22. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types Floating point prim returns pointer aliasing image format platform specs 32 vs 64 bits x86 code generators FPU specs C99 compiler manuals IEEE-754 SmallDouble 32 bit bugs SIGSEGV x86 specs
  • 23. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types Floating point 32 bit bugs C compilers prim returns pointer aliasing image format platform specs 32 vs 64 bits x86 code generators FPU specs C99 compiler manuals IEEE-754 SmallDouble SIGSEGV x86 specs
  • 24. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types Floating point prim returns pointer aliasing image format platform specs 32 vs 64 bits x86 code generators FPU specs C99 compiler manuals IEEE-754 SmallDouble SIGSEGV C compilers ABI violations 32 bit bugs x86 specs
  • 25. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types Floating point prim returns pointer aliasing Garbage Collectors image format platform specs 32 vs 64 bits x86 code generators FPU specs C99 compiler manuals IEEE-754 SmallDouble SIGSEGV C compilers ABI violations 32 bit bugs x86 specs
  • 26. Serialization SmallInteger do something about 64 bits ImageWriter FFI, types Floating point prim returns pointer aliasing Garbage Collectors image format platform specs 32 vs 64 bits x86 code generators FPU specs C99 compiler manuals IEEE-754 SmallDouble SIGSEGV C compilers ABI violations 32 bit bugs x86 specs
  • 27. Speaking of GC
  • 28. Speaking of GC “every efficient GC is a hybrid of reference counting and tracing”
  • 29. Reference counting and tracing
  • 30. Reference counting and tracing New Old Perm Eden S1 S2
  • 31. Reference counting and tracing New Old Perm Eden S1 S2 RT
  • 32. Reference counting and tracing New Old Perm Eden S1 S2 RT Old RT
  • 33. Reference counting and tracing New Old Perm Eden S1 S2 RT Old RT IGC lists
  • 34. Reference counting and tracing New Old Perm Eden S1 S2 RT Old RT IGC lists Class table
  • 35. ... problems... Image <primitive: 123> C Hardware <foo.dll bar( )> prim123( ) {...} FFI OS, C libraries ... and rax, 3h... VM
  • 36. ... problems... Image <primitive: 123> C Hardware <foo.dll bar( )> prim123( ) {...} FFI OS, C libraries ... and rax, 3h... VM UD
  • 37. ... problems... Image <primitive: 123> C sigevent_t Hardware <foo.dll bar( )> prim123( ) {...} FFI OS, C libraries ... and rax, 3h... VM UD
  • 38. ... problems... Image <primitive: 123> C sigevent_t Hardware <foo.dll bar( )> prim123( ) {...} FFI OS, C libraries ... and rax, 3h... VM UD port
  • 39. ... problems... Image <primitive: 123> C sigevent_t macros, GetLastError() Hardware <foo.dll bar( )> prim123( ) {...} FFI OS, C libraries ... and rax, 3h... VM UD port
  • 40. Long term vision
  • 41. Long term vision “an excess of code cruft is preventing us from doing our jobs”
  • 42. LOC over time 400k 320k 240k 160k 80k 0k ObjectWorks VW 2.x VW 3.x VW 5.x VW 7.x - 2007 VW 7.x - 2014 1990 1994 1997 2000 2003 2005 2008 2011
  • 43. Progress over time 300 240 180 120 60 0 -60 -120 -180 Δ LOC / 500 VW 7.x - 2007 VM ARs closed Δ LOC / 500 VW 7.x - 2013 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.7.1 7.8 7.9 7.10
  • 44. GC improvements 2010 VW 7.7 legacy VW 7.7.1 legacy sizesAtStartup VW 7.7.1 default 40,000 sec 30,000 sec 20,000 sec 10,000 sec 0 sec Ax100 Bx100 Cx400 Dx40 Ex40 Fx6 Gx6 A: pointer garbage B: byte garbage C: point creation Segmented container D: byte allocation E: pointer allocation Large container F: byte allocation G: pointer allocation
  • 45. GC improvements 2013 2,000 sec 1,500 sec 1,000 sec 500 sec 0 sec VW 7.7.1 VW 7.10 Scavenge Stress GC Stress GC Deep Stack Stress Total VW 7.10’s GC ~45% faster than VW 7.7.1 overall
  • 46. The message
  • 47. The message “pauca sed matura”