SlideShare a Scribd company logo
Rubinius
Ruby Implemented with Ruby
About us
● Graduated from COEP (IT) in 2014
● Rails Girls Summer of Code, 2014 Interns
● http://teamrubiniusrgsoc14.blogspot.in/
● @AkankshaHA, @sanakhan_libre
Agenda
● What is Rubinius?
● Components
● Flow of Ruby Code to Machine Code
● Implementation of basic methods
● Backtraces
● Various tools
● Heap Dump Interface
● Metrics
● New Features in Rubinius 3.0
● An alternative implementation of Ruby interpreter
● Started in 2006 by Evan Phoenix with an objective to implement Ruby in
Ruby
What is Rubinius?
Components
● Kernel (Ruby)
Definition of built-in classes (rubinius/kernel/common)
● Virtual Machine (C++)
GC
JIT Compiler (LLVM)
Additional code for built-in classes (rubinius/vm)
Source: Ruby Under a Microscope, Pat Shaughnessy
Ruby to Machine Code
Parsing (Melbourne)
Compilation (Ruby Code)
JIT Compilation (C++)
Machine Code
Ruby
Interpretation (VM)
AST Nodes
Rubinius Instructions
(Bytecode)
LLVM Instructions
Digging into Rubinius Code
String#upcase!
Rubinius - Ruby Implemented with Ruby
String#allocate
Array#shift
Rubinius - Ruby Implemented with Ruby
Examining Tuple#at
Rubinius - Ruby Implemented with Ruby
Backtraces in Rubinius vs MRI
Backtrace in Ruby
Backtrace in Rubinius
Rubinius Tools
● Debugger
● Profiler
● Heap Dump Interface
● Metrics
● And more..
● Tools in Rubinius 3.0
http://rubini.us/2014/11/13/rubinius-3-0-part-4-the-system-and-tools
The Rubinius Heap Dump Interface
What are heap dumps used for?
● Heap dumps is one of the most important analysis tools.
● Analyzing memory footprint of applications.
● Detecting Memory Leaks
● Identifying root cause of Memory Leaks
What is a heap dump?
Heap dump is a snapshot
of memory of a particular
process running at that
instant of time.
Obtaining Binary Heap Dump
● Rubinius::VM.dump_heap('/path/to/the/file.dump')
Or
● Via the Query Agent
A Sample Leaky Program
Histogram Representation
Diff of two heap snapshots
Per Class Statistics
Rubinius - Ruby Implemented with Ruby
Rubinius - Ruby Implemented with Ruby
Rubinius - Ruby Implemented with Ruby
Rubinius - Ruby Implemented with Ruby
Rubinius - Ruby Implemented with Ruby
Rubinius Metrics
● Accessible using Rubinius::Metrics.data
● Directly emitted to StatsD
●
● Metrics - StatsD - InfluxDB - Grafana
● http://rubini.us/2014/12/10/rubinius-metrics-meets-influxdb/
Metrics in Grafana dashboard
Some more metrics..
New features in Rubinius 3.0
● JIT compiler code to be written in Ruby, JIT Planner
● CodeDB
● Rubinius::Console
Questions?

More Related Content

PDF
Ruby JIT Compilation - Mykhail Bortnyk
PPTX
Ruby JIT Compilation
PDF
ruby-cocoa
PDF
Crystal
PDF
A Shallow Survey of Alternative Languages on the JVM
PDF
Intro to Crystal Programming Language
PPTX
Introduction to Ruby on Rails
PDF
Scala vs ruby
Ruby JIT Compilation - Mykhail Bortnyk
Ruby JIT Compilation
ruby-cocoa
Crystal
A Shallow Survey of Alternative Languages on the JVM
Intro to Crystal Programming Language
Introduction to Ruby on Rails
Scala vs ruby

What's hot (19)

