3

I'm doing research in ruby interpreter and mJIT. And, as a first step, I would like to understand the behaviors of both. Thus, I simply ran a very simple ruby program without --jit command puts ("hello world!") and got the execution trace of it. Then, one thing I found that even without mJIT enabled, some of the mJIT functions get invoked, such as mjit_add_class_serial, mjit_remove_class_serial, mjit_mark, mjit_gc_finish_hook, mjit_free_iseq, and mjit_finish.

And, I would like to understand why that is. My guess is that the interpreter and mJIT shares some of those codes, but not 100% sure. Especially, the description of mjit_finish is briefly saying that it is for finishing up whatever the operation is happening by the mJIT compiler. In such case, why does this function gets invoked when interpreter-only execution code?

If anyone has an idea regarding my question, any recommendation would be very much appreciated.

Thank you.

This is for ruby version 2.6.2. And, I've gone through the source code as well as the comments explaining each code, but they are not very clear.

HJL
  • 127
  • 6

0 Answers0