Age | Commit message (Collapse) | Author |
|
I'm trying to make it possible to include all JIT-ed code in a single C
file. This is needed to guarantee uniqueness of all function names
|
|
|
|
|
|
|
|
|
|
As well as worker processes do in Test::Unit::Worker#run.
|
|
[ci skip]
|
|
|
|
|
|
on stack when local_stack_p is enabled.
This fixes `RB_FL_TEST_RAW:"RB_FL_ABLE(obj)"` assertion failure
on power_assert's test with JIT enabled.
|
|
Instead of letting callers rescue the error always.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3039
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3039
|
|
when there's no need to call CALLER_SETUP_ARG and CALLER_REMOVE_EMPTY_KW_SPLAT
(i.e. !rb_splat_or_kwargs_p(ci) && !calling->kw_splat).
Micro benchmark:
```
$ benchmark-driver -v --rbenv 'before;after' benchmark/vm_send_cfunc.yml --repeat-count=4
before: ruby 2.8.0dev (2020-04-13T23:45:05Z master b9d3ceee8f) [x86_64-linux]
after: ruby 2.8.0dev (2020-04-14T00:48:52Z no-splat-fastpath 418d363722) [x86_64-linux]
Calculating -------------------------------------
before after
vm_send_cfunc 69.585M 88.724M i/s - 100.000M times in 1.437097s 1.127096s
Comparison:
vm_send_cfunc
after: 88723605.2 i/s
before: 69584737.1 i/s - 1.28x slower
```
Optcarrot:
```
$ benchmark-driver -v --rbenv 'before;after' benchmark.yml --repeat-count=12 --output=all
before: ruby 2.8.0dev (2020-04-13T23:45:05Z master b9d3ceee8f) [x86_64-linux]
after: ruby 2.8.0dev (2020-04-14T00:48:52Z no-splat-fastpath 418d363722) [x86_64-linux]
Calculating -------------------------------------
before after
Optcarrot Lan_Master.nes 50.76119601545175 42.73858236484051 fps
50.76388649761503 51.04211379912850
50.80930672252514 51.39455790755538
50.90236000778749 51.75656936556145
51.01744746340430 51.86875277356489
51.06495279015112 51.88692482485558
51.07785337168974 51.93429603190578
51.20163525187862 51.95768145071314
51.34671771913112 52.45577266040274
51.35918340835583 52.53163888762858
51.46641337418146 52.62172484121034
51.50835463462257 52.85064021113239
```
Notes:
Merged-By: k0kubun <[email protected]>
|
|
for VM_METHOD_TYPE_CFUNC.
This has been known to decrease optcarrot fps:
```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark.yml --repeat-count=24 --output=all
before --jit: ruby 2.8.0dev (2020-04-13T16:25:13Z master fb40495cd9) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-04-13T23:23:11Z mjit-inline-c bdcd06d159) +JIT [x86_64-linux]
Calculating -------------------------------------
before --jit after --jit
Optcarrot Lan_Master.nes 66.38132676191719 67.41369177299630 fps
69.42728743772243 68.90327567263054
72.16028300263211 69.62605130880686
72.46631319102777 70.48818243767207
73.37078877002490 70.79522887347566
73.69422431217367 70.99021920193194
74.01471487018695 74.69931965402584
75.48685183295630 74.86714575949016
75.54445264507932 75.97864419721677
77.28089738169756 76.48908637569581
78.04183397891302 76.54320932488021
78.36807984096562 76.59407262898067
78.92898762543574 77.31316743361343
78.93576483233765 77.97153484180480
79.13754917503078 77.98478782102325
79.62648945850653 78.02263322726446
79.86334213878064 78.26333724045934
80.05100635898518 78.60056756355614
80.26186843769584 78.91082645644468
80.34205717020330 79.01226659142263
80.62286066044338 79.32733939423721
80.95883033058557 79.63793060542024
80.97376819251613 79.73108936622778
81.23050939202896 80.18280109433088
```
and I deleted this capability in an early stage of YARV-MJIT development:
https://github.com/k0kubun/yarv-mjit/commit/0ab130feeefc2b9078a1077e4fec93b3f5e45d07
I suspect either of the following things could be the cause:
* Directly calling vm_call_cfunc requires more optimization effort in GCC,
resulting in 30ms-ish compilation time increase for such methods and
decreasing the number of methods compiled in a benchmarked period.
* Code size increase => icache miss hit
These hypotheses could be verified by some methodologies. However, I'd
like to introduce this regardless of the result because this blocks
inlining C method's definition.
I may revert this commit when I give up to implement inlining C method
definition, which requires this change.
Microbenchmark-wise, this gives slight performance improvement:
```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark/mjit_send_cfunc.yml --repeat-count=4
before --jit: ruby 2.8.0dev (2020-04-13T16:25:13Z master fb40495cd9) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-04-13T23:23:11Z mjit-inline-c bdcd06d159) +JIT [x86_64-linux]
Calculating -------------------------------------
before --jit after --jit
mjit_send_cfunc 41.961M 56.489M i/s - 100.000M times in 2.383143s 1.770244s
Comparison:
mjit_send_cfunc
after --jit: 56489372.5 i/s
before --jit: 41961388.1 i/s - 1.35x slower
```
|
|
|
|
|
|
Split ruby.h
Notes:
Merged-By: shyouhei <[email protected]>
|
|
_mjit_compile_send.erb doesn't use _mjit_compile_insn_body.erb
|
|
to unify the duplicated declarations and to make sure it's not used
until set properly.
Also changed it from legacy TRUE/FALSE to stdbool.
|
|
|
|
using sp_inc_of_sendish for consistency and to make it easier to
understand
|
|
and simplify `v` variable references a little.
There's no CALL_METHOD anymore, and the original code lives in
vm_sendish instead of insns.def now.
|
|
in mjit_compile_send to clarify it's not that deeply branched.
|
|
It can fail due to different prefixes, e.g., drive letters or UNC
paths on DOSish platform.
|
|
This reverts commit 4a6571dbc14ee4e88c12cd9931f7695077a3ee6e,
because chkbuild does not follow.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3003
|
|
|
|
|
|
[ci skip]
|
|
[ci skip]
|
|
[ci skip]
|
|
to eliminate sp / pc moves by cancelling JIT execution on interrupts.
$ benchmark-driver benchmark.yml -v --rbenv 'before --jit;after --jit' --repeat-count=12 --output=all
before --jit: ruby 2.8.0dev (2020-04-01T03:48:56Z master 5a81562dfe) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-04-01T04:58:01Z master 39beb26a27) +JIT [x86_64-linux]
Calculating -------------------------------------
before --jit after --jit
Optcarrot Lan_Master.nes 75.06409603894944 76.06422026555558 fps
75.12025067279242 78.48161731616810
77.42020273492177 79.78958240950033
79.07253675128945 79.88645902325614
79.99179109732327 80.33743931749331
80.07633091008627 80.53790081529166
80.15450942667547 80.99048270668010
80.48372803283709 81.70497146081003
80.57410149187352 82.79494539467382
81.80449157081202 82.85797792223954
82.24629397834902 83.00603891515506
82.63708148686703 83.23221006969828
$ benchmark-driver -v --rbenv 'before;before --jit;after --jit' benchmark/mjit_leave.yml --repeat-count=4
before: ruby 2.8.0dev (2020-04-01T03:48:56Z master 5a81562dfe) [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-04-01T03:48:56Z master 5a81562dfe) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-04-01T04:58:01Z master 39beb26a27) +JIT [x86_64-linux]
Calculating -------------------------------------
before before --jit after --jit
mjit_leave 106.656M 82.786M 91.635M i/s - 200.000M times in 1.875183s 2.415881s 2.182569s
Comparison:
mjit_leave
before: 106656239.9 i/s
after --jit: 91635143.7 i/s - 1.16x slower
before --jit: 82785537.2 i/s - 1.29x slower
|
|
JIT support of dd723771c11.
$ benchmark-driver -v --rbenv 'before;before --jit;after --jit' benchmark/mjit_exivar.yml --repeat-count=4
before: ruby 2.8.0dev (2020-03-30T12:32:26Z master e5db3da9d3) [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-03-30T12:32:26Z master e5db3da9d3) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-03-31T05:57:24Z mjit-exivar 128625baec) +JIT [x86_64-linux]
Calculating -------------------------------------
before before --jit after --jit
mjit_exivar 57.944M 53.579M 54.471M i/s - 200.000M times in 3.451588s 3.732772s 3.671687s
Comparison:
mjit_exivar
before: 57944345.1 i/s
after --jit: 54470876.7 i/s - 1.06x slower
before --jit: 53579483.4 i/s - 1.08x slower
|
|
|
|
|
|
As `RbConfig.expand` modifies the argument and involved `CONFIG`
values, its values should be mutable.
|
|
|
|
for consistency
|
|
variable of make instead of d059714746 as requested.
You can disable this like `make MJIT_WITHOUT_TABS=false` or
`export MJIT_WITHOUT_TABS=false`.
|
|
in debugflags, as requested by nobu
I actually wanted to check debugflags directly rather than MJIT_DEBUGFLAGS
because debugflags is always used but MJIT_DEBUGFLAGS may not be always used.
But I couldn't find a better way to check debugflags.
|
|
rb_class_of is indented with tabs
|
|
This didn't exist in my machine, but it may exist in some CI
environments.
|
|
|
|
It's to be fixed properly later. But this should be able to avoid the failure.
https://travis-ci.org/github/ruby/ruby/jobs/665580361
https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20200322T190003Z.fail.html.gz
|
|
This is necessary to avoid converting a hard tab to just 1 space in
preprocessor to generate rb_mjit_header.h, which is helpful when using
gdb or perf report.
See also: [Misc #16112]
This reverts commit 91acdd17c4b4bb69a8fa3ada46e09dad46b9362e.
Fixed permission failure on Travis, encoding, and added SKIPPED_FILES.
Notes:
Merged-By: k0kubun <[email protected]>
|
|
This reverts commit 57119dd561418c917b885db5f5af7f129a96d1ec.
Temporarily reverting for Travis failures
|
|
I can't live without this when using gdb or perf report.
See also: [Misc #16112]
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2972
|
|
It seems the issue was fixed by Travis.
See https://travis-ci.community/t/6719/5 .
Notes:
Merged: https://github.com/ruby/ruby/pull/2970
|