Permalink
Browse files

Merge pull request #1457 from skaes/patches-for-193p374

added railsexpress patches for the latest 1.9.3 patch level (374)
  • Loading branch information...
2 parents a7fa0f1 + 5c6fe91 commit 4d26302e57f43d2b8c6e9ae3960c43e8ee05c11f @richo richo committed Jan 20, 2013
Showing with 7,824 additions and 88 deletions.
  1. +1 −1 patches/ruby/1.9.3/head/railsexpress/01-fix-make-clean.patch
  2. +41 −41 patches/ruby/1.9.3/head/railsexpress/02-railsbench-gc.patch
  3. +2 −2 patches/ruby/1.9.3/head/railsexpress/04-fork-support-for-gc-logging.patch
  4. +4 −4 patches/ruby/1.9.3/head/railsexpress/05-track-live-dataset-size.patch
  5. +11 −11 patches/ruby/1.9.3/head/railsexpress/07-export-a-few-more-symbols-for-ruby-prof.patch
  6. +5 −5 patches/ruby/1.9.3/head/railsexpress/08-thread-variables.patch
  7. +4 −4 patches/ruby/1.9.3/head/railsexpress/09-faster-loading.patch
  8. +10 −16 patches/ruby/1.9.3/head/railsexpress/10-falcon-st-opt.patch
  9. +4 −4 patches/ruby/1.9.3/head/railsexpress/11-falcon-sparse-array.patch
  10. +13 −0 patches/ruby/1.9.3/p374/railsexpress/01-fix-make-clean.patch
  11. +1,235 −0 patches/ruby/1.9.3/p374/railsexpress/02-railsbench-gc.patch
  12. +15 −0 patches/ruby/1.9.3/p374/railsexpress/03-display-more-detailed-stack-trace.patch
  13. +68 −0 patches/ruby/1.9.3/p374/railsexpress/04-fork-support-for-gc-logging.patch
  14. +45 −0 patches/ruby/1.9.3/p374/railsexpress/05-track-live-dataset-size.patch
  15. +13 −0 patches/ruby/1.9.3/p374/railsexpress/06-webrick_204_304_keep_alive_fix.patch
  16. +84 −0 patches/ruby/1.9.3/p374/railsexpress/07-export-a-few-more-symbols-for-ruby-prof.patch
  17. +319 −0 patches/ruby/1.9.3/p374/railsexpress/08-thread-variables.patch
  18. +747 −0 patches/ruby/1.9.3/p374/railsexpress/09-faster-loading.patch
  19. +2,302 −0 patches/ruby/1.9.3/p374/railsexpress/10-falcon-st-opt.patch
  20. +2,588 −0 patches/ruby/1.9.3/p374/railsexpress/11-falcon-sparse-array.patch
  21. +301 −0 patches/ruby/1.9.3/p374/railsexpress/12-falcon-array-queue.patch
  22. +12 −0 patchsets/ruby/1.9.3/p374/railsexpress
