node/src/node_lttng.h
Glen Keane 5e825d1073 tracing: add lttng support for tracing on linux
This commit adds the ability to enable userspace tracing with lttng
in io.js. It adds tracepoints for all the equivalent dtrace and ETW
tracepoints. To use these tracepoints enable --with-lttng on linux.

PR-URL: https://github.com/iojs/io.js/pull/702
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ryan Graham <ryan@strongloop.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-02-09 18:06:57 +01:00

40 lines
735 B
C++

#ifndef SRC_NODE_LTTNG_H_
#define SRC_NODE_LTTNG_H_
#include "node.h"
#include "v8.h"
#include "env.h"
extern "C" {
typedef struct {
int32_t fd;
int32_t port;
const char* remote;
int32_t buffered;
} node_lttng_connection_t;
typedef struct {
const char* url;
const char* method;
} node_lttng_http_client_request_t;
typedef struct {
union {
uint32_t version;
uintptr_t unused; /* for compat. with old 64-bit struct */
} _un;
const char* url;
const char* method;
const char* forwarded_for;
const char* _pad[8];
} node_lttng_http_server_request_t;
} // extern "C"
namespace node {
void InitLTTNG(Environment* env, v8::Handle<v8::Object> target);
} // namespace node
#endif // SRC_NODE_LTTNG_H_