diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-01-25 04:50:10 +0300 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-01-25 05:59:06 +0300 |
commit | 068b733583a4f0781a8418ddf42f7912e3dd53a6 (patch) | |
tree | 7f9dd4ca422b06447db9f901cc11d9f7bca90423 /src/node_provider.d | |
parent | 91cc2d8c4bff5c5fbacd757f38b9a8c690dce131 (diff) |
Land Cantrill's DTrace patch
only works on solaris
Diffstat (limited to 'src/node_provider.d')
-rw-r--r-- | src/node_provider.d | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/node_provider.d b/src/node_provider.d new file mode 100644 index 00000000000..3d11f39416b --- /dev/null +++ b/src/node_provider.d @@ -0,0 +1,44 @@ +/* + * DTrace provider for node.js. + */ + +/* + * In order to have the information we need here to create the provider, + * we must declare bogus definitions for our depended-upon structures. And + * yes, the fact that we need to do this represents a shortcoming in DTrace, + * one that would be resolved by that elusive El Dorado: dynamic translators. + */ + +typedef struct { + int dummy; +} node_dtrace_connection_t; + +typedef struct { + int dummy; +} node_connection_t; + +typedef struct { + int dummy; +} node_dtrace_http_request_t; + +typedef struct { + int dummy; +} node_http_request_t; + +provider node { + probe net__server__connection(node_dtrace_connection_t *c) : + (node_connection_t *c); + probe net__stream__end(node_dtrace_connection_t *c) : + (node_connection_t *c); + probe http__server__request(node_dtrace_http_request_t *h, + node_dtrace_connection_t *c) : + (node_http_request_t *h, node_connection_t *c); + probe http__server__response(node_dtrace_connection_t *c) : + (node_connection_t *c); +}; + +#pragma D attributes Evolving/Evolving/ISA provider node provider +#pragma D attributes Private/Private/Unknown provider node module +#pragma D attributes Private/Private/Unknown provider node function +#pragma D attributes Private/Private/ISA provider node name +#pragma D attributes Evolving/Evolving/ISA provider node args |