Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 77f56ad6f08d
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a27c813abb38
Choose a head ref
  • 10 commits
  • 9 files changed
  • 2 contributors

Commits on Apr 26, 2015

  1. Copy the full SHA
    bb2f37b View commit details

Commits on May 20, 2015

  1. Copy the full SHA
    05613d2 View commit details
  2. Merge pull request #3379 from d4rky-pl/master

    Clean bundler environment before running Homebrew during configuration
    brixen committed May 20, 2015
    Copy the full SHA
    3d752ba View commit details

Commits on May 21, 2015

  1. Copy the full SHA
    b23c23d View commit details

Commits on May 22, 2015

  1. Updated psych to 2.0.13.

    brixen committed May 22, 2015
    Copy the full SHA
    b850eac View commit details
  2. Copy the full SHA
    96a0271 View commit details
  3. Updated .gitignore.

    brixen committed May 22, 2015
    Copy the full SHA
    621953b View commit details
  4. Copy the full SHA
    e0d28fd View commit details
  5. Copy the full SHA
    a24c19b View commit details
  6. Copy the full SHA
    a27c813 View commit details
Showing with 55 additions and 14 deletions.
  1. +3 −0 .gitignore
  2. +4 −3 .travis.yml
  3. +1 −1 Gemfile.installed
  4. +5 −1 configure
  5. +3 −3 gems_list.txt
  6. +2 −6 vm/builtin/thread.cpp
  7. +19 −0 vm/missing/gettid.cpp
  8. +11 −0 vm/missing/gettid.h
  9. +7 −0 vm/object_memory.cpp
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -79,6 +79,9 @@ Gemfile.installed.lock

/vm/test/ruby.h

# rubysl-digest installs this header
vm/include/capi/ruby/digest.h

/kernel/signature.rb

# Generated documentation
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -7,15 +7,16 @@ compiler:
before_install:
- echo $LANG
- echo $LC_ALL
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update && sudo apt-get install -y llvm-3.4 llvm-3.4-dev; fi
- if [ $TRAVIS_OS_NAME == linux ]; then wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -; fi
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install libllvm3.6 llvm-3.6-dev; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install llvm && brew link --force llvm; fi
- rvm use $RVM --install --binary --fuzzy
- gem update --system
- gem --version

before_script:
- travis_retry bundle
- if [ $TRAVIS_OS_NAME == linux ]; then travis_retry ./configure --llvm-config llvm-config-3.4; fi
- if [ $TRAVIS_OS_NAME == linux ]; then travis_retry ./configure --llvm-config llvm-config-3.6; fi
- if [ $TRAVIS_OS_NAME == osx ]; then travis_retry ./configure --llvm-config /usr/local/opt/llvm/bin/llvm-config; fi

script: rake ci
@@ -44,7 +45,7 @@ notifications:
on_start: always

env:
- RVM=2.0.0 LANG="en_US.UTF-8"
- RVM=2.0.0 LANG="en_US.UTF-8" RBXOPT=-Xint

os:
- linux
2 changes: 1 addition & 1 deletion Gemfile.installed
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ gem "racc", "~> 1.4"
gem "rake", "~> 10.1"
gem "json", "~> 1.8"
gem "rdoc", "~> 4.0"
gem "psych", "= 2.0.10"
gem "psych", "= 2.0.13"

gem "rb-readline", "~> 0.5"
gem "rubysl-readline", "~> 2.0"
6 changes: 5 additions & 1 deletion configure
Original file line number Diff line number Diff line change
@@ -576,7 +576,7 @@ class Configure
if macports?
config = macports_llvm_config
else
out = `brew list llvm | grep '/llvm-config$'`
out = Bundler.with_clean_env { `brew list llvm | grep '/llvm-config$'` }
config = out.chomp if $?.success?
end
end
@@ -1220,6 +1220,10 @@ int main() { return tgetnum(""); }
@defines << "HAVE_INOTIFY"
end

if has_function("gettid", ["unistd.d", "sys/types.h"])
@defines << "HAVE_GETTID"
end

# glibc has useless lchmod() so we don't try to use lchmod() on linux
if !@linux and has_function("lchmod", ["sys/stat.h", "unistd.h"])
@have_lchmod = true
6 changes: 3 additions & 3 deletions gems_list.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
bundler-1.9.8.gem
daedalus-core-0.3.0.gem
daedalus-core-0.5.0.gem
ffi2-generators-0.1.1.gem
json-1.8.2.gem
minitest-4.7.5.gem
psych-2.0.10.gem
psych-2.0.13.gem
racc-1.4.12.gem
rake-10.4.2.gem
rb-readline-0.5.2.gem
@@ -34,7 +34,7 @@ rubysl-csv-2.0.2.gem
rubysl-curses-2.0.1.gem
rubysl-date-2.0.9.gem
rubysl-delegate-2.0.1.gem
rubysl-digest-2.0.7.gem
rubysl-digest-2.0.8.gem
rubysl-drb-2.0.1.gem
rubysl-e2mmap-2.0.0.gem
rubysl-english-2.0.0.gem
8 changes: 2 additions & 6 deletions vm/builtin/thread.cpp
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
#include "metrics.hpp"
#include "util/logger.hpp"

#include <sys/syscall.h>
#include "missing/gettid.h"

/* HACK: returns a value that should identify a native thread
* for debugging threading issues. The winpthreads library
@@ -291,11 +291,7 @@ namespace rubinius {

NativeMethod::init_thread(state);

#ifdef __APPLE__
vm->thread->pid(state, Fixnum::from(syscall(SYS_thread_selfid)));
#else
vm->thread->pid(state, Fixnum::from(syscall(SYS_gettid)));
#endif
vm->thread->pid(state, Fixnum::from(gettid()));

// Lock the thread object and unlock it at __run__ in the ruby land.
vm->thread->alive(state, cTrue);
19 changes: 19 additions & 0 deletions vm/missing/gettid.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "vm/missing/gettid.h"

#ifndef HAVE_GETTID
#include <sys/syscall.h>

pid_t gettid(void) {
#if defined(__APPLE__)
return (pid_t)syscall(SYS_thread_selfid);
#elif defined(__FreeBSD__)
long tid;
syscall(SYS_thr_self, &tid);
return (pid_t)(tid);
#elif defined(SYS_gettid)
return (pid_t)syscall(SYS_gettid);
#else
return 0;
#endif
}
#endif
11 changes: 11 additions & 0 deletions vm/missing/gettid.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "vm/config.h"

#include <unistd.h>

#ifdef HAVE_GETTID
#include <sys/types.h>
#else
extern "C" {
pid_t gettid(void);
}
#endif
7 changes: 7 additions & 0 deletions vm/object_memory.cpp
Original file line number Diff line number Diff line change
@@ -507,6 +507,13 @@ namespace rubinius {
// Don't go any further unless we're allowed to GC.
if(!can_gc()) return;

/* A pending GC is less common than not, so don't checkpoint the entire
* process to check for the condition.
*
* This is a race, but that is handled by the stop_the_world code below.
*/
if(!collect_young_now && !collect_mature_now) return;

while(!state->stop_the_world()) {
state->checkpoint(gct, call_frame);