@@ -1,5 +1,5 @@
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
-index 08053a9..361fd08 100644
+index 7c706e8..c381a38 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -2191,7 +2191,7 @@ def init_mkmf(config = CONFIG, rbconfig = RbConfig::CONFIG)
@@ -14,10 +14,10 @@ index c64d981..6099a92 100644
dnl build section {
diff --git a/gc.c b/gc.c
-index e38930d..c728587 100644
+index f307ecb..0be1ec9 100644
--- a/gc.c
+++ b/gc.c
-@@ -97,6 +97,15 @@ ruby_gc_params_t initial_params = {
+@@ -98,6 +98,15 @@ ruby_gc_params_t initial_params = {
#endif
};
@@ -33,7 +33,7 @@ index e38930d..c728587 100644
#define nomem_error GET_VM()->special_exceptions[ruby_error_nomemory]
#if SIZEOF_LONG == SIZEOF_VOIDP
-@@ -301,7 +310,7 @@ typedef struct RVALUE {
+@@ -302,7 +311,7 @@ typedef struct RVALUE {
struct RComplex complex;
} as;
#ifdef GC_DEBUG
@@ -42,7 +42,7 @@ index e38930d..c728587 100644
int line;
#endif
} RVALUE;
-@@ -371,11 +380,25 @@ typedef struct rb_objspace {
+@@ -372,11 +381,25 @@ typedef struct rb_objspace {
size_t free_min;
size_t final_num;
size_t do_heap_free;
@@ -68,7 +68,7 @@ index e38930d..c728587 100644
} flags;
struct {
st_table *table;
-@@ -392,6 +415,14 @@ typedef struct rb_objspace {
+@@ -393,6 +416,14 @@ typedef struct rb_objspace {
struct gc_list *global_list;
size_t count;
int gc_stress;
@@ -83,7 +83,7 @@ index e38930d..c728587 100644
} rb_objspace_t;
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
-@@ -414,6 +445,16 @@ int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
+@@ -415,6 +446,16 @@ int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
#define heaps_freed objspace->heap.freed
#define dont_gc objspace->flags.dont_gc
#define during_gc objspace->flags.during_gc
@@ -100,7 +100,7 @@ index e38930d..c728587 100644
#define finalizer_table objspace->final.table
#define deferred_final_list objspace->final.deferred
#define global_List objspace->global_list
-@@ -421,6 +462,14 @@ int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
+@@ -422,6 +463,14 @@ int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress;
#define initial_malloc_limit initial_params.initial_malloc_limit
#define initial_heap_min_slots initial_params.initial_heap_min_slots
#define initial_free_min initial_params.initial_free_min
@@ -115,7 +115,7 @@ index e38930d..c728587 100644
static void rb_objspace_call_finalizer(rb_objspace_t *objspace);
-@@ -443,24 +492,59 @@ static void init_mark_stack(mark_stack_t *stack);
+@@ -444,24 +493,59 @@ static void init_mark_stack(mark_stack_t *stack);
void
rb_gc_set_params(void)
{
@@ -182,7 +182,7 @@ index e38930d..c728587 100644
if (RTEST(ruby_verbose))
fprintf(stderr, "heap_min_slots=%d (%d)\n",
heap_min_slots_i, initial_heap_min_slots);
-@@ -470,15 +554,42 @@ rb_gc_set_params(void)
+@@ -471,15 +555,42 @@ rb_gc_set_params(void)
}
}
@@ -228,7 +228,7 @@ index e38930d..c728587 100644
}
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
-@@ -775,6 +886,11 @@ vm_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
+@@ -776,6 +887,11 @@ vm_malloc_fixup(rb_objspace_t *objspace, void *mem, size_t size)
mem = (size_t *)mem + 1;
#endif
@@ -240,7 +240,7 @@ index e38930d..c728587 100644
return mem;
}
-@@ -835,6 +951,13 @@ vm_xrealloc(rb_objspace_t *objspace, void *ptr, size_t size)
+@@ -836,6 +952,13 @@ vm_xrealloc(rb_objspace_t *objspace, void *ptr, size_t size)
mem = (size_t *)mem + 1;
#endif
@@ -254,15 +254,15 @@ index e38930d..c728587 100644
return mem;
}
-@@ -916,7 +1039,6 @@ ruby_xfree(void *x)
+@@ -917,7 +1040,6 @@ ruby_xfree(void *x)
vm_xfree(&rb_objspace, x);
}
-
/*
* call-seq:
* GC.enable -> true or false
-@@ -962,6 +1084,455 @@ rb_gc_disable(void)
+@@ -963,6 +1085,455 @@ rb_gc_disable(void)
return old ? Qtrue : Qfalse;
}
@@ -718,7 +718,7 @@ index e38930d..c728587 100644
VALUE rb_mGC;
void
-@@ -1033,6 +1604,12 @@ allocate_sorted_heaps(rb_objspace_t *objspace, size_t next_heaps_length)
+@@ -1034,6 +1605,12 @@ allocate_sorted_heaps(rb_objspace_t *objspace, size_t next_heaps_length)
static void
assign_heap_slot(rb_objspace_t *objspace)
{
@@ -731,15 +731,15 @@ index e38930d..c728587 100644
RVALUE *p, *pend, *membase;
struct heaps_slot *slot;
size_t hi, lo, mid;
-@@ -1094,6 +1671,7 @@ assign_heap_slot(rb_objspace_t *objspace)
+@@ -1095,6 +1672,7 @@ assign_heap_slot(rb_objspace_t *objspace)
if (lomem == 0 || lomem > p) lomem = p;
if (himem < pend) himem = pend;
heaps_used++;
+ heap_size += objs;
while (p < pend) {
p->as.free.flags = 0;
-@@ -1150,7 +1728,7 @@ initial_expand_heap(rb_objspace_t *objspace)
+@@ -1151,7 +1729,7 @@ initial_expand_heap(rb_objspace_t *objspace)
static void
set_heaps_increment(rb_objspace_t *objspace)
{
@@ -748,7 +748,7 @@ index e38930d..c728587 100644
if (next_heaps_length == heaps_used) {
next_heaps_length++;
-@@ -1183,6 +1761,22 @@ rb_during_gc(void)
+@@ -1184,6 +1762,22 @@ rb_during_gc(void)
#define RANY(o) ((RVALUE*)(o))
@@ -771,7 +771,7 @@ index e38930d..c728587 100644
VALUE
rb_newobj(void)
{
-@@ -1214,9 +1808,11 @@ rb_newobj(void)
+@@ -1215,9 +1809,11 @@ rb_newobj(void)
MEMZERO((void*)obj, RVALUE, 1);
#ifdef GC_DEBUG
@@ -784,7 +784,7 @@ index e38930d..c728587 100644
GC_PROF_INC_LIVE_NUM;
return obj;
-@@ -1768,6 +2364,12 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
+@@ -1769,6 +2365,12 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
{
register RVALUE *obj = RANY(ptr);
@@ -797,7 +797,7 @@ index e38930d..c728587 100644
goto marking; /* skip */
again:
-@@ -1778,6 +2380,12 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
+@@ -1779,6 +2381,12 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr)
obj->as.basic.flags |= FL_MARK;
objspace->heap.live_num++;
@@ -810,7 +810,7 @@ index e38930d..c728587 100644
marking:
if (FL_TEST(obj, FL_EXIVAR)) {
rb_mark_generic_ivar(ptr);
-@@ -2120,6 +2728,25 @@ free_unused_heaps(rb_objspace_t *objspace)
+@@ -2121,6 +2729,25 @@ free_unused_heaps(rb_objspace_t *objspace)
}
}
@@ -836,7 +836,7 @@ index e38930d..c728587 100644
static void
slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
{
-@@ -2127,14 +2754,23 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
+@@ -2128,14 +2755,23 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
RVALUE *p, *pend;
RVALUE *free = freelist, *final = deferred_final_list;
int deferred;
@@ -860,7 +860,7 @@ index e38930d..c728587 100644
p->as.free.flags = T_ZOMBIE;
RDATA(p)->dfree = 0;
}
-@@ -2144,6 +2780,10 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
+@@ -2145,6 +2781,10 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
final_num++;
}
else {
@@ -871,7 +871,7 @@ index e38930d..c728587 100644
add_freelist(objspace, p);
free_num++;
}
-@@ -2151,13 +2791,22 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
+@@ -2152,13 +2792,22 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
else if (BUILTIN_TYPE(p) == T_ZOMBIE) {
/* objects to be finalized */
/* do nothing remain marked */
@@ -895,7 +895,7 @@ index e38930d..c728587 100644
objspace->heap.free_num > objspace->heap.do_heap_free) {
RVALUE *pp;
-@@ -2168,6 +2817,8 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
+@@ -2169,6 +2818,8 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
sweep_slot->limit = final_num;
freelist = free; /* cancel this page from freelist */
unlink_heap_slot(objspace, sweep_slot);
@@ -904,7 +904,7 @@ index e38930d..c728587 100644
}
else {
objspace->heap.free_num += free_num;
-@@ -2180,6 +2831,10 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
+@@ -2181,6 +2832,10 @@ slot_sweep(rb_objspace_t *objspace, struct heaps_slot *sweep_slot)
RUBY_VM_SET_FINALIZER_INTERRUPT(th);
}
}
@@ -915,7 +915,7 @@ index e38930d..c728587 100644
}
static int
-@@ -2200,6 +2855,21 @@ ready_to_gc(rb_objspace_t *objspace)
+@@ -2201,6 +2856,21 @@ ready_to_gc(rb_objspace_t *objspace)
static void
before_gc_sweep(rb_objspace_t *objspace)
{
@@ -937,7 +937,7 @@ index e38930d..c728587 100644
freelist = 0;
objspace->heap.do_heap_free = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.65);
objspace->heap.free_min = (size_t)((heaps_used * HEAP_OBJ_LIMIT) * 0.2);
-@@ -2219,8 +2889,13 @@ before_gc_sweep(rb_objspace_t *objspace)
+@@ -2220,8 +2890,13 @@ before_gc_sweep(rb_objspace_t *objspace)
static void
after_gc_sweep(rb_objspace_t *objspace)
{
@@ -951,7 +951,7 @@ index e38930d..c728587 100644
if (objspace->heap.free_num < objspace->heap.free_min) {
set_heaps_increment(objspace);
heaps_increment(objspace);
-@@ -2233,6 +2908,29 @@ after_gc_sweep(rb_objspace_t *objspace)
+@@ -2234,6 +2909,29 @@ after_gc_sweep(rb_objspace_t *objspace)
malloc_increase = 0;
free_unused_heaps(objspace);
@@ -981,7 +981,7 @@ index e38930d..c728587 100644
}
static int
-@@ -2266,9 +2964,11 @@ rest_sweep(rb_objspace_t *objspace)
+@@ -2267,9 +2965,11 @@ rest_sweep(rb_objspace_t *objspace)
static void gc_marks(rb_objspace_t *objspace);
@@ -993,15 +993,15 @@ index e38930d..c728587 100644
int res;
INIT_GC_PROF_PARAMS;
-@@ -2290,7 +2990,6 @@ gc_lazy_sweep(rb_objspace_t *objspace)
+@@ -2291,7 +2991,6 @@ gc_lazy_sweep(rb_objspace_t *objspace)
GC_PROF_TIMER_STOP(Qfalse);
return res;
}
- after_gc_sweep(objspace);
}
else {
if (heaps_increment(objspace)) {
-@@ -2298,6 +2997,18 @@ gc_lazy_sweep(rb_objspace_t *objspace)
+@@ -2299,6 +2998,18 @@ gc_lazy_sweep(rb_objspace_t *objspace)
return TRUE;
}
}
@@ -1020,7 +1020,7 @@ index e38930d..c728587 100644
gc_marks(objspace);
-@@ -2306,6 +3017,10 @@ gc_lazy_sweep(rb_objspace_t *objspace)
+@@ -2307,6 +3018,10 @@ gc_lazy_sweep(rb_objspace_t *objspace)
set_heaps_increment(objspace);
}
@@ -1031,15 +1031,15 @@ index e38930d..c728587 100644
GC_PROF_SWEEP_TIMER_START;
if(!(res = lazy_sweep(objspace))) {
after_gc_sweep(objspace);
-@@ -2317,6 +3032,7 @@ gc_lazy_sweep(rb_objspace_t *objspace)
+@@ -2318,6 +3033,7 @@ gc_lazy_sweep(rb_objspace_t *objspace)
GC_PROF_SWEEP_TIMER_STOP;
GC_PROF_TIMER_STOP(Qtrue);
+
return res;
}
-@@ -2543,9 +3259,15 @@ gc_marks(rb_objspace_t *objspace)
+@@ -2544,9 +3260,15 @@ gc_marks(rb_objspace_t *objspace)
rb_thread_t *th = GET_THREAD();
GC_PROF_MARK_TIMER_START;
@@ -1056,7 +1056,7 @@ index e38930d..c728587 100644
SET_STACK_END;
-@@ -2577,11 +3299,15 @@ gc_marks(rb_objspace_t *objspace)
+@@ -2578,11 +3300,15 @@ gc_marks(rb_objspace_t *objspace)
gc_mark_stacked_objects(objspace);
GC_PROF_MARK_TIMER_STOP;
@@ -1072,7 +1072,7 @@ index e38930d..c728587 100644
INIT_GC_PROF_PARAMS;
if (GC_NOTIFY) printf("start garbage_collect()\n");
-@@ -2597,15 +3323,31 @@ garbage_collect(rb_objspace_t *objspace)
+@@ -2598,15 +3324,31 @@ garbage_collect(rb_objspace_t *objspace)
rest_sweep(objspace);
@@ -1104,7 +1104,7 @@ index e38930d..c728587 100644
return TRUE;
}
-@@ -3094,6 +3836,39 @@ rb_gc_call_finalizer_at_exit(void)
+@@ -3095,6 +3837,39 @@ rb_gc_call_finalizer_at_exit(void)
rb_objspace_call_finalizer(&rb_objspace);
}
@@ -1144,7 +1144,7 @@ index e38930d..c728587 100644
static void
rb_objspace_call_finalizer(rb_objspace_t *objspace)
{
-@@ -3408,6 +4183,49 @@ count_objects(int argc, VALUE *argv, VALUE os)
+@@ -3403,6 +4178,49 @@ count_objects(int argc, VALUE *argv, VALUE os)
return hash;
}
@@ -1194,7 +1194,7 @@ index e38930d..c728587 100644
/*
* call-seq:
* GC.count -> Integer
-@@ -3700,6 +4518,28 @@ Init_GC(void)
+@@ -3695,6 +4513,28 @@ Init_GC(void)
rb_define_singleton_method(rb_mGC, "stat", gc_stat, -1);
rb_define_method(rb_mGC, "garbage_collect", rb_gc_start, 0);
@@ -1223,7 +1223,7 @@ index e38930d..c728587 100644
rb_mProfiler = rb_define_module_under(rb_mGC, "Profiler");
rb_define_singleton_method(rb_mProfiler, "enabled?", gc_profile_enable_get, 0);
rb_define_singleton_method(rb_mProfiler, "enable", gc_profile_enable, 0);
-@@ -3713,6 +4553,9 @@ Init_GC(void)
+@@ -3708,6 +4548,9 @@ Init_GC(void)
rb_define_module_function(rb_mObSpace, "each_object", os_each_obj, -1);
rb_define_module_function(rb_mObSpace, "garbage_collect", rb_gc_start, 0);
@@ -1,8 +1,8 @@
diff --git a/gc.c b/gc.c
-index c728587..6b6c9f0 100644
+index 0be1ec9..c198770 100644
--- a/gc.c
+++ b/gc.c
-@@ -1344,6 +1344,34 @@ rb_gc_log_file(int argc, VALUE *argv, VALUE self)
+@@ -1345,6 +1345,34 @@ rb_gc_log_file(int argc, VALUE *argv, VALUE self)
}
/*
Oops, something went wrong.

0 comments on commit 4d26302

Please sign in to comment.