Project

General

Profile

Actions

Feature #14954

closed

Add :wait option to RubyVM::MJIT.pause

Added by k0kubun (Takashi Kokubun) over 5 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:88228]

Description

Problem

To measure an MJIT-generated code's performance, currently we need to do sleep ...; RubyVM::MJIT.pause and it's hard to decide an appropriate sleep seconds.

Solution

Add an :wait option (default: true) and:

# Wait for finishing all of queued compilations, and pause MJIT worker (different from the current behavior).
# This will be convenient for most of micro benchmarks. So I wanna make it default. It will be breaking but MJIT.pause is not released anywhere.
RubyVM::MJIT.pause
RubyVM::MJIT.pause(wait: true)

# Wait only for a currently-compiled method, and pause MJIT worker immediately (the current behavior).
# This will be convenient when there are many methods, like on Rails.
RubyVM::MJIT.pause(wait: false)

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #14830: RubyVM::MJIT.pause / RubyVM::MJIT.resumeClosedk0kubun (Takashi Kokubun)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0