Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate additional Ruby VM stats for inclusion #2350

Open
fallwith opened this issue Dec 7, 2023 · 3 comments
Open

Evaluate additional Ruby VM stats for inclusion #2350

fallwith opened this issue Dec 7, 2023 · 3 comments

Comments

@fallwith
Copy link
Contributor

fallwith commented Dec 7, 2023

The agent currently reports on these 3 VM stats:

  • RubyVM.stat[:global_method_state]
  • RubyVM.stat[:constant_cache_invalidations] OR THE OLD RubyVM.stat[:global_constant_stats]
  • RubyVM.stat[:constant_cache_misses]

With Ruby 3.3 at least, there are 2 additional keys we currently ignore. Any value in reporting on them?

@fallwith fallwith added the jan-mar qtr Possible FY Q4 candidate label Dec 7, 2023
@workato-integration
Copy link

@fallwith
Copy link
Contributor Author

fallwith commented Feb 6, 2024

With Ruby 3.3, RubyVM.stat produces these 5 for me:

  • :constant_cache_invalidations
  • :constant_cache_misses
  • :global_cvar_state
  • :next_shape_id
  • :shape_cache_size

@fallwith
Copy link
Contributor Author

fallwith commented Feb 6, 2024

And with YJIT, we have these...

RubyVM::YJIT.runtime_stats without --yjit-stats

  • :inline_code_size
  • :outlined_code_size
  • :freed_page_count
  • :freed_code_size
  • :live_page_count
  • :code_region_size
  • :yjit_alloc_size
  • :vm_insns_count
  • :live_iseq_count
  • :code_gc_count
  • :compiled_iseq_entry
  • :cold_iseq_entry
  • :compiled_iseq_count
  • :compiled_blockid_count
  • :compiled_block_count
  • :compiled_branch_count
  • :compile_time_ns
  • :object_shape_count

