Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Utility functions.

  • Loading branch information...
commit 2ed055463eeee11430cd88153c5a2ce241b447fd 1 parent 4802366
Evan Weaver authored
View
16 configure.in
@@ -152,11 +152,17 @@ AC_ARG_ENABLE(frame-address,
if test $frame_address = yes; then
AC_DEFINE(USE_BUILTIN_FRAME_ADDRESS)
fi
-AC_ARG_ENABLE(mbari-api,
- [ --enable-mbari-api enable API changes from the MBARI patches. ],
- [mbari_api=$enableval])
-if test "$mbari_api" = yes; then
- AC_DEFINE(MBARI_API)
+AC_ARG_ENABLE(trace-newobj,
+ [ --enable-trace-newobj enable rb_newobj tracer. ],
+ [trace_newobj=$enableval])
+if test "$trace_newobj" = yes; then
+ AC_DEFINE(TRACE_NEWOBJ)
+fi
+AC_ARG_ENABLE(gc-debug,
+ [ --enable-gc-debug enable additional GC API methods, debugging, and statistics. ],
+ [gc_debug=$enableval])
+if test "$gc_debug" = yes; then
+ AC_DEFINE(GC_DEBUG)
fi
AC_ARG_WITH(wipe-sites,
[ --with-wipe-sites=MASK override default STACK_WIPES_SITES mask in rubysig.h],
View
3  defines.h
@@ -51,6 +51,9 @@ void *xcalloc _((long,long));
void *xrealloc _((void*,long));
void xfree _((void*));
+#define likely(x) __builtin_expect((x),1)
+#define unlikely(x) __builtin_expect((x),0)
+
#if defined(__APPLE__)
#define USING_SYSTEM_ALLOCATOR_LIBRARY
#endif
View
8 distro/installer.rb
@@ -186,19 +186,19 @@ def ask_installation_prefix
end
def configure_tcmalloc
- return configure_autoconf_package('source/distro/google-perftools-1.4',
+ return configure_autoconf_package('source/distro/google-perftools-1.7',
'the memory allocator for Ruby Enterprise Edition',
'--disable-dependency-tracking')
end
def compile_tcmalloc
- Dir.chdir('source/distro/google-perftools-1.4') do
+ Dir.chdir('source/distro/google-perftools-1.7') do
return sh("make libtcmalloc_minimal.la")
end
end
def install_tcmalloc
- return install_autoconf_package('source/distro/google-perftools-1.4',
+ return install_autoconf_package('source/distro/google-perftools-1.7',
'the memory allocator for Ruby Enterprise Edition') do
sh("mkdir", "-p", "#{@destdir}#{@prefix}/lib") &&
# Remove existing .so files so that the copy operation doesn't
@@ -212,7 +212,7 @@ def install_tcmalloc
def configure_ruby
return configure_autoconf_package('source', 'Ruby Enterprise Edition',
- "--enable-mbari-api #{@extra_configure_args} " <<
+ "#{@extra_configure_args} " <<
"CFLAGS='-g -O2 #{ENV['CFLAGS']}'")
end
View
7 env.h
@@ -22,6 +22,9 @@ extern struct FRAME {
struct FRAME *prev;
struct FRAME *tmp;
struct RNode *node;
+#ifdef GC_DEBUG
+ source_position_t* source_pos;
+#endif
int iter;
int flags;
unsigned long uniq;
@@ -29,6 +32,10 @@ extern struct FRAME {
void rb_gc_mark_frame _((struct FRAME *));
+#ifdef GC_DEBUG
+void gc_debug_get_frame_source_pos(struct FRAME* frame);
+#endif
+
#define FRAME_DMETH 1
#define FRAME_FUNC 2
View
16 kiji-todo
@@ -0,0 +1,16 @@
+TODO:
+- fix build chain to properly include system_allocator
+- see if removing taint improves performance
+- investigate other types to go on the longlife
+
+DONE:
+- change marktable incremental clear to just dump the table
+- fix mutating strings remembered set corruption
+- correct allocation points for objects during parse
+- put any frozen string on the longlife
+- use st_foreach_map for copy-compacter
+- correct source file for C func
+- indicate the C files as (native)
+- refactor the two source position functions into one
+- macro for rb_newobj
+- attempt to remove NODE_NEWLINE (doesn't work)
View
10 util.c
@@ -644,6 +644,16 @@ ruby_strdup(str)
return tmp;
}
+/* Mask system strdup to fix tcmalloc issue on OS X*/
+#define strdup(s) strdup(s)
+char *
+strdup(str)
+ const char *str;
+{
+ return ruby_strdup(str);
+}
+#define strdup(s) ruby_strdup(s)
+
char *
ruby_getcwd()
{
View
1  util.h
@@ -54,6 +54,7 @@ void ruby_unsetenv _((const char*));
#define unsetenv(name,val) ruby_unsetenv(name);
char *ruby_strdup _((const char*));
+char *strdup _((const char*));
#undef strdup
#define strdup(s) ruby_strdup(s)
View
2  version.c
@@ -28,7 +28,7 @@ const char *ruby_copyright;
#define REE_VERSION "2010.02"
-#define KIJI_VERSION "0.9"
+#define KIJI_VERSION "0.11"
const char ruby_kiji_version[] = KIJI_VERSION;
void
Please sign in to comment.
Something went wrong with that request. Please try again.