From: takashikkbn@... Date: 2018-02-20T07:55:38+00:00 Subject: [ruby-core:85677] [Ruby trunk Feature#14491] MJIT needs internal debugging methods Issue #14491 has been updated by k0kubun (Takashi Kokubun). > I would say the most critical piece though is MJIT.pause cause I need to properly measure additional overhead that mjit introduces for non jitted methods. Again, why don't you just remove --jit flag? -- We discussed about this ticket at Ruby developers meeting at Tokyo. For MJIT.trace, obviously it requires additional check and it makes JIT execution slow. "it is very awkward to consume" is too weak to make implementation complex and JIT slow. For MJIT.disable/MJIT.enable (MJIT.pause), it's not clear what to enable/disable/pause from those names (compilation? JIT execution? I know you mean compilation though, but it may not be clear for others). If it's for disabling JIT execution, it requires additional check in generated code to cancel JIT execution immediately and it makes JIT slow too. As we basically can achieve the purpose by just disabling "--jit", I couldn't find strong motivation to introduce this feature. Probably I still don't fully understand your motivation. Please describe (1) which is really critical (MJIT.pause only?), and (2) why it's critical even with enabling/disabling "--jit-xxx". Sometimes GC.disable is considered technical debt. Learning from history, we should be very careful to introduce all of these features listed in this ticket. ---------------------------------------- Feature #14491: MJIT needs internal debugging methods https://bugs.ruby-lang.org/issues/14491#change-70472 * Author: sam.saffron (Sam Saffron) * Status: Feedback * Priority: Normal * Assignee: * 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>