Skip to content
Commits on May 24, 2012
  1. Add specs for String#to_ast

    committed
  2. Revert "Move immix under rubinius::"

    committed
    This reverts commit 04923cf.
  3. Revert "Move config under rubinius::"

    committed
    This reverts commit 1c2981e.
  4. Revert "Move thread under rubinius::thread"

    committed
    This reverts commit 46e615e.
Commits on May 23, 2012
  1. @dbussink

    Remove old LLVM task

    dbussink committed
  2. @dbussink

    Revert "Remove unused LLVM file"

    dbussink committed
    This reverts commit c20a599.
  3. Move immix under rubinius::

    committed
  4. Move config under rubinius::

    committed
Commits on May 22, 2012
  1. Optimize GlobalCache for faster boot and require

    committed
    After a typical cachegrind session, a bottle neck is found in the startup phase
    of Rubinius. As shown by Cachegrind results at bottom, there are too many CPU
    L1 data cache misses.
    
    Namely, the bottle neck is GlobalCache::clear(STATE, Symbol* name), which is
    inlined into System::vm_reset_method_cache(STATE, rubinius::Symbol*). This is
    confirmed by OProfile result at bottom.
    
    clear() is frequently called when defining classes and modules (eg, starting up
    Rubinius itself and loading source files).
    
    The cause of the bottle neck is that clear() writes to non-continuous memory in
    its extremely-tight loop. Of course, that's not CPU cache friendly.
    
    This commit simply arranges memory layout to make clear()'s write memory access
    pattern contiguous. This layout change incurs a tiny trade-off.  It is that
    GlobalCache's lookup-related functions get slow by a negligible fraction in
    relation to the entire VM execution. And they are not heavily called as much as
    clear(). By these reasons, no hot code path is affected by this tiny trade-off.
    Thus, the trade-off is justified.
    
    As show below, Rubinius's startup gets faster by about ~10%.
    
    Benchmark results
    
    Before:
      $ ./bin/benchmark ./benchmark/real_world/bench_startup.rb
      === bin/rbx ===
       startup        3.2 (±0.0%) i/s -         96 in  30.231348s (cycle=1)
    
    After:
      $ ./bin/benchmark ./benchmark/real_world/bench_startup.rb
      === bin/rbx ===
        startup        3.5 (±0.0%) i/s -        105 in  30.205996s (cycle=1)
    
    Cachegrind results
    
    Before:
      Command:          ./bin/rbx -e nil
    
      --------------------------------------------------------------------------------
               Ir    I1mr  ILmr         Dr       D1mr    DLmr        Dw    D1mw    DLmw  file:function
      --------------------------------------------------------------------------------
      154,972,950     768     1 25,825,280 19,371,341      10    12,762   1,231       0  /home/ryoqun/rubinius-master/vm/global_cache.hpp:rubinius::System::vm_reset_method_cache(rubinius::State*, rubinius::Symbol*)
       54,637,620 149,561    64  7,544,407      2,882      46 4,077,709      22       0  /build/buildd/eglibc-2.15/stdlib/../stdlib/strtol_l.c:____strtol_l_internal
       33,793,180 106,669    20  8,502,053        979      10 5,318,282      21       0  /build/buildd/gcc-4.6-4.6.3/build/x86_64-linux-gnu/libstdc++-v3/include/bits/istream.tcc:std::istream::sentry::sentry(std::istream&, bool)
       29,731,837   8,233    30  8,504,145    195,451   6,440 2,953,027     126       2  /home/ryoqun/rubinius-master/vm/symboltable.cpp:rubinius::SymbolTable::lookup(char const*, unsigned long, unsigned int)
       25,182,478  24,355    24  6,715,362          1       0 3,693,388       0       0  /build/buildd/gcc-4.6-4.6.3/build/x86_64-linux-gnu/libstdc++-v3/src/../../../../src/libstdc++-v3/src/istream.cc:std::istream::getline(char*, long, char)
    
    After:
      Command:          ./bin/rbx -e nil
      --------------------------------------------------------------------------------
               Ir    I1mr ILmr         Dr      D1mr    DLmr        Dw    D1mw    DLmw  file:function
      --------------------------------------------------------------------------------
      129,143,424     833    1 25,825,280 3,152,848   2,026    12,768   3,240     250  /home/ryoqun/rubinius-master/vm/global_cache.hpp:rubinius::System::vm_reset_method_cache(rubinius::State*, rubinius::Symbol*)
       54,637,620 149,494   64  7,544,407     2,888      46 4,077,709      10       0  /build/buildd/eglibc-2.15/stdlib/../stdlib/strtol_l.c:____strtol_l_internal
       33,793,180 106,660   20  8,502,053       728       9 5,318,282      18       0  /build/buildd/gcc-4.6-4.6.3/build/x86_64-linux-gnu/libstdc++-v3/include/bits/istream.tcc:std::istream::sentry::sentry(std::istream&, bool)
       29,733,057   7,809   30  8,504,495   195,446   6,076 2,953,147     144       5  /home/ryoqun/rubinius-master/vm/symboltable.cpp:rubinius::SymbolTable::lookup(char const*, unsigned long, unsigned int)
       25,182,478  24,552   24  6,715,362         0       0 3,693,388       0       0  /build/buildd/gcc-4.6-4.6.3/build/x86_64-linux-gnu/libstdc++-v3/src/../../../../src/libstdc++-v3/src/istream.cc:std::istream::getline(char*, long, char)
    
    OProfile's opannotate results (after running "./bin/rbx -e nil" several times)
    
    Before:
      $ opannotate --merge all image:/home/ryoqun/rubinius-master/bin/rbx -t 1 \
                   --source
                     :    void clear(STATE, Symbol* name) {
                     :      thread::SpinLock::LockGuard guard(lock_);
        4490 18.6323 :      for(size_t i = 0; i < CPU_CACHE_SIZE; i++) {
         228  0.9461 :        if(entries[i].name == name) {
                     :          entries[i].clear();
                     :        }
                     :      }
                     :    }
    
    After:
      $ opannotate --merge all image:/home/ryoqun/rubinius-master/bin/rbx -t 1 \
                   --source
                     :    void clear(STATE, Symbol* name) {
                     :      thread::SpinLock::LockGuard guard(lock_);
         957  6.6648 :      for(size_t i = 0; i < CPU_CACHE_SIZE; i++) {
         687  4.7845 :        if(entry_names[i] == name) {
                     :          entry_names[i] = NULL;
           1  0.0070 :          entries[i].clear();
                     :        }
                     :      }
                     :    }
    
    OProfile's opreport results (after running "./bin/rbx -e nil" several times)
    
    Before:
      $ opreport --merge all image:/home/ryoqun/rubinius-master/bin/rbx --symbols -t 1
      samples  %        symbol name
      1105     19.4611  rubinius::System::vm_reset_method_cache(rubinius::State*, rubinius::Symbol*)
      770      13.5611  rubinius::SymbolTable::lookup(char const*, unsigned long, unsigned int)
      563       9.9155  rubinius::VMMethod::interpreter(rubinius::State*, rubinius::VMMethod*, rubinius::InterpreterCallFrame*)
      272       4.7904  rubinius::BakerGC::saw_object(rubinius::Object*)
      201       3.5400  rubinius::InlineCacheRegistry::clear(rubinius::State*, rubinius::Symbol*)
    
    After:
      $ opreport --merge all image:/home/ryoqun/rubinius-master/bin/rbx --symbols -t 1
      samples  %        symbol name
      2375     12.4190  rubinius::SymbolTable::lookup(char const*, unsigned long, unsigned int)
      2101     10.9862  rubinius::VMMethod::interpreter(rubinius::State*, rubinius::VMMethod*, rubinius::InterpreterCallFrame*)
      2099     10.9757  rubinius::System::vm_reset_method_cache(rubinius::State*, rubinius::Symbol*)
      1073      5.6108  rubinius::BakerGC::saw_object(rubinius::Object*)
      822       4.2983  rubinius::InlineCacheRegistry::clear(rubinius::State*, rubinius::Symbol*)
  2. @dbussink

    Merge pull request #1737 from ryoqun/libffi-with-clang

    dbussink committed
    Fix libffi build issue with Clang
  3. Remove an unneeded C-style cast

    committed
  4. @dbussink
  5. @dbussink

    Remove unused LLVM file

    dbussink committed
  6. @dbussink
