Module: Datadog::Core::Environment::YJIT

Defined in:
lib/datadog/core/environment/yjit.rb

Overview

Reports YJIT primitive runtime statistics.

Class Method Summary collapse

Class Method Details

.available?Boolean

Returns:

  • (Boolean)


60
61
62
63
64
# File 'lib/datadog/core/environment/yjit.rb', line 60

def available?
  defined?(::RubyVM::YJIT) \
    && ::RubyVM::YJIT.enabled? \
    && ::RubyVM::YJIT.respond_to?(:runtime_stats)
end

.code_gc_countObject

Code GC count



36
37
38
# File 'lib/datadog/core/environment/yjit.rb', line 36

def code_gc_count
  ::RubyVM::YJIT.runtime_stats[:code_gc_count]
end

.code_region_sizeObject

Size of memory region allocated for JIT code



41
42
43
# File 'lib/datadog/core/environment/yjit.rb', line 41

def code_region_size
  ::RubyVM::YJIT.runtime_stats[:code_region_size]
end

.freed_code_sizeObject

GCed code size



26
27
28
# File 'lib/datadog/core/environment/yjit.rb', line 26

def freed_code_size
  ::RubyVM::YJIT.runtime_stats[:freed_code_size]
end

.freed_page_countObject

GCed pages



21
22
23
# File 'lib/datadog/core/environment/yjit.rb', line 21

def freed_page_count
  ::RubyVM::YJIT.runtime_stats[:freed_page_count]
end

.inline_code_sizeObject

Inline code size



11
12
13
# File 'lib/datadog/core/environment/yjit.rb', line 11

def inline_code_size
  ::RubyVM::YJIT.runtime_stats[:inline_code_size]
end

.live_page_countObject

Live pages



31
32
33
# File 'lib/datadog/core/environment/yjit.rb', line 31

def live_page_count
  ::RubyVM::YJIT.runtime_stats[:live_page_count]
end

.object_shape_countObject

Total number of object shapes



46
47
48
# File 'lib/datadog/core/environment/yjit.rb', line 46

def object_shape_count
  ::RubyVM::YJIT.runtime_stats[:object_shape_count]
end

.outlined_code_sizeObject

Outlined code size



16
17
18
# File 'lib/datadog/core/environment/yjit.rb', line 16

def outlined_code_size
  ::RubyVM::YJIT.runtime_stats[:outlined_code_size]
end

.ratio_in_yjitObject

Ratio of YJIT-executed instructions



56
57
58
# File 'lib/datadog/core/environment/yjit.rb', line 56

def ratio_in_yjit
  ::RubyVM::YJIT.runtime_stats[:ratio_in_yjit]
end

.yjit_alloc_sizeObject

Size of memory Rust allocated for metadata



51
52
53
# File 'lib/datadog/core/environment/yjit.rb', line 51

def yjit_alloc_size
  ::RubyVM::YJIT.runtime_stats[:yjit_alloc_size]
end