Граф коммитов

33347 Коммитов

Автор SHA1 Сообщение Дата
zzak 2cfdbd7d72 * ext/objspace/object_tracing.c: [DOC] trace_object_allocations_stop
By @srawlins [Fixes GH-421] https://github.com/ruby/ruby/pull/421


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 17:44:43 +00:00
zzak 8adbcb6634 * lib/net/ftp.rb: [DOC] Document Net::FTP.mdtm and .set_socket and fix
spelling typo, based on patch by @artfuldodger [Fixes GH-426]
  https://github.com/ruby/ruby/pull/426


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 17:38:18 +00:00
zzak 6720c0aeeb * array.c: [DOC] Add note about negative indices in Array overview
By @ckaenzig [Fixes GH-427] https://github.com/ruby/ruby/pull/427


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 17:15:49 +00:00
zzak bceb856986 * lib/csv.rb: [DOC] Fix typo in CSV.parse_line by @funky-bibimbap
[Fixes GH-430] https://github.com/ruby/ruby/pull/430


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 17:10:34 +00:00
hsbt 721ec2272c typo [Fixes GH-435] PAtch by @zed-0xff https://github.com/ruby/ruby/pull/435
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 17:02:56 +00:00
svn d702ec4af6 * 2013-11-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 16:03:54 +00:00
zzak b393aeb055 * golf_prelude.rb: syntax formatting for whitespace [Fixes GH-425]
Patch by @edward https://github.com/ruby/ruby/pull/425


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 16:03:48 +00:00
ko1 a6698bc676 * gc.c: modify malloc_limit strategy.
* fix default vaues:
    GC_MALLOC_LIMIT_GROWTH_FACTOR
    GC_MALLOC_LIMIT: 8MB -> 16MB
    GC_MALLOC_LIMIT_MAX: 384MB -> 32MB
  * algorithm of malloc_limit increment.
    if (malloc_increase < malloc_limit) {
      next_malloc_limit = malloc_limit * factor
      if (malloc_limit > malloc_limit_max) {
        malloc_limit = malloc_increase
      }
    }
    This algorithm change malloc_limit from
    16MB -> 32MB slowly.
    If malloc_limit exceeds malloc_limit_max, then
    increase with malloc_increase.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 10:45:01 +00:00
