datadog-ruby_core_source 3.5.1 → 3.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/datadog-ruby_core_source.gemspec +1 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/id.h +3 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/id_table.h +10 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/array.h +1 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/basic_operators.h +1 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/bignum.h +21 -10
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/bits.h +14 -17
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/box.h +18 -3
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/class.h +39 -95
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/cont.h +0 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/eval.h +2 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/gc.h +7 -5
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/imemo.h +1 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/inits.h +1 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/load.h +1 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/numeric.h +48 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/rational.h +3 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/thread.h +2 -2
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/time.h +2 -5
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/variable.h +2 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/vm.h +2 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/iseq.h +3 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/method.h +7 -2
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/ast.h +38 -17
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/diagnostic.h +2 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/extension.h +1 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/options.h +4 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/prism.h +1 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/version.h +3 -3
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/ractor_core.h +25 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/ruby_atomic.h +7 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/rubyparser.h +0 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/shape.h +30 -10
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/thread_pthread.h +11 -1
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/vm_core.h +70 -12
- data/lib/datadog/ruby_core_source/version.rb +1 -1
- data/lib/datadog/ruby_core_source.rb +2 -2
- metadata +108 -110
- data/spec/datadog/ruby_core_source_spec.rb +0 -85
- data/spec/spec_helper.rb +0 -94
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/ccan/list/list.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/ccan/str/str.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/cmdlineopt.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/compar.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/compile.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/compilers.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/complex.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/concurrent_set.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/dir.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/enc.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/encoding.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/enum.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/enumerator.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/error.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/file.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/fixnum.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/hash.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/io.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/loadpath.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/math.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/missing.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/object.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/parse.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/proc.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/process.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/ractor.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/random.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/range.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/re.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/ruby_parser.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/sanitizers.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/serial.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/set_table.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/signal.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/st.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/static_assert.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/string.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/struct.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/symbol.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/transcode.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/util.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal/warnings.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/internal.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/node.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/parser_st.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/parser_value.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/defines.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/encoding.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/node.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/pack.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/parser.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/prettyprint.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/regexp.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/static_literals.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_buffer.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_char.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_constant_pool.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_integer.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_list.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_memchr.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_newline_list.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_string.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_strncasecmp.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism/util/pm_strpbrk.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/prism_compile.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/ruby_assert.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/thread_none.h +0 -0
- data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/vm_debug.h +4 -4
- /data/lib/datadog/ruby_core_source/{ruby-4.0.0-preview2 → ruby-4.0.6-p0}/vm_opts.h +0 -0
|
@@ -317,6 +317,8 @@ struct rb_calling_info {
|
|
|
317
317
|
#define VM_ARGC_STACK_MAX 128
|
|
318
318
|
#endif
|
|
319
319
|
|
|
320
|
+
#define VM_KW_SPECIFIED_BITS_MAX (32-1) /* TODO: 32 -> Fixnum's max bits */
|
|
321
|
+
|
|
320
322
|
# define CALLING_ARGC(calling) ((calling)->heap_argv ? RARRAY_LENINT((calling)->heap_argv) : (calling)->argc)
|
|
321
323
|
|
|
322
324
|
struct rb_execution_context_struct;
|
|
@@ -429,7 +431,7 @@ struct rb_iseq_constant_body {
|
|
|
429
431
|
* size = M+N+O+(*1)+K+(&1)+(**1) // parameter size.
|
|
430
432
|
*/
|
|
431
433
|
|
|
432
|
-
struct {
|
|
434
|
+
struct rb_iseq_parameters {
|
|
433
435
|
struct {
|
|
434
436
|
unsigned int has_lead : 1;
|
|
435
437
|
unsigned int has_opt : 1;
|
|
@@ -582,7 +584,7 @@ struct rb_iseq_struct {
|
|
|
582
584
|
} loader;
|
|
583
585
|
|
|
584
586
|
struct {
|
|
585
|
-
|
|
587
|
+
unsigned int local_hooks_cnt;
|
|
586
588
|
rb_event_flag_t global_trace_events;
|
|
587
589
|
} exec;
|
|
588
590
|
} aux;
|
|
@@ -648,15 +650,21 @@ void *rb_objspace_alloc(void);
|
|
|
648
650
|
void rb_objspace_free(void *objspace);
|
|
649
651
|
void rb_objspace_call_finalizer(void);
|
|
650
652
|
|
|
653
|
+
enum rb_hook_list_type {
|
|
654
|
+
hook_list_type_ractor_local,
|
|
655
|
+
hook_list_type_targeted_iseq,
|
|
656
|
+
hook_list_type_targeted_def, // C function
|
|
657
|
+
hook_list_type_global
|
|
658
|
+
};
|
|
659
|
+
|
|
651
660
|
typedef struct rb_hook_list_struct {
|
|
652
661
|
struct rb_event_hook_struct *hooks;
|
|
653
662
|
rb_event_flag_t events;
|
|
654
663
|
unsigned int running;
|
|
664
|
+
enum rb_hook_list_type type;
|
|
655
665
|
bool need_clean;
|
|
656
|
-
bool is_local;
|
|
657
666
|
} rb_hook_list_t;
|
|
658
667
|
|
|
659
|
-
|
|
660
668
|
// see builtin.h for definition
|
|
661
669
|
typedef const struct rb_builtin_function *RB_BUILTIN;
|
|
662
670
|
|
|
@@ -755,6 +763,7 @@ typedef struct rb_vm_struct {
|
|
|
755
763
|
const VALUE special_exceptions[ruby_special_error_count];
|
|
756
764
|
|
|
757
765
|
/* Ruby Box */
|
|
766
|
+
rb_box_t *master_box;
|
|
758
767
|
rb_box_t *root_box;
|
|
759
768
|
rb_box_t *main_box;
|
|
760
769
|
|
|
@@ -768,6 +777,9 @@ typedef struct rb_vm_struct {
|
|
|
768
777
|
VALUE cmd[RUBY_NSIG];
|
|
769
778
|
} trap_list;
|
|
770
779
|
|
|
780
|
+
/* hook (for internal events: NEWOBJ, FREEOBJ, GC events, etc.) */
|
|
781
|
+
rb_hook_list_t global_hooks;
|
|
782
|
+
|
|
771
783
|
/* postponed_job (async-signal-safe, and thread-safe) */
|
|
772
784
|
struct rb_postponed_job_queue *postponed_job_queue;
|
|
773
785
|
|
|
@@ -1036,6 +1048,8 @@ struct rb_execution_context_struct {
|
|
|
1036
1048
|
|
|
1037
1049
|
rb_fiber_t *fiber_ptr;
|
|
1038
1050
|
struct rb_thread_struct *thread_ptr;
|
|
1051
|
+
rb_serial_t serial;
|
|
1052
|
+
rb_serial_t ractor_id;
|
|
1039
1053
|
|
|
1040
1054
|
/* storage (ec (fiber) local) */
|
|
1041
1055
|
struct rb_id_table *local_storage;
|
|
@@ -1102,6 +1116,10 @@ void rb_ec_initialize_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t
|
|
|
1102
1116
|
// @param ec the execution context to update.
|
|
1103
1117
|
void rb_ec_clear_vm_stack(rb_execution_context_t *ec);
|
|
1104
1118
|
|
|
1119
|
+
// Close an execution context and free related resources that are no longer needed.
|
|
1120
|
+
// @param ec the execution context to close.
|
|
1121
|
+
void rb_ec_close(rb_execution_context_t *ec);
|
|
1122
|
+
|
|
1105
1123
|
struct rb_ext_config {
|
|
1106
1124
|
bool ractor_safe;
|
|
1107
1125
|
};
|
|
@@ -2019,14 +2037,22 @@ rb_execution_context_t *rb_vm_main_ractor_ec(rb_vm_t *vm); // ractor.c
|
|
|
2019
2037
|
RUBY_EXTERN struct rb_ractor_struct *ruby_single_main_ractor; // ractor.c
|
|
2020
2038
|
RUBY_EXTERN rb_vm_t *ruby_current_vm_ptr;
|
|
2021
2039
|
RUBY_EXTERN rb_event_flag_t ruby_vm_event_flags;
|
|
2022
|
-
RUBY_EXTERN rb_event_flag_t ruby_vm_event_enabled_global_flags;
|
|
2023
|
-
RUBY_EXTERN unsigned int
|
|
2040
|
+
RUBY_EXTERN rb_event_flag_t ruby_vm_event_enabled_global_flags; // only ever added to
|
|
2041
|
+
RUBY_EXTERN unsigned int ruby_vm_iseq_events_enabled;
|
|
2042
|
+
RUBY_EXTERN unsigned int ruby_vm_c_events_enabled;
|
|
2024
2043
|
|
|
2025
2044
|
#define GET_VM() rb_current_vm()
|
|
2026
2045
|
#define GET_RACTOR() rb_current_ractor()
|
|
2027
2046
|
#define GET_THREAD() rb_current_thread()
|
|
2028
2047
|
#define GET_EC() rb_current_execution_context(true)
|
|
2029
2048
|
|
|
2049
|
+
static inline rb_serial_t
|
|
2050
|
+
rb_ec_serial(struct rb_execution_context_struct *ec)
|
|
2051
|
+
{
|
|
2052
|
+
VM_ASSERT(ec->serial >= 1);
|
|
2053
|
+
return ec->serial;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2030
2056
|
static inline rb_thread_t *
|
|
2031
2057
|
rb_ec_thread_ptr(const rb_execution_context_t *ec)
|
|
2032
2058
|
{
|
|
@@ -2046,6 +2072,14 @@ rb_ec_ractor_ptr(const rb_execution_context_t *ec)
|
|
|
2046
2072
|
}
|
|
2047
2073
|
}
|
|
2048
2074
|
|
|
2075
|
+
static inline rb_serial_t
|
|
2076
|
+
rb_ec_ractor_id(const rb_execution_context_t *ec)
|
|
2077
|
+
{
|
|
2078
|
+
rb_serial_t ractor_id = ec->ractor_id;
|
|
2079
|
+
RUBY_ASSERT(ractor_id);
|
|
2080
|
+
return ractor_id;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2049
2083
|
static inline rb_vm_t *
|
|
2050
2084
|
rb_ec_vm_ptr(const rb_execution_context_t *ec)
|
|
2051
2085
|
{
|
|
@@ -2074,9 +2108,9 @@ rb_current_execution_context(bool expect_ec)
|
|
|
2074
2108
|
* and the address of the `ruby_current_ec` can be stored on a function
|
|
2075
2109
|
* frame. However, this address can be mis-used after native thread
|
|
2076
2110
|
* migration of a coroutine.
|
|
2077
|
-
* 1) Get `ptr
|
|
2111
|
+
* 1) Get `ptr = &ruby_current_ec` on NT1 and store it on the frame.
|
|
2078
2112
|
* 2) Context switch and resume it on the NT2.
|
|
2079
|
-
* 3) `ptr` is used on NT2 but it accesses
|
|
2113
|
+
* 3) `ptr` is used on NT2 but it accesses the TLS of NT1.
|
|
2080
2114
|
* This assertion checks such misusage.
|
|
2081
2115
|
*
|
|
2082
2116
|
* To avoid accidents, `GET_EC()` should be called once on the frame.
|
|
@@ -2200,6 +2234,7 @@ int rb_signal_buff_size(void);
|
|
|
2200
2234
|
int rb_signal_exec(rb_thread_t *th, int sig);
|
|
2201
2235
|
void rb_threadptr_check_signal(rb_thread_t *mth);
|
|
2202
2236
|
void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
|
|
2237
|
+
void rb_threadptr_interrupt_raise(rb_thread_t *th);
|
|
2203
2238
|
void rb_threadptr_signal_exit(rb_thread_t *th);
|
|
2204
2239
|
int rb_threadptr_execute_interrupts(rb_thread_t *, int);
|
|
2205
2240
|
void rb_threadptr_interrupt(rb_thread_t *th);
|
|
@@ -2255,8 +2290,9 @@ struct rb_trace_arg_struct {
|
|
|
2255
2290
|
void rb_hook_list_mark(rb_hook_list_t *hooks);
|
|
2256
2291
|
void rb_hook_list_mark_and_move(rb_hook_list_t *hooks);
|
|
2257
2292
|
void rb_hook_list_free(rb_hook_list_t *hooks);
|
|
2258
|
-
void
|
|
2259
|
-
|
|
2293
|
+
void rb_hook_list_connect_local_tracepoint(rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
|
|
2294
|
+
bool rb_hook_list_remove_local_tracepoint(rb_hook_list_t *list, VALUE tpval);
|
|
2295
|
+
unsigned int rb_hook_list_count(rb_hook_list_t *list);
|
|
2260
2296
|
|
|
2261
2297
|
void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p);
|
|
2262
2298
|
|
|
@@ -2295,6 +2331,8 @@ struct rb_ractor_pub {
|
|
|
2295
2331
|
VALUE self;
|
|
2296
2332
|
uint32_t id;
|
|
2297
2333
|
rb_hook_list_t hooks;
|
|
2334
|
+
st_table *targeted_hooks; // also called "local hooks". {ISEQ => hook_list, def => hook_list...}
|
|
2335
|
+
unsigned int targeted_hooks_cnt; // ex: tp.enabled(target: method(:puts))
|
|
2298
2336
|
};
|
|
2299
2337
|
|
|
2300
2338
|
static inline rb_hook_list_t *
|
|
@@ -2304,11 +2342,31 @@ rb_ec_ractor_hooks(const rb_execution_context_t *ec)
|
|
|
2304
2342
|
return &cr_pub->hooks;
|
|
2305
2343
|
}
|
|
2306
2344
|
|
|
2345
|
+
static inline rb_hook_list_t *
|
|
2346
|
+
rb_vm_global_hooks(const rb_execution_context_t *ec)
|
|
2347
|
+
{
|
|
2348
|
+
return &rb_ec_vm_ptr(ec)->global_hooks;
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
static inline rb_hook_list_t *
|
|
2352
|
+
rb_ec_hooks(const rb_execution_context_t *ec, rb_event_flag_t event)
|
|
2353
|
+
{
|
|
2354
|
+
// Should be a single bit set
|
|
2355
|
+
VM_ASSERT(event != 0 && ((event - 1) & event) == 0);
|
|
2356
|
+
|
|
2357
|
+
if (event & RUBY_INTERNAL_EVENT_OBJSPACE_MASK) {
|
|
2358
|
+
return rb_vm_global_hooks(ec);
|
|
2359
|
+
}
|
|
2360
|
+
else {
|
|
2361
|
+
return rb_ec_ractor_hooks(ec);
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2307
2365
|
#define EXEC_EVENT_HOOK(ec_, flag_, self_, id_, called_id_, klass_, data_) \
|
|
2308
|
-
EXEC_EVENT_HOOK_ORIG(ec_,
|
|
2366
|
+
EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_hooks(ec_, flag_), flag_, self_, id_, called_id_, klass_, data_, 0)
|
|
2309
2367
|
|
|
2310
2368
|
#define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_, flag_, self_, id_, called_id_, klass_, data_) \
|
|
2311
|
-
EXEC_EVENT_HOOK_ORIG(ec_,
|
|
2369
|
+
EXEC_EVENT_HOOK_ORIG(ec_, rb_ec_hooks(ec_, flag_), flag_, self_, id_, called_id_, klass_, data_, 1)
|
|
2312
2370
|
|
|
2313
2371
|
static inline void
|
|
2314
2372
|
rb_exec_event_hook_script_compiled(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE eval_script)
|
|
@@ -48,8 +48,8 @@ module Datadog
|
|
|
48
48
|
return false
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
-
def self.deduce_packaged_source_dir(ruby_dir)
|
|
52
|
-
prefix =
|
|
51
|
+
def self.deduce_packaged_source_dir(ruby_dir, relative_to: File.dirname(__FILE__))
|
|
52
|
+
prefix = relative_to + '/ruby_core_source/'
|
|
53
53
|
expected_directory = prefix + ruby_dir
|
|
54
54
|
if (RUBY_REVISION.is_a? String or RUBY_REVISION > 0) and File.directory?(expected_directory)
|
|
55
55
|
expected_directory
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: datadog-ruby_core_source
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.5.
|
|
4
|
+
version: 3.5.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mark Moseley
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2026-
|
|
14
|
+
date: 2026-07-15 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: archive-tar-minitar
|
|
@@ -530,115 +530,113 @@ files:
|
|
|
530
530
|
- lib/datadog/ruby_core_source/ruby-4.0.0-p0/vm_core.h
|
|
531
531
|
- lib/datadog/ruby_core_source/ruby-4.0.0-p0/vm_debug.h
|
|
532
532
|
- lib/datadog/ruby_core_source/ruby-4.0.0-p0/vm_opts.h
|
|
533
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
534
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
535
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
536
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
537
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
538
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
539
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
540
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
541
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
542
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
543
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
544
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
545
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
546
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
547
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
548
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
549
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
550
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
551
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
552
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
553
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
554
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
555
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
556
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
557
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
558
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
559
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
560
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
561
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
562
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
563
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
564
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
565
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
566
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
567
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
568
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
569
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
570
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
571
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
572
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
573
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
574
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
575
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
576
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
577
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
578
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
579
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
580
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
581
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
582
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
583
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
584
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
585
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
586
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
587
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
588
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
589
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
590
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
591
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
592
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
593
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
594
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
595
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
596
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
597
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
598
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
599
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
600
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
601
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
602
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
603
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
604
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
605
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
606
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
607
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
608
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
609
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
610
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
611
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
612
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
613
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
614
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
615
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
616
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
617
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
618
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
619
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
620
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
621
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
622
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
623
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
624
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
625
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
626
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
627
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
628
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
629
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
630
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
631
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
632
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
633
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
634
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
635
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
636
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
637
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
638
|
-
- lib/datadog/ruby_core_source/ruby-4.0.
|
|
533
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/ccan/build_assert/build_assert.h
|
|
534
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/ccan/check_type/check_type.h
|
|
535
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/ccan/container_of/container_of.h
|
|
536
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/ccan/list/list.h
|
|
537
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/ccan/str/str.h
|
|
538
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/id.h
|
|
539
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/id_table.h
|
|
540
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal.h
|
|
541
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/array.h
|
|
542
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/basic_operators.h
|
|
543
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/bignum.h
|
|
544
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/bits.h
|
|
545
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/box.h
|
|
546
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/class.h
|
|
547
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/cmdlineopt.h
|
|
548
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/compar.h
|
|
549
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/compile.h
|
|
550
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/compilers.h
|
|
551
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/complex.h
|
|
552
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/concurrent_set.h
|
|
553
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/cont.h
|
|
554
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/dir.h
|
|
555
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enc.h
|
|
556
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/encoding.h
|
|
557
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enum.h
|
|
558
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/enumerator.h
|
|
559
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/error.h
|
|
560
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/eval.h
|
|
561
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/file.h
|
|
562
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/fixnum.h
|
|
563
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/gc.h
|
|
564
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/hash.h
|
|
565
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/imemo.h
|
|
566
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/inits.h
|
|
567
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/io.h
|
|
568
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/load.h
|
|
569
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/loadpath.h
|
|
570
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/math.h
|
|
571
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/missing.h
|
|
572
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/numeric.h
|
|
573
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/object.h
|
|
574
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/parse.h
|
|
575
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/proc.h
|
|
576
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/process.h
|
|
577
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/ractor.h
|
|
578
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/random.h
|
|
579
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/range.h
|
|
580
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/rational.h
|
|
581
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/re.h
|
|
582
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/ruby_parser.h
|
|
583
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/sanitizers.h
|
|
584
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/serial.h
|
|
585
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/set_table.h
|
|
586
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/signal.h
|
|
587
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/st.h
|
|
588
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/static_assert.h
|
|
589
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/string.h
|
|
590
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/struct.h
|
|
591
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/symbol.h
|
|
592
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/thread.h
|
|
593
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/time.h
|
|
594
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/transcode.h
|
|
595
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/util.h
|
|
596
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/variable.h
|
|
597
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/vm.h
|
|
598
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/internal/warnings.h
|
|
599
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/iseq.h
|
|
600
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/method.h
|
|
601
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/node.h
|
|
602
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/parser_st.h
|
|
603
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/parser_value.h
|
|
604
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/ast.h
|
|
605
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/defines.h
|
|
606
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/diagnostic.h
|
|
607
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/encoding.h
|
|
608
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/extension.h
|
|
609
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/node.h
|
|
610
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/options.h
|
|
611
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/pack.h
|
|
612
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/parser.h
|
|
613
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/prettyprint.h
|
|
614
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/prism.h
|
|
615
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/regexp.h
|
|
616
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/static_literals.h
|
|
617
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_buffer.h
|
|
618
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_char.h
|
|
619
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_constant_pool.h
|
|
620
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_integer.h
|
|
621
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_list.h
|
|
622
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_memchr.h
|
|
623
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_newline_list.h
|
|
624
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_string.h
|
|
625
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_strncasecmp.h
|
|
626
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/util/pm_strpbrk.h
|
|
627
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism/version.h
|
|
628
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/prism_compile.h
|
|
629
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/ractor_core.h
|
|
630
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/ruby_assert.h
|
|
631
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/ruby_atomic.h
|
|
632
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/rubyparser.h
|
|
633
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/shape.h
|
|
634
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/thread_none.h
|
|
635
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/thread_pthread.h
|
|
636
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/vm_core.h
|
|
637
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/vm_debug.h
|
|
638
|
+
- lib/datadog/ruby_core_source/ruby-4.0.6-p0/vm_opts.h
|
|
639
639
|
- lib/datadog/ruby_core_source/version.rb
|
|
640
|
-
- spec/datadog/ruby_core_source_spec.rb
|
|
641
|
-
- spec/spec_helper.rb
|
|
642
640
|
homepage: https://github.com/DataDog/datadog-ruby_core_source
|
|
643
641
|
licenses:
|
|
644
642
|
- MIT
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
require 'datadog/ruby_core_source'
|
|
3
|
-
|
|
4
|
-
RSpec.describe Datadog::RubyCoreSource do
|
|
5
|
-
describe '.deduce_packaged_source_dir' do
|
|
6
|
-
before do
|
|
7
|
-
stub_const('RUBY_VERSION', ruby_version)
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
context 'when a stable exact match exists' do
|
|
11
|
-
let(:ruby_version) { '3.4.0' }
|
|
12
|
-
let(:ruby_dir) { 'ruby-3.4.0-p0' }
|
|
13
|
-
|
|
14
|
-
it 'returns the exact match directory' do
|
|
15
|
-
result = described_class.deduce_packaged_source_dir(ruby_dir)
|
|
16
|
-
expect(result).to end_with("/#{ruby_dir}")
|
|
17
|
-
expect(File.directory?(result)).to be true
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
context 'when a preview exact match exists' do
|
|
22
|
-
let(:ruby_version) { '4.0.0' } # Important: "preview" label doesn't show up on RUBY_VERSION
|
|
23
|
-
let(:ruby_dir) { 'ruby-4.0.0-preview2' }
|
|
24
|
-
|
|
25
|
-
it 'returns the exact match directory' do
|
|
26
|
-
result = described_class.deduce_packaged_source_dir(ruby_dir)
|
|
27
|
-
expect(result).to end_with('/ruby-4.0.0-preview2')
|
|
28
|
-
expect(File.directory?(result)).to be true
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
context 'when exact match does not exist' do
|
|
33
|
-
context 'with a patch version upgrade and there are no preview headers' do
|
|
34
|
-
let(:ruby_version) { '3.4.1' }
|
|
35
|
-
let(:ruby_dir) { 'ruby-3.4.1-p0' }
|
|
36
|
-
|
|
37
|
-
it 'falls back to the closest older version' do
|
|
38
|
-
expect(described_class).to receive(:fallback_source_warning).with(ruby_dir, 'ruby-3.4.0-p0')
|
|
39
|
-
|
|
40
|
-
result = described_class.deduce_packaged_source_dir(ruby_dir)
|
|
41
|
-
expect(result).to end_with('/ruby-3.4.0-p0')
|
|
42
|
-
expect(File.directory?(result)).to be true
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
context 'with a patch version upgrade and there are preview headers' do
|
|
47
|
-
let(:ruby_version) { '4.0.1' }
|
|
48
|
-
let(:ruby_dir) { 'ruby-4.0.1-p0' }
|
|
49
|
-
|
|
50
|
-
it 'falls back to the closest older version' do
|
|
51
|
-
expect(described_class).to receive(:fallback_source_warning).with(ruby_dir, 'ruby-4.0.0-p0')
|
|
52
|
-
|
|
53
|
-
result = described_class.deduce_packaged_source_dir(ruby_dir)
|
|
54
|
-
expect(result).to end_with('/ruby-4.0.0-p0')
|
|
55
|
-
expect(File.directory?(result)).to be true
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
context 'with a preview version' do
|
|
60
|
-
let(:ruby_version) { '4.0.0' } # Important: "preview" label doesn't show up on RUBY_VERSION
|
|
61
|
-
let(:ruby_dir) { 'ruby-4.0.0-preview3' }
|
|
62
|
-
|
|
63
|
-
it 'falls back to the stable version' do
|
|
64
|
-
expect(described_class).to receive(:fallback_source_warning).with(ruby_dir, 'ruby-4.0.0-p0')
|
|
65
|
-
|
|
66
|
-
result = described_class.deduce_packaged_source_dir(ruby_dir)
|
|
67
|
-
expect(result).to end_with('/ruby-4.0.0-p0')
|
|
68
|
-
expect(File.directory?(result)).to be true
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
describe '.ruby_source_dir_version' do
|
|
75
|
-
it 'parses stable versions correctly' do
|
|
76
|
-
expect(described_class.ruby_source_dir_version('ruby-2.7.0-p0')).to eq(Gem::Version.new('2.7.0'))
|
|
77
|
-
expect(described_class.ruby_source_dir_version('ruby-3.4.1-p0')).to eq(Gem::Version.new('3.4.1'))
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
it 'parses preview/rc versions correctly' do
|
|
81
|
-
expect(described_class.ruby_source_dir_version('ruby-3.4.0-preview1')).to eq(Gem::Version.new('3.4.0.preview1'))
|
|
82
|
-
expect(described_class.ruby_source_dir_version('ruby-4.0.0-rc2')).to eq(Gem::Version.new('4.0.0.rc2'))
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
end
|
data/spec/spec_helper.rb
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
# This file was generated by the `rspec --init` command. Conventionally, all
|
|
2
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
|
3
|
-
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
|
4
|
-
# this file to always be loaded, without a need to explicitly require it in any
|
|
5
|
-
# files.
|
|
6
|
-
#
|
|
7
|
-
# Given that it is always loaded, you are encouraged to keep this file as
|
|
8
|
-
# light-weight as possible. Requiring heavyweight dependencies from this file
|
|
9
|
-
# will add to the boot time of your test suite on EVERY test run, even for an
|
|
10
|
-
# individual file that may not need all of that loaded. Instead, consider making
|
|
11
|
-
# a separate helper file that requires the additional dependencies and performs
|
|
12
|
-
# the additional setup, and require it from the spec files that actually need
|
|
13
|
-
# it.
|
|
14
|
-
#
|
|
15
|
-
# See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
|
16
|
-
RSpec.configure do |config|
|
|
17
|
-
# rspec-expectations config goes here. You can use an alternate
|
|
18
|
-
# assertion/expectation library such as wrong or the stdlib/minitest
|
|
19
|
-
# assertions if you prefer.
|
|
20
|
-
config.expect_with :rspec do |expectations|
|
|
21
|
-
# This option will default to `true` in RSpec 4. It makes the `description`
|
|
22
|
-
# and `failure_message` of custom matchers include text for helper methods
|
|
23
|
-
# defined using `chain`, e.g.:
|
|
24
|
-
# be_bigger_than(2).and_smaller_than(4).description
|
|
25
|
-
# # => "be bigger than 2 and smaller than 4"
|
|
26
|
-
# ...rather than:
|
|
27
|
-
# # => "be bigger than 2"
|
|
28
|
-
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# rspec-mocks config goes here. You can use an alternate test double
|
|
32
|
-
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
|
33
|
-
config.mock_with :rspec do |mocks|
|
|
34
|
-
# Prevents you from mocking or stubbing a method that does not exist on
|
|
35
|
-
# a real object. This is generally recommended, and will default to
|
|
36
|
-
# `true` in RSpec 4.
|
|
37
|
-
mocks.verify_partial_doubles = true
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
|
41
|
-
# have no way to turn it off -- the option exists only for backwards
|
|
42
|
-
# compatibility in RSpec 3). It causes shared context metadata to be
|
|
43
|
-
# inherited by the metadata hash of host groups and examples, rather than
|
|
44
|
-
# triggering implicit auto-inclusion in groups with matching metadata.
|
|
45
|
-
config.shared_context_metadata_behavior = :apply_to_host_groups
|
|
46
|
-
|
|
47
|
-
# This allows you to limit a spec run to individual examples or groups
|
|
48
|
-
# you care about by tagging them with `:focus` metadata. When nothing
|
|
49
|
-
# is tagged with `:focus`, all examples get run. RSpec also provides
|
|
50
|
-
# aliases for `it`, `describe`, and `context` that include `:focus`
|
|
51
|
-
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
|
52
|
-
config.filter_run_when_matching :focus
|
|
53
|
-
|
|
54
|
-
# Allows RSpec to persist some state between runs in order to support
|
|
55
|
-
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
|
56
|
-
# you configure your source control system to ignore this file.
|
|
57
|
-
config.example_status_persistence_file_path = "spec/examples.txt"
|
|
58
|
-
|
|
59
|
-
# Limits the available syntax to the non-monkey patched syntax that is
|
|
60
|
-
# recommended. For more details, see:
|
|
61
|
-
# https://rspec.info/features/3-12/rspec-core/configuration/zero-monkey-patching-mode/
|
|
62
|
-
config.disable_monkey_patching!
|
|
63
|
-
|
|
64
|
-
# This setting enables warnings. It's recommended, but in some cases may
|
|
65
|
-
# be too noisy due to issues in dependencies.
|
|
66
|
-
config.warnings = true
|
|
67
|
-
|
|
68
|
-
# Many RSpec users commonly either run the entire suite or an individual
|
|
69
|
-
# file, and it's useful to allow more verbose output when running an
|
|
70
|
-
# individual spec file.
|
|
71
|
-
if config.files_to_run.one?
|
|
72
|
-
# Use the documentation formatter for detailed output,
|
|
73
|
-
# unless a formatter has already been configured
|
|
74
|
-
# (e.g. via a command-line flag).
|
|
75
|
-
config.default_formatter = "doc"
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
# Print the 10 slowest examples and example groups at the
|
|
79
|
-
# end of the spec run, to help surface which specs are running
|
|
80
|
-
# particularly slow.
|
|
81
|
-
config.profile_examples = 1
|
|
82
|
-
|
|
83
|
-
# Run specs in random order to surface order dependencies. If you find an
|
|
84
|
-
# order dependency and want to debug it, you can fix the order by providing
|
|
85
|
-
# the seed, which is printed after each run.
|
|
86
|
-
# --seed 1234
|
|
87
|
-
config.order = :random
|
|
88
|
-
|
|
89
|
-
# Seed global randomization in this process using the `--seed` CLI option.
|
|
90
|
-
# Setting this allows you to use `--seed` to deterministically reproduce
|
|
91
|
-
# test failures related to randomization by passing the same `--seed` value
|
|
92
|
-
# as the one that triggered the failure.
|
|
93
|
-
Kernel.srand config.seed
|
|
94
|
-
end
|