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

99 Коммитов

Автор SHA1 Сообщение Дата
ktsj 389c80cec1 .gdbinit: fix print_pathobj
$str is not C string but RString.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18 06:24:52 +00:00
ktsj f3a892429d .gdbinit: follow up changes in r60726
rb_iseq_constant_body::line_info_size and line_info_table have
been renamed to insns_info_size, insns_info.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-18 05:45:21 +00:00
kazu fb5bc568ca fixup r60440 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-08 14:14:54 +00:00
ktsj c84586b785 .gdbinit: follow up changes in r60440
ruby_current_vm has been renamed to ruby_current_vm_ptr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29 06:16:10 +00:00
ko1 837fd5e494 Use rb_execution_context_t instead of rb_thread_t
to represent execution context [Feature #14038]

* vm_core.h (rb_thread_t): rb_thread_t::ec is now a pointer.
  There are many code using `th` to represent execution context
  (such as cfp, VM stack and so on). To access `ec`, they need to
  use `th->ec->...` (adding one indirection) so that we need to
  replace them by passing `ec` instead of `th`.

* vm_core.h (GET_EC()): introduced to access current ec. Also
  remove `ruby_current_thread` global variable.

* cont.c (rb_context_t): introduce rb_context_t::thread_ptr instead of
  rb_context_t::thread_value.

* cont.c (ec_set_vm_stack): added to update vm_stack explicitly.

* cont.c (ec_switch): added to switch ec explicitly.

* cont.c (rb_fiber_close): added to terminate fibers explicitly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-26 08:32:49 +00:00
nobu 3fc0c18193 debug.c: imemo_mask
* .gdbinit (rp, rp_imemo, rb_ps_thread): update imemo_mask.

* debug.c (ruby_dummy_gdb_enums): include imemo_types.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24 23:19:57 +00:00
nobu 6a34a8c403 .gdbinit: newline at rp_id [ci skip]
* .gdbinit (rp_id): add a newline.

* .gdbinit (print_id): should not print a newline here.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-08 05:14:18 +00:00
nobu f52a49130f .gdbinit: print_id in rp_id [ci skip]
* .gdbinit (rp_id): use print_id instead of calling
  lookup_id_str() in a debugger context.

* symbol.c (ID_ENTRY_UNIT): made visible to debuggers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-06 06:11:25 +00:00
naruse 2698d34dbd output some strings without quotes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-12 12:49:38 +00:00
naruse b7127e6356 Follow latest VM changes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-11 08:50:08 +00:00
nobu bd4a419d3e .gdbinit: fix nd_tree
* .gdbinit (nd_tree): use rb_str_tmp_new to get rid of
  `__extension__'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 04:44:12 +00:00
normal 9d09240d9e rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t
The goal is to reduce rb_context_t and rb_fiber_t size
by removing the need to store the entire rb_thread_t in
there.

[ruby-core:81045] Work-in-progress: soon, we will move more fields here.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-09 05:06:41 +00:00
nobu 655aa318db .gdbinit: suppress gdb message [ci skip]
* .gdbinit (rp): check number of instance variables to get rid of
  "Invalid number 0 of repetitions."  message at an empty object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 10:37:53 +00:00
nobu c85cdc12a4 .gdbinit: RArray in history [ci skip]
* .gdbinit (rp): put the contents of RArray in value history, for
  later use.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18 10:19:52 +00:00
nobu 982a448ead .gdbinit: rp_bignum
* .gdbinit (rp_bignum): print bignum from higher digits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-25 02:59:47 +00:00
nobu 4f1a54d2d7 .gdbinit: fix on empty strings [ci skip]
* .gdbinit (output_string): get rid of "Invalid number 0 of
  repetitions" error on empty strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-25 06:05:51 +00:00
nobu 0da52e5626 .gdbinit: op symbols [ci skip]
* .gdbinit (rp_id): add unhandled operator symbols.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-25 06:05:50 +00:00
nobu 53a1b9f28f .gdbinit: refine rp [ci skip]
* .gdbinit (rp, output_string, rp): show the contents after NUL
  char.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-15 06:08:09 +00:00
nobu 49f38abe5e .gdbinit: refine rp
* .gdbinit (rp): refine output of T_STRUCT and T_BIGNUM to show
  all elements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-25 05:58:24 +00:00
naruse ed83af606a Use rb_mod_name instead of classname
classname() is static function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-15 12:42:04 +00:00
nobu c937bd4a92 .gdbinit: improve rp [ci skip]
* .gdbinit (rp): improve T_OBJECT dump.  show the contents of the
  instance variables table.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-12 06:12:09 +00:00
naruse fe5f47a6ee * .gdbinit: follow r55766's VM change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-24 07:56:51 +00:00
naruse 14d9ceed15 * .gdbinit (rb_ps_thread): show the detail of cfunc in ruby level
backtrace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 09:24:59 +00:00
naruse 0946cf157a * .gdbinit (rb_count_objects): added gdb version of count_objects().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01 03:13:41 +00:00
naruse 6f10a4af6c * .gdbinit (rb_ps_thread): show ruby level backtrace.
Usually you can call `rb_ps` to show ruby leve backtraces
  for all living threads.
  Note that it can call with core file like `gcore <pid>`
  and `gdb ruby core.<pid>`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 19:36:38 +00:00
nobu 650c05ae40 .gdbinit: improve rb_imemo [ci skip]
* .gdbinit (rp_imemo): support imemo_ment and imemo_iseq.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-09 02:09:24 +00:00
nobu 2fd11c760c .gdbinit: dump_node [ci skip]
* .gdbinit (dump_node): dump NODE list in gdb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-15 13:16:53 +00:00
nobu f12746d165 rbi
.gdbinit (rbi): show the content of LINK_ELEMENT*.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 03:36:08 +00:00
naruse 72272159d8 refix r51329 and show thread information
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-29 01:39:17 +00:00
naruse 8c1a75a3bf follow r51064
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21 23:24:18 +00:00
nobu 785438a3d7 .gdbinit: T_IMEMO
* .gdbinit (rp_imemo): print the content support of each T_IMEMO.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-26 06:50:57 +00:00
nobu 3f8d077744 .gdbinit: T_IMEMO
* .gdbinit (rp): add support of T_IMEMO.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-26 06:30:15 +00:00
nobu 722b95baff .gdbinit: member name changed
* .gdbinit (rp_class): origin has been renamed as origin_ at
  r49931.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-25 00:41:42 +00:00
nobu 9763fb84b5 .gdbinit: update for r47913
* .gdbinit (rp): update for r47913.  RSymbol has id, so needs mask
  by scope mask.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-17 21:08:23 +00:00
nobu 65075dfe3a symbol.c: ids array
* symbol.c (global_symbols): make ids two-dimensional array of
  strings and symbols, for write-barrier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-14 07:23:14 +00:00
nobu 3e69b074c5 symbol.c: immortal IDs
* symbol.c (global_symbols): make IDs immortal always, instead
  of treating dynamic symbols as IDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-14 07:23:08 +00:00
nobu cd55ddb03c .gdbinit: nd_tree
* .gdbinit (nd_tree): dump node tree by dump_node().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 17:35:25 +00:00
nobu 4817ab23b3 follow RIncGC
* .gdbinit (rp), debug.c (RUBY_FL_PROMOTED): follow RIncGC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-12 14:16:57 +00:00
nobu 4a3f08d397 .gdbinit (rp): dump T_SYMBOL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-28 07:58:10 +00:00
nobu d550d72249 .gdbinit: use st_numhash
* .gdbinit (rb_numtable_entry): use st_numhash() to follow r45384.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-23 14:47:04 +00:00
nobu 3dfe270fe3 .gdbinit: super moved
* .gdbinit (rb_method_entry, rb_ancestors): `super` moved to
  RClass from rb_classext_t since r44294.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-19 00:42:26 +00:00
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