Sha256: 54c0c872be39f65737d1b2dfe12568198dc99d0af428a6a22010ef196f1b353d

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 KB

Contents

#pragma once

#include <datadog/profiling.h>
#include <ruby.h>

typedef struct {
  int64_t cpu_time_ns;
  int64_t wall_time_ns;
  uint32_t cpu_or_wall_samples;
  uint32_t alloc_samples;
  uint32_t alloc_samples_unscaled;
  bool heap_sample;
  int64_t timeline_wall_time_ns;
} sample_values;

typedef struct sample_labels {
  ddog_prof_Slice_Label labels;

  // This is used to allow the `Collectors::Stack` to modify the existing label, if any. This MUST be NULL or point
  // somewhere inside the labels slice above.
  ddog_prof_Label *state_label;
  bool is_gvl_waiting_state;

  int64_t end_timestamp_ns;
} sample_labels;

void record_sample(VALUE recorder_instance, ddog_prof_Slice_Location locations, sample_values values, sample_labels labels);
void record_endpoint(VALUE recorder_instance, uint64_t local_root_span_id, ddog_CharSlice endpoint);
void track_object(VALUE recorder_instance, VALUE new_object, unsigned int sample_weight, ddog_CharSlice *alloc_class);
void recorder_after_gc_step(VALUE recorder_instance);
VALUE enforce_recorder_instance(VALUE object);

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
datadog-2.8.0 ext/datadog_profiling_native_extension/stack_recorder.h
datadog-2.7.1 ext/datadog_profiling_native_extension/stack_recorder.h
datadog-2.7.0 ext/datadog_profiling_native_extension/stack_recorder.h
datadog-2.6.0 ext/datadog_profiling_native_extension/stack_recorder.h
datadog-2.5.0 ext/datadog_profiling_native_extension/stack_recorder.h