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

58 Коммитов

Автор SHA1 Сообщение Дата
nobu 2e5422a28c .gdbinit: initialize
* .gdbinit (ruby_gdb_init): initialize enums.

* .gdbinit (rb_id2name): initialize debug info too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13 01:36:29 +00:00
tmm1 084b602d9a * include/ruby/ruby.h (struct RClass): Add wrapper struct around
RClass->m_tbl with serial. This prevents double marking method
  tables, since many classes/modules can share the same method table.
  This improves minor mark time in a large application by 30%.
* internal.h (struct method_table_wrapper): Define new
  wrapper struct with additional serial.
* internal.h (RCLASS_M_TBL_INIT): New macro for initializing method
  table wrapper and st_table.
* method.h (void rb_sweep_method_entry): Rename rb_free_m_table to
  rb_free_m_tbl for consistentcy
* .gdbinit (define rb_method_entry): Update rb_method_entry gdb helper
  for new method table structure.
* class.c: Use RCLASS_M_TBL_WRAPPER and
  RCLASS_M_TBL_INIT macros.
* class.c (rb_include_class_new): Share WRAPPER between module and
  iclass, so serial can prevent double marking.
* eval.c (rb_prepend_module): ditto.
* eval.c (rb_using_refinement): ditto.
* gc.c: Mark and free new wrapper struct.
* gc.c (obj_memsize_of): Count size of additional wrapper struct.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-03 08:11:07 +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
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
nobu 1ccdddb7e4 .gdbinit: insert a colon
* .gdbinit (rp): insert a colon between type "SYMBOL" and ID value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-27 02:18:07 +00:00
nobu aee98a1c2b .gdbinit: show ID type
* .gdbinit (rp_id): show ID type.

* template/id.h.tmpl (ruby_id_types): make enum for debugger.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20 04:53:08 +00:00
nobu a9534d1b48 .gdbinit: rp_string
* .gdbinit (rp_string): extract from rp.

* .gdbinit (rp_id): use rp_string to show the content.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20 04:53:06 +00:00
nobu 1bf8b67c4f .gdbinit: rp_id
* .gdbinit (rp_id): extract from rp and rb_id2name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-20 04:53:04 +00:00
nobu 4cdb8fd7ec .gdbinit: improve for displaying class/module
* .gdbinit (rp_class): show class name, if possible.

* .gdbinit (rb_ancestors): call rp_class directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-29 01:20:28 +00:00
nobu 5c143c97ef .gdbinit: follow classname() change
* .gdbinit (rb_classname): follow classname() change at r36584, which
  hash second argument now.  reported by 36584 via IRC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-29 01:20:24 +00:00
nobu 3016b65abf .gdbinit: initialize color sequences
* .gdbinit (hook-run): initialize color sequences for each runs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-07 04:38:50 +00:00
nobu 6aaf5c5ca0 * .gdbinit (rp): fix argument order.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 02:59:17 +00:00
nobu e2bd72d524 .gdbinit: revert colored prompt
* .gdbinit: revert colored prompt because incremental search does not
  work well with invisible sequence in prompt.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-17 07:56:57 +00:00
ktsj 11498d9b1e * .gdbinit (iseq): rename dummy_gdb_enums to ruby_dummy_gdb_enums.
This is follow up to changes in r24407.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 12:11:37 +00:00
nobu 3d490d209a .gdbinit: colorize
* .gdbinit: colorize prompt and output headers, so boundaries get
  clearer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-16 05:46:06 +00:00
nobu 977bec1236 .gdbinit: FLONUM support
* .gdbinit (rp): FLONUM support.
* include/ruby/ruby.h (ruby_special_consts): define FLONUM constants
  always, so that they are available from gdb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-06 05:49:51 +00:00
nobu 5f8dfdd9c7 rp_class rb_ancestors
* .gdbinit (rp_class): Print the content of a Class/Module.

* .gdbinit (rb_ancestors): Print ancestors.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-02 08:07:01 +00:00
nobu 5a7db50517 .gdbinit: improve rp for class
* .gdbinit (rp): improve for class/iclass/module so print content of
  RClass.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-22 15:51:41 +00:00
