-
Notifications
You must be signed in to change notification settings - Fork 8
/
usdt.h
59 lines (43 loc) · 1.1 KB
/
usdt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#include <nan.h>
#include <node_object_wrap.h>
extern "C" {
#include <libstapsdt.h>
}
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <unistd.h>
namespace node {
using namespace v8;
class USDTProbe : public Nan::ObjectWrap {
public:
static void Initialize(v8::Local<v8::Object> target);
SDTProbe_t *probe;
ArgType_t arguments[MAX_ARGUMENTS];
size_t argc;
static NAN_METHOD(New);
static NAN_METHOD(Fire);
v8::Local<Value> _fire(Nan::NAN_METHOD_ARGS_TYPE, size_t);
static Nan::Persistent<FunctionTemplate> constructor_template;
USDTProbe();
~USDTProbe();
private:
};
class USDTProvider : public Nan::ObjectWrap {
public:
static void Initialize(v8::Local<v8::Object> target);
SDTProvider_t *provider;
static NAN_METHOD(New);
static NAN_METHOD(AddProbe);
// static NAN_METHOD(RemoveProbe);
static NAN_METHOD(Enable);
static NAN_METHOD(Disable);
// static NAN_METHOD(Fire);
USDTProvider();
~USDTProvider();
private:
static Nan::Persistent<FunctionTemplate> constructor_template;
};
void InitUSDTProvider(v8::Local<v8::Object> target);
};