mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
If codeblock is NULL because YJIT is disabled, YJIT.runtime_stats should return Qnil
This commit is contained in:
parent
50029fb127
commit
dd23e4658b
1 changed files with 5 additions and 0 deletions
|
@ -702,6 +702,11 @@ comments_for(rb_execution_context_t *ec, VALUE self, VALUE start_address, VALUE
|
||||||
static VALUE
|
static VALUE
|
||||||
get_yjit_stats(rb_execution_context_t *ec, VALUE self)
|
get_yjit_stats(rb_execution_context_t *ec, VALUE self)
|
||||||
{
|
{
|
||||||
|
// Return Qnil if YJIT isn't enabled
|
||||||
|
if (cb == NULL) {
|
||||||
|
return Qnil;
|
||||||
|
}
|
||||||
|
|
||||||
VALUE hash = rb_hash_new();
|
VALUE hash = rb_hash_new();
|
||||||
|
|
||||||
RB_VM_LOCK_ENTER();
|
RB_VM_LOCK_ENTER();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue