ruby/internal
NARUSE, Yui de6072a22e merge revision(s) abdc634f64a440afcdc7f23c9757d27aab4db8a9,083c5f08ec4e95c9b75810d46f933928327a5ab3,1ecda213668644d656eb0d60654737482447dd92,813fe4c256f89babebb8ab53821ae5eb6bb138c6: [Backport #17497]
remove unused decl

	---
	 internal/vm.h | 6 ------
	 vm_args.c     | 2 --
	 2 files changed, 8 deletions(-)

	Check stack overflow in recursive glob_helper [Bug #17162]

	---
	 dir.c         |  2 ++
	 internal/vm.h |  1 +
	 vm_eval.c     | 10 ++++++++++
	 3 files changed, 13 insertions(+)

	global call-cache cache table for rb_funcall*

	rb_funcall* (rb_funcall(), rb_funcallv(), ...) functions invokes
	Ruby's method with given receiver. Ruby 2.7 introduced inline method
	cache with static memory area. However, Ruby 3.0 reimplemented the
	method cache data structures and the inline cache was removed.

	Without inline cache, rb_funcall* searched methods everytime.
	Most of cases per-Class Method Cache (pCMC) will be helped but
	pCMC requires VM-wide locking and it hurts performance on
	multi-Ractor execution, especially all Ractors calls methods
	with rb_funcall*.

	This patch introduced Global Call-Cache Cache Table (gccct) for
	rb_funcall*. Call-Cache was introduced from Ruby 3.0 to manage
	method cache entry atomically and gccct enables method-caching
	without VM-wide locking. This table solves the performance issue
	on multi-ractor execution.
	[Bug #17497]

	Ruby-level method invocation does not use gccct because it has
	inline-method-cache and the table size is limited. Basically
	rb_funcall* is not used frequently, so 1023 entries can be enough.
	We will revisit the table size if it is not enough.
	---
	 debug_counter.h |   3 +
	 vm.c            |  12 +++
	 vm_callinfo.h   |  12 ---
	 vm_core.h       |   5 +
	 vm_eval.c       | 288 ++++++++++++++++++++++++++++++++++++++++++--------------
	 vm_insnhelper.c |  11 ++-
	 vm_method.c     |  14 ++-
	 7 files changed, 255 insertions(+), 90 deletions(-)

	opt_equality_by_mid for rb_equal_opt

	This patch improves the performance of sequential and parallel
	execution of rb_equal() (and rb_eql()).
	[Bug #17497]

	rb_equal_opt (and rb_eql_opt) does not have own cd and it waste
	a time to initialize cd. This patch introduces opt_equality_by_mid()
	to check equality without cd.

	Furthermore, current master uses "static" cd on rb_equal_opt
	(and rb_eql_opt) and it hurts CPU caches on multi-thread execution.
	Now they are gone so there are no bottleneck on parallel execution.
	---
	 vm_insnhelper.c | 99 ++++++++++++++++++++++++++++++++++++---------------------
	 1 file changed, 63 insertions(+), 36 deletions(-)
2021-03-11 20:24:48 +09:00
..
array.h tuning trial: newobj with current ec 2020-12-07 08:28:36 +09:00
bignum.h include/ruby/backward/2/r_cast.h: deprecate 2020-08-27 15:03:36 +09:00
bits.h Fix a typo [ci skip] 2020-05-18 17:42:50 +09:00
class.h sync RClass::ext::iv_index_tbl 2020-10-17 08:18:04 +09:00
compar.h add #include guard hack 2020-04-13 16:06:00 +09:00
compile.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
compilers.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
complex.h include/ruby/backward/2/r_cast.h: deprecate 2020-08-27 15:03:36 +09:00
cont.h Make Mutex per-Fiber instead of per-Thread 2020-09-14 16:44:09 +12:00
dir.h add #include guard hack 2020-04-13 16:06:00 +09:00
enc.h add #include guard hack 2020-04-13 16:06:00 +09:00
encoding.h add #include guard hack 2020-04-13 16:06:00 +09:00
enum.h add #include guard hack 2020-04-13 16:06:00 +09:00
enumerator.h add #include guard hack 2020-04-13 16:06:00 +09:00
error.h Switch rb_category_warn{,ing} to accept an rb_warning_category_t 2020-12-18 09:54:11 -08:00
eval.h add #include guard hack 2020-04-13 16:06:00 +09:00
file.h add #include guard hack 2020-04-13 16:06:00 +09:00
fixnum.h Update fixnum.h 2020-12-01 20:40:33 +09:00
gc.h Narrowed down unaligned member access region in RB_OBJ_WRITE 2020-12-13 11:57:05 +09:00
hash.h Ractor.make_shareable(obj) 2020-10-21 07:59:24 +09:00
imemo.h enable constant cache on ractors 2021-01-13 17:06:16 +09:00
inits.h add #include guard hack 2020-04-13 16:06:00 +09:00
io.h add #include guard hack 2020-04-13 16:06:00 +09:00
load.h add #include guard hack 2020-04-13 16:06:00 +09:00
loadpath.h add #include guard hack 2020-04-13 16:06:00 +09:00
math.h add #include guard hack 2020-04-13 16:06:00 +09:00
missing.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
numeric.h Allow inlining Integer#-@ and #~ 2020-12-22 22:32:19 -08:00
object.h ROBJECT_IV_INDEX_TBL: convert into an inline function 2020-08-19 14:30:57 +09:00
parse.h add #include guard hack 2020-04-13 16:06:00 +09:00
proc.h Moved rb_callable_receiver internal 2020-10-06 10:11:51 +09:00
process.h Allow Dir.home to work for non-login procs when $HOME not set 2020-05-23 23:16:28 +09:00
random.h add #include guard hack 2020-04-13 16:06:00 +09:00
range.h Feature #16812: Allow slicing arrays with ArithmeticSequence (#3241) 2020-10-21 02:40:18 +09:00
rational.h Fix ArithmeticSequence#last and ArithmeticSequence#each for non-integer sequences (#3870) 2020-12-09 18:48:59 +09:00
re.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
sanitizers.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
scheduler.h Add support for non-blocking Process.wait. 2020-12-09 08:55:35 +13:00
serial.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
signal.h add #include guard hack 2020-04-13 16:06:00 +09:00
static_assert.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
string.h tuning trial: newobj with current ec 2020-12-07 08:28:36 +09:00
struct.h include/ruby/backward/2/r_cast.h: deprecate 2020-08-27 15:03:36 +09:00
symbol.h add #include guard hack 2020-04-13 16:06:00 +09:00
thread.h Rename to Fiber#set_scheduler. 2020-11-07 23:39:50 +13:00
time.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
transcode.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
util.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00
variable.h tuning ivar set 2020-12-16 13:06:13 +09:00
vm.h merge revision(s) abdc634f64a440afcdc7f23c9757d27aab4db8a9,083c5f08ec4e95c9b75810d46f933928327a5ab3,1ecda213668644d656eb0d60654737482447dd92,813fe4c256f89babebb8ab53821ae5eb6bb138c6: [Backport #17497] 2021-03-11 20:24:48 +09:00
warnings.h sed -i 's|ruby/impl|ruby/internal|' 2020-05-11 09:24:08 +09:00