PDF
PHP vs Node.js
PPTX
Front end development
PPTX
Ruby on Rails : First Mile
ODP
PyQt Application Development On Maemo
PDF
Clang Analyzer Tool Review
PDF
freeCodeCamp Tokyo meetup 19
KEY
Ruby On Rails Ecosystem
PDF
Swift for back end: A new generation of full stack languages?
PDF
Groovy android
PDF
Spring-batch Groovy y Gradle
PPTX
Ruby, the language of devops
PDF
Angular2 - A story from the trenches
PDF
OSDC 2017 - Dr. Udo Seidel - VMwares (open source) Way of Container
PDF
PyQt: rapid application development
PPTX
HOW AND WHY GRAALVM IS QUICKLY BECOMING RELEVANT FOR YOU
PPTX
Geb+spock: let your functional tests live long and prosper
PPTX
Clang compiler `
PDF
Introduction to Kotlin coroutines
PDF
OpenAPI and gRPC Side by-Side
PHP vs Node.js
Front end development
Ruby on Rails : First Mile
PyQt Application Development On Maemo
Clang Analyzer Tool Review
freeCodeCamp Tokyo meetup 19
Ruby On Rails Ecosystem
Swift for back end: A new generation of full stack languages?
Groovy android
Spring-batch Groovy y Gradle
Ruby, the language of devops
Angular2 - A story from the trenches
OSDC 2017 - Dr. Udo Seidel - VMwares (open source) Way of Container
PyQt: rapid application development
HOW AND WHY GRAALVM IS QUICKLY BECOMING RELEVANT FOR YOU
Geb+spock: let your functional tests live long and prosper
Clang compiler `
Introduction to Kotlin coroutines
OpenAPI and gRPC Side by-Side
Ad

Viewers also liked (20)

PDF
PRUG Meetup - RGSoC Team Rubinius
PPTX
Delimiter - OpenStack Cross Project Quota Library Proposal
PPT
OEO Presentation For The State Library (2)
PDF
Contributing to OpenStack, A beginner's perspective
PDF
OpenStack@Mini-Deb Conf'16 Mumbai
PDF
Your first patch to OpenStack
PDF
Copr HD OpenStack Day India
PDF
Deploying openstack using ansible
PPTX
The OpenStack Contribution Workflow
PDF
Your first patch to open stack
PDF
Open stack qa and tempest
PDF
Guts & OpenStack migration
PDF
OpenStack Storage Buddy Ceph
ODP
OpenStack DevStack Configuration localrc local.conf Tutorial
PDF
Introduction to tempest
PDF
OPNFV & OpenStack
PPTX
Who carries your container? Zun or Magnum?
PDF
OpenStack Tempest and REST API testing
PPTX
Optimized NFV placement in Openstack Clouds
PPTX
OpenStack Neutron Behind The Senes
PRUG Meetup - RGSoC Team Rubinius
Delimiter - OpenStack Cross Project Quota Library Proposal
OEO Presentation For The State Library (2)
Contributing to OpenStack, A beginner's perspective
OpenStack@Mini-Deb Conf'16 Mumbai
Your first patch to OpenStack
Copr HD OpenStack Day India
Deploying openstack using ansible
The OpenStack Contribution Workflow
Your first patch to open stack
Open stack qa and tempest
Guts & OpenStack migration
OpenStack Storage Buddy Ceph
OpenStack DevStack Configuration localrc local.conf Tutorial
Introduction to tempest
OPNFV & OpenStack
Who carries your container? Zun or Magnum?
OpenStack Tempest and REST API testing
Optimized NFV placement in Openstack Clouds
OpenStack Neutron Behind The Senes
Ad

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Electronic commerce courselecture one. Pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
A Presentation on Artificial Intelligence
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Weekly Chronicles - August'25-Week II
Approach and Philosophy of On baking technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Electronic commerce courselecture one. Pdf
Machine Learning_overview_presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
A comparative analysis of optical character recognition models for extracting...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
sap open course for s4hana steps from ECC to s4
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A Presentation on Artificial Intelligence
MYSQL Presentation for SQL database connectivity
NewMind AI Weekly Chronicles - August'25-Week II

Rubinius - Ruby Implemented with Ruby