Commits on May 21, 2012
  1. @ileitch
  2. @ileitch

    Exit after -Xconfig.print

    ileitch committed
  3. Fix libffi build issue with Clang

    committed
    This cherry-picks a commit by hand to fix a libffi build failure with clang.
    In particular, I applied the following patch from the official libffi
    repository:
      https://github.com/atgreen/libffi/blob/master/patches/x86_pcrel_test
    
    References:
      http://bugs.python.org/issue12812
      https://bugzilla.mozilla.org/show_bug.cgi?id=631928
      http://sourceware.org/ml/libffi-discuss/2011/msg00024.html
  4. @ileitch
Commits on May 20, 2012
  1. @ileitch
  2. @ileitch

    Fix IO#popen tags.

    ileitch committed
  3. @dbussink
  4. @dbussink

    Update to libffi 3.0.11

    dbussink committed
  5. Don't use unions for cmsghdr

    committed
    Work around build issues on mac instroduced this commmit:
      e2e7b25 Use union instead of struct for cmsghdr
    
    Reference:
      http://alas.matf.bg.ac.rs/manuals/lspe/snode=153.html
  6. Use union instead of struct for cmsghdr

    committed
    Use of struct with cmsghdr and pad is a GNU extension. When built with
    Clang, warnings are issued as such. So take the union approach instead.
    
    To fix this, I used an example at:
      http://www.rootr.net/man/man/CMSG_SPACE
    
    This is a second try to fix clang warnings in io.cpp. The reverted first try
    was:
      a9648cf Ignore all GNU-extension warnings
    
    As an alternative approach to it, I fixed the code itself.
  7. @Gibheer
  8. @Gibheer
Commits on May 19, 2012
  1. @nazgob

    Revert "fixed Rake deprecation warning"

    nazgob committed
    This reverts commit 95bb2fe.
  2. @ileitch
  3. @dbussink

    Revert "Ignore all GNU-extension warnings"

    dbussink committed
    This reverts commit a9648cf.
  4. Regenerated Rapa

    committed
  5. Ignore all GNU-extension warnings

    committed
    This commit suppresses following warnings from Clang:
      vm/builtin/io.cpp:1101:22: error: field 'hdr' with variable sized type
        'struct cmsghdr' not at the end of a struct or class is a GNU extension
        [-Werror,-Wgnu]
            struct cmsghdr hdr;
                           ^
      vm/builtin/io.cpp:1146:22: error: field 'hdr' with variable sized type
        'struct cmsghdr' not at the end of a struct or class is a GNU extension
        [-Werror,-Wgnu]
            struct cmsghdr hdr;
                           ^
      2 errors generated.
  6. @nazgob

    fixed Rake deprecation warning

    nazgob committed
Something went wrong with that request. Please try again.