* benchmark/gc/gcbench.rb: print HWM (high water mark) if possible.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-11-01

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c (rb_mutex_struct): reduce rb_mutex_t size by 8 bytes
  on 64bit platform. Patch by Eric Wong. [Feature #9068][ruby-core:58114]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
load.c: use local variable

* load.c (rb_load_internal): use local variable th instead of
  GET_THREAD() for each time.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
load.c: suppress warning

* load.c (rb_load_internal): split to suppress false "clobbered"
  warning by gcc 4.4.5.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c: export rb_str_scrub

* string.c (rb_str_scrub): export with fixed length arguments, and
  allow nil as replacement string instead of omitting.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_m17n.rb: nil replacement

* test/ruby/test_m17n.rb (test_scrub, test_scrub_bang): now explicit
  nil is allowed as replacement.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
gc.c: zombie is not alive

* gc.c (is_live_object): finalizer may not run because of lazy-sweep.
  [ruby-dev:47786] [Bug #9069]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c: fix typo

* string.c (rb_str_scrub): fix typo, should yield invalid byte
  sequence to be scrubbed.  reported by znz at IRC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
transcode.c: fix segv in String.encode!

* transcode.c (str_transcode0): fix segv in String.encode!.  now
  rb_str_scrub() can return nil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	* gc.c (typedef struct rb_objspace): Refactoring. Move some members
	  into profile member.

	* gc.c (newobj_of): Correspond to the above.

	* gc.c (finalize_list): Ditto.

	* gc.c (objspace_live_num): Ditto.

	* gc.c (gc_page_sweep): Ditto.

	* gc.c (rb_gc_force_recycle): Ditto.

	* gc.c (garbage_collect_body): Ditto.

	* gc.c (rb_gc_count): Ditto.

	* gc.c (gc_stat): Ditto.

	* gc.c (gc_prof_set_heap_info): Ditto.

	* gc.c (gc_profile_dump_on): Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	* gc.c (make_deferred): Refactoring. Collect codes which should be
	  atomic.

	* gc.c (make_io_deferred, obj_free, rb_objspace_call_finalizer,
	  gc_page_sweep): Correspond to the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_m17n.rb: fix encoding

* test/ruby/test_m17n.rb (test_scrub): fix expected encoding, for
  non-UTF-8 environment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	* gc.c (struct heap_page, gc_page_sweep, gc_sweep): Refactoring for
	  performance. Add before_sweep condition to heap_page structure.

	* gc.c (rb_gc_force_recycle): Use before_sweep member.

	* gc.c (heap_is_before_sweep, is_before_sweep): Remove. They has not
	  already been used.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
gc.c: mark live objects only

* gc.c (wmap_mark_map): mark live objects only, but delete zombies.
  [ruby-dev:47787] [Bug #9069]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix typo

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/logger.rb: Inter-process locking for log rotation
  Current implementation fails log rotation on multi process env.
  by sonots <sonots@gmail.com>
  https://github.com/ruby/ruby/pull/428 fix GH-428 [Bug #9046]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-11-02

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
logger.rb: fix r43511 for Windows

* lib/logger.rb (Logger::LogDevice::LogDeviceMutex#lock_shift_log):
  open file can't be removed or renamed on Windows.  [ruby-dev:47790]
  [Bug #9046]
* test/logger/test_logger.rb (TestLogDevice#run_children): don't use
  fork.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
load.c: defer initalization of static-linked-ext

* load.c (rb_feature_p): deal with default loadable suffixes.
* load.c (load_lock): initialize statically linked extensions.
* load.c (search_required, rb_require_safe): deal with statically
  linked extensions.
* load.c (ruby_init_ext): defer initalization of statically linked
  extensions until required actually.  [Bug #8883]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e