RubyVM::YJIT.runtime_stats with --yjit-stats

  • :inline_code_size
  • :outlined_code_size
  • :freed_page_count
  • :freed_code_size
  • :live_page_count
  • :code_region_size
  • :yjit_alloc_size
  • :vm_insns_count
  • :live_iseq_count
  • :all_stats
  • :yjit_insns_count
  • :send_keywords
  • :send_kw_splat
  • :send_args_splat_super
  • :send_iseq_zsuper
  • :send_block_arg
  • :send_ivar_set_method
  • :send_zsuper_method
  • :send_undef_method
  • :send_optimized_method
  • :send_optimized_method_call
  • :send_optimized_method_block_call
  • :send_call_block
  • :send_call_kwarg
  • :send_call_multi_ractor
  • :send_cme_not_found
  • :send_megamorphic
  • :send_missing_method
  • :send_refined_method
  • :send_private_not_fcall
  • :send_cfunc_ruby_array_varg
  • :send_cfunc_argc_mismatch
  • :send_cfunc_toomany_args
  • :send_cfunc_tracing
  • :send_cfunc_kwargs
  • :send_cfunc_splat_with_kw
  • :send_cfunc_splat_send
  • :send_attrset_kwargs
  • :send_iseq_tailcall
  • :send_iseq_arity_error
  • :send_iseq_clobbering_block_arg
  • :send_iseq_leaf_builtin_block_arg_block_param
  • :send_iseq_only_keywords
  • :send_iseq_kwargs_req_and_opt_missing
  • :send_iseq_kwargs_mismatch
  • :send_iseq_has_post
  • :send_iseq_has_kwrest
  • :send_iseq_has_no_kw
  • :send_iseq_accepts_no_kwarg
  • :send_iseq_materialized_block
  • :send_iseq_splat_with_opt
  • :send_iseq_splat_with_kw
  • :send_iseq_missing_optional_kw
  • :send_iseq_too_many_kwargs
  • :send_not_implemented_method
  • :send_getter_arity
  • :send_args_splat_non_iseq
  • :send_args_splat_ivar
  • :send_args_splat_attrset
  • :send_args_splat_bmethod
  • :send_args_splat_aref
  • :send_args_splat_aset
  • :send_args_splat_opt_call
  • :send_args_splat_cfunc_var_args
  • :send_args_splat_cfunc_zuper
  • :send_args_splat_cfunc_ruby2_keywords
  • :send_iseq_splat_arity_error
  • :send_splat_too_long
  • :send_iseq_ruby2_keywords
  • :send_send_not_imm
  • :send_send_wrong_args
  • :send_send_null_mid
  • :send_send_null_cme
  • :send_send_nested
  • :send_send_chain_string
  • :send_send_chain_not_string_or_sym
  • :send_send_getter
  • :send_send_builtin
  • :send_iseq_has_rest_and_captured
  • :send_iseq_has_rest_and_splat
  • :send_iseq_has_rest_and_kw_supplied
  • :send_iseq_has_rest_opt_and_block
  • :send_bmethod_ractor
  • :send_bmethod_block_arg
  • :invokesuper_defined_class_mismatch
  • :invokesuper_kw_splat
  • :invokesuper_kwarg
  • :invokesuper_megamorphic
  • :invokesuper_no_cme
  • :invokesuper_no_me
  • :invokesuper_not_iseq_or_cfunc
  • :invokesuper_refinement
  • :invokeblock_megamorphic
  • :invokeblock_none
  • :invokeblock_iseq_arg0_optional
  • :invokeblock_iseq_arg0_has_kw
  • :invokeblock_iseq_arg0_args_splat
  • :invokeblock_iseq_arg0_not_array
  • :invokeblock_iseq_arg0_wrong_len
  • :invokeblock_ifunc_args_splat
  • :invokeblock_ifunc_kw_splat
  • :invokeblock_proc
  • :invokeblock_symbol
  • :guard_send_block_arg_type
  • :guard_send_klass_megamorphic
  • :guard_send_se_cf_overflow
  • :guard_send_se_protected_check_failed
  • :guard_send_splatarray_length_not_equal
  • :guard_send_splatarray_last_ruby_2_keywords
  • :guard_send_splat_not_array
  • :guard_send_send_chain
  • :guard_send_send_chain_not_string
  • :guard_send_send_chain_not_sym
  • :guard_send_iseq_has_rest_and_splat_too_few
  • :guard_send_is_a_class_mismatch
  • :guard_send_instance_of_class_mismatch
  • :guard_send_interrupted
  • :guard_send_not_fixnums
  • :guard_send_not_string
  • :guard_send_respond_to_mid_mismatch
  • :guard_invokesuper_me_changed
  • :guard_invokeblock_tag_changed
  • :guard_invokeblock_iseq_block_changed
  • :traced_cfunc_return
  • :leave_se_interrupt
  • :leave_interp_return
  • :getivar_se_self_not_heap
  • :getivar_idx_out_of_range
  • :getivar_megamorphic
  • :getivar_not_heap
  • :setivar_se_self_not_heap
  • :setivar_idx_out_of_range
  • :setivar_val_heapobject
  • :setivar_name_not_mapped
  • :setivar_not_heap
  • :setivar_frozen
  • :setivar_megamorphic
  • :definedivar_not_heap
  • :definedivar_megamorphic
  • :setlocal_wb_required
  • :opt_plus_overflow
  • :opt_minus_overflow
  • :opt_mult_overflow
  • :opt_mod_zero
  • :opt_div_zero
  • :lshift_amt_changed
  • :lshift_overflow
  • :opt_aref_argc_not_one
  • :opt_aref_arg_not_fixnum
  • :opt_aref_not_array
  • :opt_aref_not_hash
  • :opt_aset_not_array
  • :opt_aset_not_fixnum
  • :opt_aset_not_hash
  • :opt_aref_with_qundef
  • :opt_case_dispatch_megamorphic
  • :opt_getconstant_path_ic_miss
  • :opt_getconstant_path_multi_ractor
  • :expandarray_splat
  • :expandarray_postarg
  • :expandarray_not_array
  • :expandarray_comptime_not_array
  • :expandarray_chain_max_depth
  • :gbp_wb_required
  • :gbpp_unsupported_type
  • :gbpp_block_param_modified
  • :gbpp_block_handler_not_none
  • :gbpp_block_handler_not_iseq
  • :gbpp_block_handler_not_proc
  • :branchif_interrupted
  • :branchunless_interrupted
  • :branchnil_interrupted
  • :jump_interrupted
  • :objtostring_not_string
  • :binding_allocations
  • :binding_set
  • :compiled_iseq_entry
  • :cold_iseq_entry
  • :compiled_iseq_count
  • :compiled_blockid_count
  • :compiled_block_count
  • :compiled_branch_count
  • :compile_time_ns
  • :compilation_failure
  • :block_next_count
  • :defer_count
  • :defer_empty_count
  • :branch_insn_count
  • :branch_known_count
  • :freed_iseq_count
  • :exit_from_branch_stub
  • :invalidation_count
  • :invalidate_method_lookup
  • :invalidate_bop_redefined
  • :invalidate_ractor_spawn
  • :invalidate_constant_state_bump
  • :invalidate_constant_ic_fill
  • :constant_state_bumps
  • :exec_mem_non_bump_alloc
  • :code_gc_count
  • :num_gc_obj_refs
  • :num_send
  • :num_send_known_class
  • :num_send_polymorphic
  • :num_send_x86_rel32
  • :num_send_x86_reg
  • :num_send_dynamic
  • :num_send_inline
  • :num_send_leaf_builtin
  • :num_send_cfunc
  • :num_send_cfunc_inline
  • :num_getivar_megamorphic
  • :num_setivar_megamorphic
  • :num_throw
  • :num_throw_break
  • :num_throw_retry
  • :num_throw_return
  • :iseq_stack_too_large
  • :iseq_too_long
  • :temp_reg_opnd
  • :temp_mem_opnd
  • :temp_spill
  • :exit_nop
  • :exit_getlocal
  • :exit_setlocal
  • :exit_getblockparam
  • :exit_setblockparam
  • :exit_getblockparamproxy
  • :exit_getspecial
  • :exit_setspecial
  • :exit_getinstancevariable
  • :exit_setinstancevariable
  • :exit_getclassvariable
  • :exit_setclassvariable
  • :exit_opt_getconstant_path
  • :exit_getconstant
  • :exit_setconstant
  • :exit_getglobal
  • :exit_setglobal
  • :exit_putnil
  • :exit_putself
  • :exit_putobject
  • :exit_putspecialobject
  • :exit_putstring
  • :exit_concatstrings
  • :exit_anytostring
  • :exit_toregexp
  • :exit_intern
  • :exit_newarray
  • :exit_newarraykwsplat
  • :exit_duparray
  • :exit_duphash
  • :exit_expandarray
  • :exit_concatarray
  • :exit_splatarray
  • :exit_splatkw
  • :exit_newhash
  • :exit_newrange
  • :exit_pop
  • :exit_dup
  • :exit_dupn
  • :exit_swap
  • :exit_opt_reverse
  • :exit_topn
  • :exit_setn
  • :exit_adjuststack
  • :exit_defined
  • :exit_definedivar
  • :exit_checkmatch
  • :exit_checkkeyword
  • :exit_checktype
  • :exit_defineclass
  • :exit_definemethod
  • :exit_definesmethod
  • :exit_send
  • :exit_opt_send_without_block
  • :exit_objtostring
  • :exit_opt_str_freeze
  • :exit_opt_nil_p
  • :exit_opt_str_uminus
  • :exit_opt_newarray_send
  • :exit_invokesuper
  • :exit_invokeblock
  • :exit_leave
  • :exit_throw
  • :exit_jump
  • :exit_branchif
  • :exit_branchunless
  • :exit_branchnil
  • :exit_once
  • :exit_opt_case_dispatch
  • :exit_opt_plus
  • :exit_opt_minus
  • :exit_opt_mult
  • :exit_opt_div
  • :exit_opt_mod
  • :exit_opt_eq
  • :exit_opt_neq
  • :exit_opt_lt
  • :exit_opt_le
  • :exit_opt_gt
  • :exit_opt_ge
  • :exit_opt_ltlt
  • :exit_opt_and
  • :exit_opt_or
  • :exit_opt_aref
  • :exit_opt_aset
  • :exit_opt_aset_with
  • :exit_opt_aref_with
  • :exit_opt_length
  • :exit_opt_size
  • :exit_opt_empty_p
  • :exit_opt_succ
  • :exit_opt_not
  • :exit_opt_regexpmatch2
  • :exit_invokebuiltin
  • :exit_opt_invokebuiltin_delegate
  • :exit_opt_invokebuiltin_delegate_leave
  • :exit_getlocal_WC_0
  • :exit_getlocal_WC_1
  • :exit_setlocal_WC_0
  • :exit_setlocal_WC_1
  • :exit_putobject_INT2FIX_0_
  • :exit_putobject_INT2FIX_1_
  • :exit_trace_nop
  • :exit_trace_getlocal
  • :exit_trace_setlocal
  • :exit_trace_getblockparam
  • :exit_trace_setblockparam
  • :exit_trace_getblockparamproxy
  • :exit_trace_getspecial
  • :exit_trace_setspecial
  • :exit_trace_getinstancevariable
  • :exit_trace_setinstancevariable
  • :exit_trace_getclassvariable
  • :exit_trace_setclassvariable
  • :exit_trace_opt_getconstant_path
  • :exit_trace_getconstant
  • :exit_trace_setconstant
  • :exit_trace_getglobal
  • :exit_trace_setglobal
  • :exit_trace_putnil
  • :exit_trace_putself
  • :exit_trace_putobject
  • :exit_trace_putspecialobject
  • :exit_trace_putstring
  • :exit_trace_concatstrings
  • :exit_trace_anytostring
  • :exit_trace_toregexp
  • :exit_trace_intern
  • :exit_trace_newarray
  • :exit_trace_newarraykwsplat
  • :exit_trace_duparray
  • :exit_trace_duphash
  • :exit_trace_expandarray
  • :exit_trace_concatarray
  • :exit_trace_splatarray
  • :exit_trace_splatkw
  • :exit_trace_newhash
  • :exit_trace_newrange
  • :exit_trace_pop
  • :exit_trace_dup
  • :exit_trace_dupn
  • :exit_trace_swap
  • :exit_trace_opt_reverse
  • :exit_trace_topn
  • :exit_trace_setn
  • :exit_trace_adjuststack
  • :exit_trace_defined
  • :exit_trace_definedivar
  • :exit_trace_checkmatch
  • :exit_trace_checkkeyword
  • :exit_trace_checktype
  • :exit_trace_defineclass
  • :exit_trace_definemethod
  • :exit_trace_definesmethod
  • :exit_trace_send
  • :exit_trace_opt_send_without_block
  • :exit_trace_objtostring
  • :exit_trace_opt_str_freeze
  • :exit_trace_opt_nil_p
  • :exit_trace_opt_str_uminus
  • :exit_trace_opt_newarray_send
  • :exit_trace_invokesuper
  • :exit_trace_invokeblock
  • :exit_trace_leave
  • :exit_trace_throw
  • :exit_trace_jump
  • :exit_trace_branchif
  • :exit_trace_branchunless
  • :exit_trace_branchnil
  • :exit_trace_once
  • :exit_trace_opt_case_dispatch
  • :exit_trace_opt_plus
  • :exit_trace_opt_minus
  • :exit_trace_opt_mult
  • :exit_trace_opt_div
  • :exit_trace_opt_mod
  • :exit_trace_opt_eq
  • :exit_trace_opt_neq
  • :exit_trace_opt_lt
  • :exit_trace_opt_le
  • :exit_trace_opt_gt
  • :exit_trace_opt_ge
  • :exit_trace_opt_ltlt
  • :exit_trace_opt_and
  • :exit_trace_opt_or
  • :exit_trace_opt_aref
  • :exit_trace_opt_aset
  • :exit_trace_opt_aset_with
  • :exit_trace_opt_aref_with
  • :exit_trace_opt_length
  • :exit_trace_opt_size
  • :exit_trace_opt_empty_p
  • :exit_trace_opt_succ
  • :exit_trace_opt_not
  • :exit_trace_opt_regexpmatch2
  • :exit_trace_invokebuiltin
  • :exit_trace_opt_invokebuiltin_delegate
  • :exit_trace_opt_invokebuiltin_delegate_leave
  • :exit_trace_getlocal_WC_0
  • :exit_trace_getlocal_WC_1
  • :exit_trace_setlocal_WC_0
  • :exit_trace_setlocal_WC_1
  • :exit_trace_putobject_INT2FIX_0_
  • :exit_trace_putobject_INT2FIX_1_
  • :cfunc_calls
  • :object_shape_count
  • :total_insns_count
  • :ratio_in_yjit
  • :side_exit_count
  • :total_exit_count
  • :avg_len_in_yjit

@kford-newrelic kford-newrelic removed the estimate Issue needing estimation label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants