Project

General

Profile

Actions

Feature #16282

open

Add "call data" wrapper IMEMO object so inline cache can be updated

Added by tenderlovemaking (Aaron Patterson) over 4 years ago. Updated over 4 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:95576]

Description

Hi,

Currently the compactor will invalidate all inline caches. I would like to update references in inline caches so we don't have to invalidate. Most inline caches are reachable from instruction sequences, but one cache is not:

https://github.com/ruby/ruby/blob/6147fa82a923e7318f493857023006801ed25eb5/internal.h#L2395

This static variable can't be reached from the GC. I'd like to introduce a new IMEMO object that wraps this cache, then the GC can reach the cache and update the value.

I've attached a patch that implements the new IMEMO object, and also removes the restriction on GCC so that all compilers get the cache hit.

Does this seem OK shyouhei, ko1?


Files

0001-Wrap-call-data-with-an-IMEMO-object.patch (3.9 KB) 0001-Wrap-call-data-with-an-IMEMO-object.patch tenderlovemaking (Aaron Patterson), 10/29/2019 12:13 AM
Actions #1

Updated by tenderlovemaking (Aaron Patterson) over 4 years ago

  • File 0001-Wrap-call-data-with-an-IMEMO-object.patch added
Actions #2

Updated by tenderlovemaking (Aaron Patterson) over 4 years ago

  • File deleted (0001-Wrap-call-data-with-an-IMEMO-object.patch)

Updated by tenderlovemaking (Aaron Patterson) over 4 years ago

Actually, I think this makes performance worse because it removes the "define". So there will be only one. I will fix it to maintain the macro.

Actions #5

Updated by tenderlovemaking (Aaron Patterson) over 4 years ago

  • File deleted (0001-Wrap-call-data-with-an-IMEMO-object.patch)
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0