ko1 574024147b * .gdbinit (SDR): add SDR function. It's only for VM debugging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-10 20:24:43 +00:00
ko1 d556a47598 * .gdbinit: add function `trace_machine_instructions' to trace
in native machine assemble.
  See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
  for more details.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-07 06:54:24 +00:00
naruse 90d99ef1bd * .gdbinit (rb_ps_vm): follow st_table's packing change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-23 05:19:54 +00:00
nobu eec65961d0 * .gdbinit (rb_numtable_entry): update for recent refactoring of
st_table.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-08 07:44:08 +00:00
akr 0133aee46c * .gdbinit (rp): show type name for RTypedData.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-05 07:39:47 +00:00
akr 8bca09325d * .gdbinit (rp): detect and show RTypedData.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-05 01:04:15 +00:00
nobu 480b4d0a78 * .gdbinit (rp): mark singleton classes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-30 00:33:39 +00:00
nobu 80eda69d26 * .gdbinit (rb_method_entry): search method entry by class and id.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-19 06:17:31 +00:00
nobu 4aa1cfc2c3 * .gdbinit (rb_ps): dump all threads and their callstacks. based
on [ruby-core:26155] by Joshua ben Jore <twists AT gmail.com>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-19 02:34:40 +00:00
nobu a2d42dab14 * debug.c (ruby_dummy_gdb_enums): made public. [ruby-dev:39001]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-05 09:46:07 +00:00
nobu b1f3890b57 * .gdbinit (rp, iseq): load dummy_gdb_enums on demand.
[ruby-dev:38606]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-15 02:04:36 +00:00
nobu 1b4d0c76de * template/id.h.tmpl, id.h (enum ruby_method_ids): added some IDs.
* debug.c (dummy_gdb_enums): added enum ruby_method_ids.

* .gdbinit (rp): improved output of Symbol.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 13:17:54 +00:00
nobu 7427390cad .gdbinit (rp): missing "else" after T_NODE block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21 12:42:54 +00:00
akr 2a58eebd8f * .gdbinit (rp): show negative fixnum correctly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-30 10:04:51 +00:00
nobu 2a2cc2e9c4 * .gdbinit (iseq): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-13 14:33:48 +00:00
nobu d9be2059e5 * .gdbinit (dummy_gdb_enums.special_consts): forces to load debug
info on Mac OS X.

* .gdbinit (rp): added T_ZOMBIE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 08:08:44 +00:00
nobu e44aeea84a * .gdbinit (rp): fixed typo for T_STRUCT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09 03:08:49 +00:00
matz 1e8bbf3154 * .gdbinit (rp): REGEXP handling fixed.
* string.c (rb_str_rindex_m): need not to call rb_enc_check on
  regexp.

* re.c (unescape_escaped_nonascii): try ASCII-8BIT encoding for
  broken strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16 22:21:42 +00:00
yugui c86ce094e2 * include/ruby/ruby.h: embeds the elements of an array into its
struct RArray for # of elements <= 3.

	* array.c: ditto.

	* gc.c (gc_mark_children): following the change of struct RArray.

	* ext/tk/tcltklib.c (ip_ruby_cmp): ditto.

	* parse.y (coverage): ditto.

	* proc.c (curry): ditto.

	* .gdbinit: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 05:47:04 +00:00
nobu 39a86bf60a * .gdbinit (rp): T_VALUES is no longer defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-23 02:38:02 +00:00
nobu c4d11b0525 * .gdbinit (rp): removed RUBY_T_BLOCK.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 07:28:41 +00:00
matz c3d2e4d381 * numeric.c (num_rdiv): should always return rational number.
* rational.c (nurat_add, nurat_sub, nurat_mul, nurat_fdiv,
  nurat_cmp): use rb_num_coerce_bin().

* rational.c (nurat_division): does / and rdiv.

* .gdbinit (rp): no longer use rb_p().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-02 14:13:53 +00:00
matz 339dca41fc * .gdbinit (rp): supports rational and complex numbers. it's
cheating since it uses rb_p().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-01 21:54:16 +00:00
akr 7b8d61c2ed use %ld for VALUE in rp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:50:41 +00:00
akr 774aebb3ce follow RFloat member name change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-06 06:40:56 +00:00
akr b82a05989e * re.c (ARG_ENCODING_NONE): defined for /.../n option.
(REG_ENCODING_NONE): ditto.
  (rb_char_to_option_kcode): return ARG_ENCODING_NONE for n.
  (rb_reg_prepare_re): warn /ascii/n =~ "non-ascii".
  (rb_reg_initialize): set REG_ENCODING_NONE from ARG_ENCODING_NONE.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 16:39:36 +00:00
nobu 131d0efb5f * debug.c (dummy_gdb_enums.various): added ENCODING and CODERANGE
constants.

* .gdbinit: use enum constants.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 08:31:24 +00:00
akr a0fc8b5564 show regexp flags and encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17 13:11:13 +00:00
akr 968918da16 don't show shared and assoc for embed string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-13 12:32:06 +00:00
akr 9595af4ad5 * string.c (rb_str_shared_replace): make str noembed after free.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-13 11:52:15 +00:00
akr 2ed2078909 fix coderange.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 02:49:44 +00:00
akr b8dc3c1e2a * ruby.c (RUBY_ENCODING_SHIFT): added as enum.
* .gdbinit (rp): show encoding and coderange for strings.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-16 09:17:28 +00:00