This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
methodmissing:google-perftools-1.5 lourens$ make | |
/bin/sh ./libtool --tag=CXX --mode=link g++ -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -g -O2 -no-undefined -o libtcmalloc_minimal.la -rpath /opt/local/lib -D_THREAD_SAFE libtcmalloc_minimal_la-tcmalloc.lo libtcmalloc_minimal_internal.la | |
rm -fr .libs/libtcmalloc_minimal.lax | |
rm -fr .libs/libtcmalloc_minimal.lax | |
mkdir .libs/libtcmalloc_minimal.lax | |
rm -fr .libs/libtcmalloc_minimal.lax/libtcmalloc_minimal_internal.a | |
mkdir .libs/libtcmalloc_minimal.lax/libtcmalloc_minimal_internal.a | |
Extracting /Users/lourens/installs/google-perftools-1.5/./.libs/libtcmalloc_minimal_internal.a | |
(cd .libs/libtcmalloc_minimal.lax/libtcmalloc_minimal_internal.a && ar x /Users/lourens/installs/google-perftools-1.5/./.libs/libtcmalloc_minimal_internal.a) | |
g++ -dynamiclib -o .libs/libtcmalloc_minimal.0.0.0.dylib .libs/libtcmalloc_minimal_la-tcmalloc.o .libs/libtcmalloc_minimal.lax/libtcmalloc_minimal_internal.a/atomicops-internals-x86.o .libs/libtcmalloc_minima |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void * | |
alloc_ruby_heap_with_file(size_t size) | |
{ | |
FileHeapAllocatorMetaData meta; | |
meta.fd = open("/dev/zero", O_RDONLY); | |
meta.size = size; | |
if (meta.fd == -1) { | |
return NULL; | |
} else { | |
void *memory = mmap(NULL, size + sizeof(meta), PROT_READ | PROT_WRITE, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GC.enable_stats | |
class S | |
def initialize(a) | |
@a = a | |
end | |
end | |
ITER = 5 | |
Benchmark.bmbm do |results| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
methodmissing:rubyenterpriseedition187-248 lourens$ ./ruby -Ilib obj_hash_bench.rb | |
Rehearsal --------------------------------------------------- | |
Hash#[:array] 0.030000 0.000000 0.030000 ( 0.032720) | |
Hash#[:bignum] 0.030000 0.000000 0.030000 ( 0.028503) | |
Hash#[:hash] 0.030000 0.000000 0.030000 ( 0.031888) | |
Hash#[:numeric] 0.030000 0.000000 0.030000 ( 0.032113) | |
Hash#[:range] 0.030000 0.000000 0.030000 ( 0.031008) | |
Hash#[:time] 0.030000 0.000000 0.030000 ( 0.030119) | |
Hash#[:rexp] 0.030000 0.000000 0.030000 ( 0.030865) | |
Hash#[:string] 0.040000 0.000000 0.040000 ( 0.033808) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
methodmissing:rubyenterpriseedition187-248 lourens$ ./ruby -Ilib obj_hash_bench.rb | |
Rehearsal --------------------------------------------------- | |
Hash#[:array] 0.030000 0.000000 0.030000 ( 0.030316) | |
Hash#[:bignum] 0.030000 0.000000 0.030000 ( 0.027775) | |
Hash#[:hash] 0.030000 0.000000 0.030000 ( 0.030893) | |
Hash#[:numeric] 0.030000 0.000000 0.030000 ( 0.030195) | |
Hash#[:range] 0.030000 0.000000 0.030000 ( 0.029430) | |
Hash#[:time] 0.030000 0.000000 0.030000 ( 0.029966) | |
Hash#[:rexp] 0.030000 0.000000 0.030000 ( 0.029690) | |
Hash#[:string] 0.030000 0.000000 0.030000 ( 0.032869) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/eval.c b/eval.c | |
index 057afd9..aa50cb5 100644 | |
--- a/eval.c | |
+++ b/eval.c | |
@@ -371,69 +371,10 @@ struct cache_entry { /* method hash table. */ | |
static struct cache_entry cache[CACHE_SIZE]; | |
static int ruby_running = 0; | |
-void | |
-rb_clear_cache() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sched_yield() = 0 | |
sched_yield() = 0 | |
sched_yield() = 0 | |
sched_yield() = 0 | |
sched_yield() = 0 | |
sched_yield() = 0 | |
sched_yield() = 0 | |
sched_yield() = 0 | |
sched_yield() = 0 | |
sched_yield() = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/configure.in b/configure.in | |
index ac63760..5897782 100644 | |
--- a/configure.in | |
+++ b/configure.in | |
@@ -669,6 +669,24 @@ if test "$use_setreuid" = yes; then | |
AC_DEFINE(USE_SETREUID) | |
AC_DEFINE(USE_SETREGID) | |
fi | |
+ | |
+AC_ARG_ENABLE(threaded-dispatch, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L1622: | |
# basic block 74 | |
movq -112(%rbp), %rax | |
movq %rax, _ruby_current_node(%rip) | |
movq -112(%rbp), %rax | |
movq (%rax), %rax | |
shrq $12, %rax | |
andl $255, %eax | |
cltq | |
leaq 0(,%rax,8), %rdx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/configure.in b/configure.in | |
index ac63760..0211b14 100644 | |
--- a/configure.in | |
+++ b/configure.in | |
@@ -669,6 +669,24 @@ if test "$use_setreuid" = yes; then | |
AC_DEFINE(USE_SETREUID) | |
AC_DEFINE(USE_SETREGID) | |
fi | |
+ | |
+AC_ARG_ENABLE(threaded-dispatch, |