kazu 2d5233c0f5 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 06:51:09 +00:00
glass c2f3e600d0 * array.c (rb_ary_shuffle_bang): use RARRAY_PTR_USE() without WB
because there are not new relations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 02:08:36 +00:00
glass cf0838f414 * array.c (rb_ary_sample): use rb_ary_dup().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 01:37:34 +00:00
nobu cf5ef3db5e vm_trace.c: isolate errinfo in trace blocks
* vm_trace.c (rb_threadptr_exec_event_hooks_orig): errinfo should not
  be propagated to trace blocks so that no argument raise does not
  throw internal objects.  [ruby-dev:47793] [Bug #9088]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-07 00:39:56 +00:00
svn 6f4b9376b3 * 2013-11-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 20:37:17 +00:00
nobu c9cb1b8e34 * .gdbinit (rp): fix flag name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 20:37:12 +00:00
tarui 01a7e7893b * gc.c (gc_before_sweep): Change algorithm of malloc_limit to
conservative for closing to memory consumption of ruby 2.0.

	* gc.c (GC_MALLOC_LIMIT, GC_MALLOC_LIMIT_GROWTH_FACTOR):
	  Adjust parameters for new algorithm.

	Example: make gcbench-rdoc on a pc
                              time       maxrss
	2.0.0p343             285.27     281853952
	trunk before patch    207.19     690405376
	trunk after patch     211.59     312500224


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 12:36:34 +00:00
glass 564a14e497 * array.c (rb_ary_shift_m): use RARRAY_PTR_USE() without WB because
there are not new relations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 12:20:39 +00:00
glass 27f2c267fd * array.c (rb_ary_reverse): use RARRAY_PTR_USE().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 12:09:31 +00:00
tarui a50ce9498c * common.mk (help): add texts about gcbench.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 10:32:40 +00:00
duerst d5f642ecc7 lib/open3.rb: tweaked grammar in comments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 07:32:56 +00:00
naruse e7194e9648 Suppress warnings: ambiguous first argument; put parentheses or even spaces
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 06:25:18 +00:00
naruse e3d72485ca Suppress warnings: File.exists? is a deprecated name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 06:23:29 +00:00
naruse 8e2a2a8a8d Suppress Warnings: instance variable @installed_by_version not initialized
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 06:23:27 +00:00
glass da10c47e49 * array.c (rb_ary_sample): use RARRAY_AREF() and RARRAY_PTR_USE()
instead of RARRAY_PTR().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 02:50:28 +00:00
glass e90e8b2ef6 * array.c (rb_ary_and): defer hash creation and some refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 01:39:55 +00:00
nobu 71b70f3cdf * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 00:21:05 +00:00
ko1 df6722d9fc * benchmark/bm_vm1_gc_short_lived.rb: added.
These GC benchmarks do not reflect practical applications.
  They are only for tuning.
* benchmark/bm_vm1_gc_short_with_complex_long.rb: added.
* benchmark/bm_vm1_gc_short_with_long.rb: added.
* benchmark/bm_vm1_gc_short_with_symbol.rb: added.
* benchmark/bm_vm1_gc_wb_ary.rb: added.
* benchmark/bm_vm1_gc_wb_obj.rb: added.
* benchmark/bm_vm_thread_queue.rb: added.
  Thie benchmark is added to know how fast C verion of thread.so.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 00:17:14 +00:00
ko1 3db0e56472 * gc.c: define RGENGC_ESTIMATE_OLDSPACE == 0 if USE_RGENGC is 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-06 00:14:26 +00:00
eregon adc4bb95f6 * benchmark/gc/gcbench.rb: fix typo of r43543
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 22:27:27 +00:00
ko1 8c6157e048 * gc.c (Init_GC): add GC::OPTS to show options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 22:13:51 +00:00
ko1 400a9a7bc2 * benchmark/gc/gcbench.rb: add some options to make quiet.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 22:13:08 +00:00
svn 4b7c15faa7 * 2013-11-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 19:15:46 +00:00
tenderlove 9ae2651d19 * ext/psych/lib/psych/visitors/to_ruby.rb: process merge keys before
reviving objects. Fixes GH psych #168
* test/psych/test_merge_keys.rb: test for change
  https://github.com/tenderlove/psych/issues/168

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 19:15:40 +00:00
akr 7835e321ea * test/ruby/test_thread.rb (test_thread_join_in_trap):
Run the test in a different process.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 12:25:15 +00:00
tarui 3ce802b79c * gc.c (is_live_object): A hidden object may be a live object.
[ruby-dev:47788] [Bug #9072]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 11:15:21 +00:00
nobu 7f23534b1f pty.c: check error of seteuid
* ext/pty/pty.c (chfunc): check error of seteuid and return error
  message, to suppress unused-value warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 08:10:34 +00:00
nobu b2f7e64caf test_command_processor.rb: clear tmpdir
* test/shell/test_command_processor.rb (TestShell#teardown): should
  not leave temporary directories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 08:10:32 +00:00
nobu 9d2c2c2b46 eval_intern.h: rename prefix
* eval_intern.h (rb_threadptr_tag_state, rb_threadptr_tag_jump):
  rename prefix ruby as rb, same as other rb_threadptr functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 07:56:51 +00:00
nobu f08c697cd4 eval.c: suppress warning
* eval.c (rb_protect): get rid of false clobbered warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 07:56:49 +00:00
nobu 8a9dff36c3 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 07:48:31 +00:00
ko1 692aab9010 fix typos in ChangeLog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 04:52:10 +00:00
ko1 d1674ef67b * gc.c: add support to estimate increase of oldspace memory usage.
This is another approach to solve an issue discussed at r43530.
  This feature is diabled as default.
  This feature measures an increment of memory consuption by oldgen
  objects. It measures memory consumption for each objects when
  the object is promoted. However, measurement of memory consumption
  is not accurate now. So that this measurement is `estimation'.
  To implement this feature, move memsize_of() function from
  ext/objspace/objspace.c and expose rb_obj_memsize_of().
  Some memsize() functions for T_DATA (T_TYPEDDATA) have problem to
  measure memory size, so that we ignores T_DATA objects now.
  For example, some functions skip NULL check for pointer.
  The macro RGENGC_ESTIMATE_OLDSPACE enables/disables this feature,
  and turned off as default.
  We need to compare 3gen GC and this feature carefully.
  (it is possible to enable both feature)
  We need a help to compare them.
* internal.h: expose rb_obj_memsize_of().
* ext/objspace/objspace.c: use rb_obj_memsize_of() function.
* cont.c (fiber_memsize): fix to check NULL.
* variable.c (autoload_memsize): ditto.
* vm.c (vm_memsize): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-05 04:51:01 +00:00
ko1 5ba523967e * gc.c (GC_MALLOC_LIMIT_MAX): fix default value 512MB -> 384MB.
512MB is huge.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 19:04:06 +00:00
ko1 325d2cfcdf * gc.c: add 3gen GC patch, but disabled as default.
RGenGC is designed as 2 generational GC, young and old generation.
  Young objects will be promoted to old objects after one GC.
  Old objects are not collect until major (full) GC.
  The issue of this approach is some objects can promoted as old
  objects accidentally and not freed until major GC.
  Major GC is not frequently so short-lived but accidentally becoming
  old objects are not freed.
  For example, the program "loop{Array.new(1_000_000)}" consumes huge
  memories because short lived objects (an array which has 1M
  elements) are promoted while GC and they are not freed before major
  GC.
  To solve this problem, generational GC with more generations
  technique is known. This patch implements three generations gen GC.
  At first, newly created objects are "Infant" objects.
  After surviving one GC, "Infant" objects are promoted to "Young"
  objects.
  "Young" objects are promoted to "Old" objects after surviving
  next GC.
  "Infant" and "Young" objects are collected if it is not marked
  while minor GC. So that this technique solves this problem.
  Representation of generations:
  * Infant: !FL_PROMOTED and !oldgen_bitmap [00]
  * Young :  FL_PROMOTED and !oldgen_bitmap [10]
  * Old   :  FL_PROMOTED and  oldgen_bitmap [11]
  The macro "RGENGC_THREEGEN" enables/disables this feature, and
  turned off as default because there are several problems.
  (1) Failed sometimes (Heisenbugs).
  (2) Performance down.
      Especially on write barriers. We need to detect Young or Old
      object by oldgen_bitmap. It is slower than checking flags.
  To evaluate this feature on more applications, I commit this patch.
  Reports are very welcome.
  This patch includes some refactoring (renaming names, etc).
* include/ruby/ruby.h: catch up 3gen GC.
* .gdbinit: fix to show a prompt "[PROMOTED]" for promoted objects.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 18:59:33 +00:00
ko1 30456e9607 * node.h: catch up comments for last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 15:06:14 +00:00
svn 8cb2cc5523 * 2013-11-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 15:04:20 +00:00
ko1 42bd731dc5 * include/ruby/ruby.h: rename FL_OLDGEN to FL_PROMOTED.
This flag represents that "this object is promoted at least once."
* gc.c, debug.c, object.c: catch up this change.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 15:04:10 +00:00
akr 7a3f2845df * test/xmlrpc: Don't use fixed ports: 8070 and 8071.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 13:21:53 +00:00
kazu c7ea716d27 fix a typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 07:17:47 +00:00
akr 445b04d18d * test/xmlrpc/webrick_testing.rb (start_server): Initialize the server
at main thread to fail early.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 06:27:54 +00:00
svn f7a4b3de1b * 2013-11-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-04 01:08:26 +00:00