[#30589] [Bug #3391] Use single exclamation mark instead of double exclamation mark for IRB — Diego Viola <redmine@...>

Bug #3391: Use single exclamation mark instead of double exclamation mark for IRB

10 messages 2010/06/04

[#30672] [Bug #3411] Time.local 1916,5,1 #=> 1916-04-30 23:00:00 +0100 — Benoit Daloze <redmine@...>

Bug #3411: Time.local 1916,5,1 #=> 1916-04-30 23:00:00 +0100

12 messages 2010/06/08

[#30699] [Bug #3419] 1.9.2-preview3 possible bug with Rails 3 active_record sqlite_adapter — Joe Sak <redmine@...>

Bug #3419: 1.9.2-preview3 possible bug with Rails 3 active_record sqlite_adapter

9 messages 2010/06/09

[#30734] [Bug #3428] ri outputs ansi escape sequences even when stdout is not a tty — caleb clausen <redmine@...>

Bug #3428: ri outputs ansi escape sequences even when stdout is not a tty

11 messages 2010/06/11

[#30756] [Feature #3436] Spawn the timer thread lazily — Maximilian Gass <redmine@...>

Feature #3436: Spawn the timer thread lazily

15 messages 2010/06/13
[#32686] [Ruby 1.9-Feature#3436] Spawn the timer thread lazily — Mark Somerville <redmine@...> 2010/10/04

Issue #3436 has been updated by Mark Somerville.

[ruby-core:30835] [Bug #2553] Fix pthreads slowness by eliminating unnecessary sigprocmask calls

From: Motohiro KOSAKI <redmine@...>
Date: 2010-06-20 14:05:32 UTC
List: ruby-core #30835
Issue #2553 has been updated by Motohiro KOSAKI.


ruby 1.8.8 have the same issue.

$ autoconf && ./configure --disable-pthread && make 

$  time ./ruby -ve '1_000_000.times { x = 2 ** 256 }'
ruby 1.8.8dev (2010-06-15) [x86_64-linux]

real    0m1.176s
user    0m1.171s
sys     0m0.005s


$ autoconf && ./configure --enable-pthread && make

[kosaki@kosaopt ruby_1_8]$  time ./ruby -ve '1_000_000.times { x = 2 ** 256 }'
ruby 1.8.8dev (2010-06-15) [x86_64-linux]

real    0m1.513s
user    0m1.340s
sys     0m0.173s

$ strace -c  ./ruby -e '1_000_000.times { x = 2 ** 256 }'
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 99.98    0.160160           0   1000011           rt_sigprocmask
  0.02    0.000025           2        14           mprotect
  0.00    0.000000           0         8           read
  0.00    0.000000           0        19        10 open
  0.00    0.000000           0         9           close
  0.00    0.000000           0         4         3 stat
  0.00    0.000000           0         9           fstat
  0.00    0.000000           0        26           mmap
  0.00    0.000000           0         1           munmap
  0.00    0.000000           0         7           brk
  0.00    0.000000           0        14           rt_sigaction
  0.00    0.000000           0         1         1 access
  0.00    0.000000           0         1           execve
  0.00    0.000000           0         6           getrlimit
  0.00    0.000000           0         1           getuid
  0.00    0.000000           0         1           getgid
  0.00    0.000000           0         2           geteuid
  0.00    0.000000           0         2           getegid
  0.00    0.000000           0         1           arch_prctl
  0.00    0.000000           0         2         1 futex
  0.00    0.000000           0         1           set_tid_address
  0.00    0.000000           0         1           set_robust_list
------ ----------- ----------- --------- --------- ----------------
100.00    0.160185               1000141        15 total


summary of ruby_1_8 code

  node.h
  ------------------------------------------
  #if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
  #include <ucontext.h>
  #define USE_CONTEXT
  #endif
  #include <setjmp.h>
  #include "st.h"

The syscam can use getcontext(), USE_CONTEXT is always set.

  eval.c
  ------------------------------------------
  #ifdef USE_CONTEXT
  (snip)
  #  define ruby_setjmp(just_before_setjmp, j) ((j)->status = 0, \
       (just_before_setjmp), \
       PRE_GETCONTEXT, \
       getcontext(&(j)->context), \
       POST_GETCONTEXT, \
       (j)->status)

if USE_CONTEXT is defined, ruby_setjmp() mean to call getcontext().
and linux getcontext() implementation call rt_sigprocmask() internally.

----------------------------------------
http://redmine.ruby-lang.org/issues/show/2553

----------------------------------------
http://redmine.ruby-lang.org

In This Thread