1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/ruby
Jeremy Evans 2d98593bf5 Support tracing of attr_reader and attr_writer
In vm_call_method_each_type, check for c_call and c_return events before
dispatching to vm_call_ivar and vm_call_attrset.  With this approach, the
call cache will still dispatch directly to those functions, so this
change will only decrease performance for the first (uncached) call, and
even then, the performance decrease is very minimal.

This approach requires that we clear the call caches when tracing is
enabled or disabled.  The approach currently switches all vm_call_ivar
and vm_call_attrset call caches to vm_call_general any time tracing is
enabled or disabled. So it could theoretically result in a slowdown for
code that constantly enables or disables tracing.

This approach does not handle targeted tracepoints, but from my testing,
c_call and c_return events are not supported for targeted tracepoints,
so that shouldn't matter.

This includes a benchmark showing the performance decrease is minimal
if detectable at all.

Fixes [Bug #16383]
Fixes [Bug #10470]

Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2021-08-29 07:23:39 -07:00
..
enc Take into account data in emoji-variation-sequences.txt in tests. 2021-08-17 16:03:52 +09:00
allpairs.rb
beginmainend.rb
bug-11928.rb
bug-13526.rb
lbtest.rb
marshaltestlib.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
sentence.rb
test_alias.rb Merge pull request #2721 from jeremyevans/method-inspect-chain-alias-11188 2020-03-22 09:30:20 -07:00
test_argf.rb Assert for duplicated ARGF [Bug #18074] 2021-08-10 23:40:45 +09:00
test_arithmetic_sequence.rb test/ruby/test_arithmetic_sequence.rb: restore test_last_bug17218 2020-12-10 00:59:00 +09:00
test_arity.rb
test_array.rb Add negative position tests [Bug #18138] 2021-08-29 10:35:00 +09:00
test_assignment.rb test/ruby/test_assignment.rb: Avoid "assigned but unused variable" 2021-04-23 22:11:01 +09:00
test_ast.rb ast.c: Rename "save_script_lines" to "keep_script_lines" 2021-08-20 16:18:36 +09:00
test_autoload.rb fix for multi-run test. 2020-05-15 14:54:03 +09:00
test_backtrace.rb Make backtrace generation work outward from current frame 2021-08-06 10:15:01 -07:00
test_basicinstructions.rb support multi-run for ruby/test_basicinstructions.rb 2020-01-28 15:23:51 +09:00
test_beginendblock.rb
test_bignum.rb Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
test_call.rb Dup splat array in certain cases where there is a block argument 2020-06-18 08:19:33 -07:00
test_case.rb Avoid improper optimization of case statements mixed integer/rational/complex 2021-05-12 19:30:05 -07:00
test_class.rb Skip freezing check on setting temporary class path [Bug #17563] 2021-01-20 19:24:16 +09:00
test_clone.rb
test_comparable.rb
test_complex.rb Fix assertion failed in Complex.polar without NDEBUG (#3551) 2020-09-16 19:27:16 +09:00
test_complex2.rb
test_complexrational.rb
test_condition.rb
test_const.rb refactoring: use Proc and Constant. 2020-01-29 00:54:05 +09:00
test_continuation.rb
test_default_gems.rb
test_defined.rb Add more tests for defined? with method calls 2021-03-29 07:45:15 -07:00
test_dir.rb Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
test_dir_m17n.rb win32: Use UTF-8 as filesystem encoding [Feature #12654] 2020-12-20 18:34:04 +09:00
test_econv.rb Fix some typos by spell checker 2021-04-26 10:07:41 +09:00
test_encoding.rb Fix a failure 2021-02-16 18:17:09 +09:00
test_enum.rb Fix Enumerable#tally with some arguments pattern [Feature #17744] 2021-03-27 12:55:46 +09:00
test_enumerator.rb Undef Enumerator::Chain#{feed,next,next_values,peek,peek_values} 2021-03-06 13:56:16 -08:00
test_env.rb Make ENV.clone warn and ENV.dup raise 2021-06-08 10:19:08 -07:00
test_eval.rb support multi-run for test/ruby/test_eval.rb 2020-01-28 15:23:51 +09:00
test_exception.rb Skip test_ensure_after_nomemoryerror 2021-07-29 18:54:20 -07:00
test_fiber.rb Replace copy coroutine with pthread implementation. 2021-07-01 11:23:03 +12:00
test_file.rb
test_file_exhaustive.rb Run nmake check on Actions (#4487) 2021-05-11 15:18:44 -07:00
test_fixnum.rb test/ruby: Check warning messages at a finer granularity 2020-12-17 20:06:18 +09:00
test_flip.rb
test_float.rb Attempt to fix floating point test failure 2021-05-29 14:08:24 -07:00
test_fnmatch.rb
test_frozen_error.rb
test_gc.rb Run in a separated process to run finalizers certainly 2021-07-27 14:55:20 +09:00
test_gc_compact.rb Stop infinite object allocation to get rid of OOM killer 2021-08-02 10:18:22 +09:00
test_hash.rb Free previously used tables [Bug #18134] 2021-08-29 17:18:58 +09:00
test_ifunless.rb
test_inlinecache.rb fix bug on method cache invalidation. 2020-03-11 02:50:44 +09:00
test_insns_leaf.rb [Bug #17880] Set leaf false on opt_setinlinecache (#4565) 2021-06-14 17:34:57 -07:00
test_integer.rb Improve performance of Integer#digits 2021-07-29 15:19:12 -07:00
test_integer_comb.rb
test_io.rb Fix Marshal.dump(closed_io) to raise TypeError and allow encoding on closed IO 2021-08-22 10:33:22 +09:00
test_io_m17n.rb Check encoding name to replicate 2020-10-15 16:48:25 +09:00
test_iseq.rb Build CDHASH properly when loading iseq from binary 2021-05-21 12:13:55 -04:00
test_iterator.rb Warn when passing a non-literal block to Kernel#lambda 2020-06-11 07:30:48 -07:00
test_jit.rb Don't cancel JIT-ed code on TracePoint :class 2021-08-12 23:26:44 -07:00
test_jit_debug.rb tune parallel test 2020-12-01 09:39:09 +09:00
test_key_error.rb
test_keyword.rb Add back checks for empty kw splat with tests (#4405) 2021-04-23 22:17:20 -04:00
test_lambda.rb test/ruby/test_lambda.rb: Remove "warning: assigned but unused variable" 2021-04-04 15:26:09 +09:00
test_lazy_enumerator.rb Fix lazy enumerator with index size 2021-05-27 14:17:32 -07:00
test_literal.rb Warn more duplicate literal hash keys 2021-06-03 15:11:18 +09:00
test_m17n.rb Windows: Read ENV names and values as UTF-8 encoded Strings (#3818) 2020-12-08 02:00:39 +09:00
test_m17n_comb.rb Add test for String#casecmp? 2021-01-24 15:57:13 +09:00
test_marshal.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
test_math.rb Add domain check macros 2021-07-04 22:15:59 +09:00
test_memory_view.rb [memory_view][fiddle] Rename len to byte_size in rb_memory_view_t 2020-12-23 09:24:53 +09:00
test_metaclass.rb
test_method.rb Add keyrest to ruby2_keywords parameters [Bug #18011] 2021-08-03 10:56:50 +09:00
test_method_cache.rb invalidate negative cache any time. 2021-02-19 16:54:31 +09:00
test_mixed_unicode_escapes.rb
test_module.rb Use Module#ancestors order in recursive constant lookup 2021-06-30 10:49:27 +09:00
test_name_error.rb Prevent "warning: ambiguity between regexp and two divisions" 2021-06-30 13:41:18 +09:00
test_nomethod_error.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
test_not.rb
test_numeric.rb Use Rational for Float#round with ndigits > 14 2021-08-06 15:03:51 -07:00
test_object.rb [WIP] add error_squiggle gem 2021-06-29 23:45:49 +09:00
test_objectspace.rb Reenable GC at the end of test 2021-08-04 16:11:08 -04:00
test_optimization.rb Fix warnings in test_optimization.rb 2021-08-24 08:34:48 -07:00
test_pack.rb
test_parse.rb test/ruby/test_parse.rb: Prevent an "unused variable" warning 2021-07-27 13:41:58 +09:00
test_path.rb
test_pattern_matching.rb Allow omission of parentheses in one line pattern matching [Feature #16182] 2021-08-19 17:07:58 +09:00
test_pipe.rb
test_primitive.rb support multi-run for test/ruby/test_primitive.rb 2020-01-28 15:23:51 +09:00
test_proc.rb Remove shift of ep when computing Proc#hash 2021-06-24 12:25:33 -07:00
test_process.rb Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
test_rand.rb Deprecate Random::DEFAULT 2020-12-14 20:29:50 +01:00
test_range.rb numeric.c, range.c: prohibit zero step 2020-10-23 15:26:51 +09:00
test_rational.rb test_cdhash: refactor change class 2021-05-12 10:30:46 +09:00
test_rational2.rb
test_readpartial.rb
test_refinement.rb Module#ancestors should not return superclasses of refinements 2021-08-20 10:42:01 +09:00
test_regexp.rb Fix handling of control/meta escapes in literal regexps 2021-05-12 18:55:43 -07:00
test_require.rb Get rid of multibyte prefix to tmpdir 2021-04-05 21:20:51 +09:00
test_require_lib.rb RSS library is the bundled gems now 2021-05-26 11:39:01 +09:00
test_rubyoptions.rb Fix infinite loop at illegal sequence [Bug #17729] 2021-03-19 07:15:55 +09:00
test_rubyvm.rb ruby_vm_global_method_state is no longer needed. 2020-10-14 23:15:21 +09:00
test_rubyvm_jit.rb Rename RubyVM::MJIT to RubyVM::JIT 2021-01-13 22:46:51 -08:00
test_settracefunc.rb Support tracing of attr_reader and attr_writer 2021-08-29 07:23:39 -07:00
test_signal.rb
test_sleep.rb
test_sprintf.rb
test_sprintf_comb.rb
test_stack.rb Pass ASAN options to child environments 2020-09-28 09:45:04 -07:00
test_string.rb test/ruby/test_string.rb: make GitHub syntax-highlight correctly 2021-03-08 17:04:27 +09:00
test_stringchar.rb
test_struct.rb Make Struct#keyword_init? return nil by default [Feature #18008] 2021-07-15 22:24:02 +09:00
test_super.rb This test is not testing attr_writer 2020-04-14 23:59:29 -07:00
test_symbol.rb Added Symbol#name 2020-09-04 22:18:59 +09:00
test_syntax.rb Add keyrest to ruby2_keywords parameters [Bug #18011] 2021-08-03 10:56:50 +09:00
test_system.rb
test_thread.rb Keep GC disabled until VM bootstrap has done [Bug #17583] 2021-07-01 18:49:17 -07:00
test_thread_cv.rb Distinguish signal and timeout [Bug #16608] 2021-07-25 13:09:03 -07:00
test_thread_queue.rb Prefer qualified names under Thread 2021-06-29 11:41:10 +09:00
test_threadgroup.rb
test_time.rb Time#getlocal tests for [Feature #17544] 2021-06-15 21:42:55 +09:00
test_time_tz.rb Parse "-00:00" as UTC for the round-trip [Feature #17544] 2021-02-16 20:34:23 +09:00
test_trace.rb
test_transcode.rb - add regression tests for U+6E7F (湿) in ISO-2022-JP 2021-07-01 17:33:43 +09:00
test_undef.rb
test_unicode_escape.rb
test_variable.rb Remove cvar overtaken classes at end of test methods 2021-03-10 12:09:45 -08:00
test_vm_dump.rb cause SEGV for the test. 2020-05-26 04:49:11 +09:00
test_weakmap.rb
test_whileuntil.rb
test_yield.rb
ut_eof.rb