Issue #14491 has been updated by k0kubun (Takashi Kokubun).


Hi Sam. I've researched many factors of slowdown by JIT and currently I don't have any idea to fix performance degradation that comes from ongoing JIT compilation. Until the issue is solved, which seems a little hard to solve soon, I would like to have your MJIT.pause idea to make it easy to investigate JIT-ed code performance like https://bugs.ruby-lang.org/issues/14490.

I filed another ticket that picks only MJIT.pause with detailed behaviors https://bugs.ruby-lang.org/issues/14830. To use it on test as well, I also added MJIT.resume.

----------------------------------------
Feature #14491: MJIT needs internal debugging methods
https://bugs.ruby-lang.org/issues/14491#change-72421

* Author: sam.saffron (Sam Saffron)
* Status: Feedback
* Priority: Normal
* Assignee: k0kubun (Takashi Kokubun)
* Target version: 
----------------------------------------
### Issue

Doing careful analysis of MJIT performance is very hard cause there is no way of instrumenting this in runtime 

### Proposal

1. Add `MJIT.enable`, `MJIT.disable`, `MJIT.pause` methods. 

   - `MJIT.pause` will continue using MJIT for execution but will no longer compile new fragments

2. Add `MJIT.trace` or similar that returns a block for key compile start / compile end operations. 
   
```
MJIT.trace do |klass, method, line, operation, duration|
end
```

This will allow simpler analysis of MJITs performance.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>