1 // Copyright Joyent, Inc. and other Node contributors.
3 // Permission is hereby granted, free of charge, to any person obtaining a
4 // copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to permit
8 // persons to whom the Software is furnished to do so, subject to the
9 // following conditions:
11 // The above copyright notice and this permission notice shall be included
12 // in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20 // USE OR OTHER DEALINGS IN THE SOFTWARE.
23 * DTrace provider for node.js.
27 * In order to have the information we need here to create the provider,
28 * we must declare bogus definitions for our depended-upon structures. And
29 * yes, the fact that we need to do this represents a shortcoming in DTrace,
30 * one that would be resolved by that elusive El Dorado: dynamic translators.
35 } node_dtrace_connection_t;
43 } node_dtrace_http_request_t;
47 } node_http_request_t;
50 probe net__server__connection(node_dtrace_connection_t *c) :
51 (node_connection_t *c);
52 probe net__stream__end(node_dtrace_connection_t *c) :
53 (node_connection_t *c);
54 probe net__socket__read(node_dtrace_connection_t *c, int b) :
55 (node_connection_t *c, int b);
56 probe net__socket__write(node_dtrace_connection_t *c, int b) :
57 (node_connection_t *c, int b);
58 probe http__server__request(node_dtrace_http_request_t *h,
59 node_dtrace_connection_t *c) :
60 (node_http_request_t *h, node_connection_t *c);
61 probe http__server__response(node_dtrace_connection_t *c) :
62 (node_connection_t *c);
63 probe http__client__request(node_dtrace_http_request_t *h,
64 node_dtrace_connection_t *c) :
65 (node_http_request_t *h, node_connection_t *c);
66 probe http__client__response(node_dtrace_connection_t *c) :
67 (node_connection_t *c);
68 probe gc__start(int t, int f);
69 probe gc__done(int t, int f);
72 #pragma D attributes Evolving/Evolving/ISA provider node provider
73 #pragma D attributes Private/Private/Unknown provider node module
74 #pragma D attributes Private/Private/Unknown provider node function
75 #pragma D attributes Private/Private/ISA provider node name
76 #pragma D attributes Evolving/Evolving/ISA provider node args