Project

General

Profile

Bug #16658

`method__cache__clear` DTrace hook was dropped without replacement

Added by vo.x (Vit Ondruch) 5 months ago. Updated 3 months ago.

Status:
Open
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.8.0dev (2020-02-26 master 83705c42ce) [x86_64-linux]
[ruby-core:97289]

Description

The PR #2888 1 dropped DTrace method__cache__clear hook without replacement. Was this intentional? If yes, then the probes.d 3 should be updated appropriately. If this was not intentional, the hook should be reintroduced.


Related issues

Related to Ruby master - Feature #16614: New method cache mechanism for GuildClosedko1 (Koichi Sasada)Actions
#1

Updated by vo.x (Vit Ondruch) 5 months ago

  • Related to Feature #16614: New method cache mechanism for Guild added

Updated by vo.x (Vit Ondruch) 4 months ago

  • Assignee set to ko1 (Koichi Sasada)

@Koichi could you please take a look, since your commit removed the hook. Thx

Updated by ko1 (Koichi Sasada) 3 months ago

Sorry. what method__cache__clear did?
When this hook was invoked?

Updated by vo.x (Vit Ondruch) 3 months ago

ko1 (Koichi Sasada) wrote in #note-3:

Sorry. what method__cache__clear did?

I don't really know. tenderlovemaking (Aaron Patterson) is the author AFAIK. But this is the comment from probes.d:

     ruby:::method-cache-clear(class, filename, lineno);
     This probe is fired when the method cache is cleared.
     * `class` the name of the class or "global" (a string)
     * `filename` the file name where the cache is _being cleared_ (a string)
     * `lineno` the line number where the cache is _being cleared_ (an int)

When this hook was invoked?

https://github.com/ruby/ruby/pull/2888/files#diff-6cea7716df08f2b7fdc5fb30c7963884L98

Updated by vo.x (Vit Ondruch) 3 months ago

When this hook was invoked?

https://github.com/ruby/ruby/pull/2888/files#diff-6cea7716df08f2b7fdc5fb30c7963884L98

Hm, this does not appear to really work, since the vm_method.c is collapsed. Anyway, this used to be the invocation place:

https://github.com/ruby/ruby/blob/f2286925f08406bc857f7b03ad6779a5d61443ae/vm_method.c#L98

Updated by ko1 (Koichi Sasada) 3 months ago

Thanks, I think there is no chance to invoke this hook on current master.

Updated by vo.x (Vit Ondruch) 3 months ago

ko1 (Koichi Sasada) wrote in #note-6:

Thanks, I think there is no chance to invoke this hook on current master.

Could you please adjust the probes.d then? Thx.

Also available in: Atom PDF