Galois, Inc 2010

1,078 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,078
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Galois, Inc 2010

  1. 1. The Rubinius Virtual Machine Brian Ford brixen @ {twitter IRC gmail} presented at Galois, Inc 30 Nov 10
  2. 2. Rubinius runs Ruby
  3. 3. Methods
  4. 4. Methods
  5. 5. Methods
  6. 6. Blocks
  7. 7. Blocks
  8. 8. Scopes
  9. 9. Classes
  10. 10. Classes
  11. 11. Modules
  12. 12. Modules
  13. 13. Modules
  14. 14. Singleton Classes
  15. 15. Singleton Classes
  16. 16. Expressions
  17. 17. Rubinius History
  18. 18. Sydney thread-safe MRI prototype B prototype S
  19. 19. ~4 years early Git user open commit policy
  20. 20. virtual machines garbage collectors bytecode compilers Ruby core library primitives systems JIT compilers of RubySpecs 2 1.75 3 1 2 2 tons
  21. 21. Virtual Machine
  22. 22. bootstrapping
  23. 23. VM | OM
  24. 24. object memory ontology methods
  25. 25. vm/ontology.cpp vm/environment.cpp vm/builtin/
  26. 26. VM | OM alpha.rb
  27. 27. VM | OM alpha.rb bootstrap/
  28. 28. kernel/bootstrap/array.rb
  29. 29. VM | OM alpha.rb bootstrap/ platform/
  30. 30. kernel/platform/posix.rb
  31. 31. VM | OM alpha.rb bootstrap/ platform/ common/
  32. 32. VM | OM alpha.rb bootstrap/ platform/ common/ delta/
  33. 33. VM | OM alpha.rb bootstrap/ platform/ common/ delta/ loader.rb
  34. 34. set paths process options run application
  35. 35. VM | OM alpha.rb bootstrap/ platform/ common/ delta/ loader.rb Ruby C++
  36. 36. interpreters
  37. 37. vm/instructions.def
  38. 38. vm/instructions.def
  39. 39. vm/instructions.def
  40. 40. vm/instructions.def
  41. 41. vm/instructions.def
  42. 42. vm/instructions.def
  43. 43. vm/instructions.def
  44. 44. String Bytecode Compiler File AST Symbolic Bytecode Compiled Method Compiled File
  45. 45. lib/compiler/compiler.rb
  46. 46. lib/compiler/ast/operators.rb
  47. 47. spec/compiler/and_spec.rb
  48. 48. field access
  49. 49. kernel/bootstrap/array.rb
  50. 50. vm/builtin/array.hpp
  51. 51. primitives
  52. 52. kernel/bootstrap/array.rb
  53. 53. vm/builtin/array.hpp
  54. 54. vm/gen/primitives_glue.gen.hpp
  55. 55. Garbage Collector
  56. 56. Large Object Space Nursery Young Semi- Space Mature Immix Generational
  57. 57. Nursery slab 1 slab 2
  58. 58. auto-tuned lifetime
  59. 59. Immix: A Mark-Region Garbage Collector with Space Efficiency, Fast Collection, and Mutator Performance Blackburn, S. & McKinley, K. (PLDI 2008)
  60. 60. C-API
  61. 61. MRI native API legacy code poor quality
  62. 62. Inflated Headers Flags field 1 ...
  63. 63. Inflated Headers Tagged Pointer field 1 ... Flags handle
  64. 64. JIT
  65. 65. bytecode to LLVM IR
  66. 66. program threads JIT threads
  67. 67. vm/llvm/jit_visit.hpp
  68. 68. uncommon_interpreter
  69. 69. pure functions
  70. 70. Custom Passes guard elimination
  71. 71. rbx -Xjit.dump_code=N LLVM IR = 1 optimized IR = 2 machine code = 4
  72. 72. exceptions
  73. 73. RubySpec
  74. 74. array/index_spec.rb
  75. 75. array/index_spec.rb
  76. 76. integer/even_spec.rb
  77. 77. file/open_spec.rb
  78. 78. 3521 files, 15769 examples, 43797 expectations, 0 failures, 0 errors
  79. 79. Future Rubinius
  80. 80. full concurrency (hydra branch)
  81. 81. method store (image?) lazy loading
  82. 82. build system
  83. 83. modularity swap core library
  84. 84. LLVM metadata type propagation
  85. 85. LLVM metadata type propagation
  86. 86. runtime compilation with clang (Windows, C-ext)
  87. 87. StrongRuby ?
  88. 88. Android mobile
  89. 89. Web rubini.us Github github.com/evanphx/rubinius IRC #rubinius
  90. 90. Thank you

×