mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
ZJIT: Profile opt_and
and opt_or
instructions
This commit is contained in:
parent
b146eae3b5
commit
10b582dab6
3 changed files with 7 additions and 1 deletions
|
@ -1481,6 +1481,7 @@ opt_and
|
|||
(CALL_DATA cd)
|
||||
(VALUE recv, VALUE obj)
|
||||
(VALUE val)
|
||||
// attr bool zjit_profile = true;
|
||||
{
|
||||
val = vm_opt_and(recv, obj);
|
||||
|
||||
|
@ -1495,6 +1496,7 @@ opt_or
|
|||
(CALL_DATA cd)
|
||||
(VALUE recv, VALUE obj)
|
||||
(VALUE val)
|
||||
// attr bool zjit_profile = true;
|
||||
{
|
||||
val = vm_opt_or(recv, obj);
|
||||
|
||||
|
|
4
zjit/src/cruby_bindings.inc.rs
generated
4
zjit/src/cruby_bindings.inc.rs
generated
|
@ -695,7 +695,9 @@ pub const YARVINSN_zjit_opt_lt: ruby_vminsn_type = 231;
|
|||
pub const YARVINSN_zjit_opt_le: ruby_vminsn_type = 232;
|
||||
pub const YARVINSN_zjit_opt_gt: ruby_vminsn_type = 233;
|
||||
pub const YARVINSN_zjit_opt_ge: ruby_vminsn_type = 234;
|
||||
pub const VM_INSTRUCTION_SIZE: ruby_vminsn_type = 235;
|
||||
pub const YARVINSN_zjit_opt_and: ruby_vminsn_type = 235;
|
||||
pub const YARVINSN_zjit_opt_or: ruby_vminsn_type = 236;
|
||||
pub const VM_INSTRUCTION_SIZE: ruby_vminsn_type = 237;
|
||||
pub type ruby_vminsn_type = u32;
|
||||
pub type rb_iseq_callback = ::std::option::Option<
|
||||
unsafe extern "C" fn(arg1: *const rb_iseq_t, arg2: *mut ::std::os::raw::c_void),
|
||||
|
|
|
@ -63,6 +63,8 @@ fn profile_insn(profiler: &mut Profiler, opcode: ruby_vminsn_type) {
|
|||
YARVINSN_opt_le => profile_operands(profiler, 2),
|
||||
YARVINSN_opt_gt => profile_operands(profiler, 2),
|
||||
YARVINSN_opt_ge => profile_operands(profiler, 2),
|
||||
YARVINSN_opt_and => profile_operands(profiler, 2),
|
||||
YARVINSN_opt_or => profile_operands(profiler, 2),
|
||||
YARVINSN_opt_send_without_block => {
|
||||
let cd: *const rb_call_data = profiler.insn_opnd(0).as_ptr();
|
||||
let argc = unsafe { vm_ci_argc((*cd).ci) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue