Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 82 lines (72 sloc) 3.058 kb
61fdfcb @ry Fix comment in node_provider.d
ry authored
1 /* Copyright Joyent, Inc. and other Node contributors.
2 *
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:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
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.
21 */
55048cd @ry Update copyright headers
ry authored
22
068b733 @ry Land Cantrill's DTrace patch
ry authored
23 /*
24 * DTrace provider for node.js.
25 */
26
27 /*
28 * In order to have the information we need here to create the provider,
29 * we must declare bogus definitions for our depended-upon structures. And
30 * yes, the fact that we need to do this represents a shortcoming in DTrace,
31 * one that would be resolved by that elusive El Dorado: dynamic translators.
32 */
33
34 typedef struct {
35 int dummy;
36 } node_dtrace_connection_t;
37
38 typedef struct {
39 int dummy;
40 } node_connection_t;
41
42 typedef struct {
43 int dummy;
e142fe2 @davepacheco DTrace probes: support X-Forwarded-For
davepacheco authored
44 } node_dtrace_http_server_request_t;
45
46 typedef struct {
47 int dummy;
48 } node_dtrace_http_client_request_t;
068b733 @ry Land Cantrill's DTrace patch
ry authored
49
50 typedef struct {
51 int dummy;
52 } node_http_request_t;
53
54 provider node {
55 probe net__server__connection(node_dtrace_connection_t *c) :
56 (node_connection_t *c);
57 probe net__stream__end(node_dtrace_connection_t *c) :
58 (node_connection_t *c);
e9257b8 @ry New DTrace probes from CA team
ry authored
59 probe net__socket__read(node_dtrace_connection_t *c, int b) :
60 (node_connection_t *c, int b);
61 probe net__socket__write(node_dtrace_connection_t *c, int b) :
62 (node_connection_t *c, int b);
e142fe2 @davepacheco DTrace probes: support X-Forwarded-For
davepacheco authored
63 probe http__server__request(node_dtrace_http_server_request_t *h,
068b733 @ry Land Cantrill's DTrace patch
ry authored
64 node_dtrace_connection_t *c) :
65 (node_http_request_t *h, node_connection_t *c);
66 probe http__server__response(node_dtrace_connection_t *c) :
67 (node_connection_t *c);
e142fe2 @davepacheco DTrace probes: support X-Forwarded-For
davepacheco authored
68 probe http__client__request(node_dtrace_http_client_request_t *h,
e9257b8 @ry New DTrace probes from CA team
ry authored
69 node_dtrace_connection_t *c) :
70 (node_http_request_t *h, node_connection_t *c);
71 probe http__client__response(node_dtrace_connection_t *c) :
72 (node_connection_t *c);
73 probe gc__start(int t, int f);
74 probe gc__done(int t, int f);
068b733 @ry Land Cantrill's DTrace patch
ry authored
75 };
76
77 #pragma D attributes Evolving/Evolving/ISA provider node provider
78 #pragma D attributes Private/Private/Unknown provider node module
79 #pragma D attributes Private/Private/Unknown provider node function
80 #pragma D attributes Private/Private/ISA provider node name
81 #pragma D attributes Evolving/Evolving/ISA provider node args
Something went wrong with that request. Please try again.