You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// (See PROF-10656 Datadog-internal for details). Just in case, I've sprinkled a bunch of NULL tests in this function for now.
792
792
// Once we figure out the issue we can get rid of them again.
793
793
794
-
if (heap_recorder==NULL) rb_raise(rb_eRuntimeError, "heap_recorder was NULL in on_committed_object_record_cleanup");
795
-
if (heap_recorder->heap_records==NULL) rb_raise(rb_eRuntimeError, "heap_recorder->heap_records was NULL in on_committed_object_record_cleanup");
796
-
if (record==NULL) rb_raise(rb_eRuntimeError, "record was NULL in on_committed_object_record_cleanup");
794
+
if (heap_recorder==NULL) rb_raise(datadog_profiling_error_class, "heap_recorder was NULL in on_committed_object_record_cleanup");
795
+
if (heap_recorder->heap_records==NULL) rb_raise(datadog_profiling_error_class, "heap_recorder->heap_records was NULL in on_committed_object_record_cleanup");
796
+
if (record==NULL) rb_raise(datadog_profiling_error_class, "record was NULL in on_committed_object_record_cleanup");
797
797
798
798
// Starting with the associated heap record. There will now be one less tracked object pointing to it
799
799
heap_record*heap_record=record->heap_record;
800
800
801
-
if (heap_record==NULL) rb_raise(rb_eRuntimeError, "heap_record was NULL in on_committed_object_record_cleanup");
801
+
if (heap_record==NULL) rb_raise(datadog_profiling_error_class, "heap_record was NULL in on_committed_object_record_cleanup");
802
802
803
803
heap_record->num_tracked_objects--;
804
804
@@ -862,7 +862,7 @@ heap_record* heap_record_new(heap_recorder *recorder, ddog_prof_Slice_Location l
862
862
uint16_tframes_len=locations.len;
863
863
if (frames_len>MAX_FRAMES_LIMIT) {
864
864
// This is not expected as MAX_FRAMES_LIMIT is shared with the stacktrace construction mechanism
865
-
rb_raise(rb_eRuntimeError, "Found stack with more than %d frames (%d)", MAX_FRAMES_LIMIT, frames_len);
865
+
rb_raise(datadog_profiling_error_class, "Found stack with more than %d frames (%d)", MAX_FRAMES_LIMIT, frames_len);
866
866
}
867
867
heap_record*stack=calloc(1, sizeof(heap_record) +frames_len*sizeof(heap_frame)); // See "note on calloc vs ruby_xcalloc use" above
0 commit comments