Skip to content

Instantly share code, notes, and snippets.

@guilherme
Forked from mattetti/0-readme.md
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guilherme/b1564fd18b528fe23afa to your computer and use it in GitHub Desktop.
Save guilherme/b1564fd18b528fe23afa to your computer and use it in GitHub Desktop.

Ruby 1.9.3-p194 with DTrace probes, Perf Patches, and backported COW-friendly GC

Overview

This script installs a patched version of ruby 1.9.3-p194 with DTrace probes, boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches and to Aaron Patterson for the DTrace instrumentation.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

Ok, let's do this!

curl -L https://gist.github.com/guilherme/b1564fd18b528fe23afa/raw/fbd29c5be53a1fb2e1c231e6064b6a93a30f12b8/rbenv.sh | sh ; rbenv global 1.9.3-p194-dtrace

Warning: ruby*::vm_exec_core:function-* seem to be broken, causing SystemStackErrors in the ruby process you instrument.

build_package_combined_patch() {
local package_name="$1"
{
autoconf
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
make probes.h
make -j 8
make install
} >&4 2>&1
}
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
# You can see the source for this package at https://github.com/burke/ruby/commits/work
install_package "build" "http://cloud.github.com/downloads/burke/ruby/ruby-1.9.3-p194-perf-dtrace.tar.gz" combined_patch
VERSION="1.9.3-p194"
curl -L https://gist.github.com/guilherme/b1564fd18b528fe23afa/raw/438820b57a3132564d2d9630502b450bba4fc8a8/2-1.9.3-p194-patched.sh > /tmp/$VERSION-dtrace
rbenv install /tmp/$VERSION-dtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment