1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

9 commits

Author SHA1 Message Date
Alan Wu
57977ba30d uJIT: Implement opt_getinlinecache
* ujit: implement opt_getinlinecache

Aggressively bet that writes to constants don't happen and invalidate
all opt_getinlinecache blocks on any and all constant writes.

Use alignment padding on block_t to track this assumption. No change to
sizeof(block_t).

* Fix compile warnings when not RUBY_DEBUG
* Fix reversed condition
* Switch to st_table to keep track of assumptions

Co-authored-by: Aaron Patterson <aaron.patterson@gmail.com>
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2021-10-20 18:19:30 -04:00
Maxime Chevalier-Boisvert
48736599ac Fix compiled iseq count stat 2021-10-20 18:19:29 -04:00
Alan Wu
c02517bacb Tie lifetime of uJIT blocks to iseqs
* Tie lifetime of uJIT blocks to iseqs

   Blocks weren't being freed when iseqs are collected.

* Add rb_dary. Use it for method dependency table

* Keep track of blocks per iseq

  Remove global version_tbl

* Block version bookkeeping fix

* dary -> darray

* free ujit_blocks

* comment about size of ujit_blocks
2021-10-20 18:19:29 -04:00
Alan Wu
3c7251b41b Tally instructions when taking side exists for --ujit-stats
shopify/ruby#29

Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
2021-10-20 18:19:28 -04:00
Alan Wu
b7f93e81df Implement --ujit-stats and instructoin counting
VM and ujit instruction counting in debug builds.

shopify/ruby#19
2021-10-20 18:19:27 -04:00
Maxime Chevalier-Boisvert
02a9700475 End current block after opt_send_without_block 2021-10-20 18:19:27 -04:00
Maxime Chevalier-Boisvert
59eb98fbaa Fix ujit cc/cme invalidation code for opt_send_without_block 2021-10-20 18:19:27 -04:00
Maxime Chevalier-Boisvert
f761e9ee64 Move code into ujit_iface.c 2021-10-20 18:19:26 -04:00
Maxime Chevalier-Boisvert
e4c65ec49c Refactor uJIT code into more files for readability 2021-10-20 18:19:26 -04:00