Sha256: 55fc4a33ff9cf66238a330cf69339bb308d881b92e2eaeb9eb072c67a6539b99

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

#ifndef STACK_TRACY_H
#define STACK_TRACY_H

#include <ruby.h>
#include <stdbool.h>
#include <time.h>
#include <string.h>

typedef struct event_info_t {
  rb_event_flag_t event;
  const char *file;
  int line;
  bool singleton;
  const VALUE *object;
  const ID *method;
  double nsec;
} EventInfo;

typedef struct ruby_class_t {
  const char *name;
  const VALUE *klass;
} RubyClass;

static VALUE mStackTracy;
static VALUE cEventInfo;
static VALUE rbString;
static ID rbTracy;

static EventInfo *stack;
static RubyClass *only;
static RubyClass *exclude;

static int stack_size, only_size, exclude_size;
static bool trace;

static double nsec();
static const char *event_name(rb_event_flag_t event);

#if defined(RB_EVENT_HOOKS_HAVE_CALLBACK_DATA) || defined(RUBY_EVENT_VM)
static void stack_tracy_trap(rb_event_flag_t event, VALUE data, VALUE self, ID id, VALUE klass);
#else
static void stack_tracy_trap(rb_event_flag_t event, NODE *node, VALUE self, ID id, VALUE klass);
#endif

VALUE stack_tracy_start(VALUE self, VALUE only_names, VALUE exclude_names);
VALUE stack_tracy_stop(VALUE self);
void Init_stack_tracy();

#endif

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
stack_tracy-0.1.8 ext/stack_tracy/stack_tracy.h
stack_tracy-0.1.7 ext/stack_tracy/stack_tracy.h
stack_tracy-0.1.6 ext/stack_tracy/stack_tracy.h
stack_tracy-0.1.5 ext/stack_tracy/stack_tracy.h