11cb0ef41Sopenharmony_ci/* Copyright Joyent, Inc. and other Node contributors. 21cb0ef41Sopenharmony_ci * 31cb0ef41Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 41cb0ef41Sopenharmony_ci * copy of this software and associated documentation files (the 51cb0ef41Sopenharmony_ci * "Software"), to deal in the Software without restriction, including 61cb0ef41Sopenharmony_ci * without limitation the rights to use, copy, modify, merge, publish, 71cb0ef41Sopenharmony_ci * distribute, sublicense, and/or sell copies of the Software, and to permit 81cb0ef41Sopenharmony_ci * persons to whom the Software is furnished to do so, subject to the 91cb0ef41Sopenharmony_ci * following conditions: 101cb0ef41Sopenharmony_ci * 111cb0ef41Sopenharmony_ci * The above copyright notice and this permission notice shall be included 121cb0ef41Sopenharmony_ci * in all copies or substantial portions of the Software. 131cb0ef41Sopenharmony_ci * 141cb0ef41Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 151cb0ef41Sopenharmony_ci * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 161cb0ef41Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 171cb0ef41Sopenharmony_ci * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 181cb0ef41Sopenharmony_ci * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 191cb0ef41Sopenharmony_ci * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 201cb0ef41Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. 211cb0ef41Sopenharmony_ci */ 221cb0ef41Sopenharmony_ci 231cb0ef41Sopenharmony_ci/* 241cb0ef41Sopenharmony_ci * DTrace provider for node.js. 251cb0ef41Sopenharmony_ci */ 261cb0ef41Sopenharmony_ci 271cb0ef41Sopenharmony_ci/* 281cb0ef41Sopenharmony_ci * In order to have the information we need here to create the provider, 291cb0ef41Sopenharmony_ci * we must declare bogus definitions for our depended-upon structures. And 301cb0ef41Sopenharmony_ci * yes, the fact that we need to do this represents a shortcoming in DTrace, 311cb0ef41Sopenharmony_ci * one that would be resolved by that elusive El Dorado: dynamic translators. 321cb0ef41Sopenharmony_ci */ 331cb0ef41Sopenharmony_ci 341cb0ef41Sopenharmony_citypedef struct { 351cb0ef41Sopenharmony_ci int dummy; 361cb0ef41Sopenharmony_ci} node_dtrace_connection_t; 371cb0ef41Sopenharmony_ci 381cb0ef41Sopenharmony_citypedef struct { 391cb0ef41Sopenharmony_ci int dummy; 401cb0ef41Sopenharmony_ci} node_connection_t; 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_citypedef struct { 431cb0ef41Sopenharmony_ci int dummy; 441cb0ef41Sopenharmony_ci} node_dtrace_http_server_request_t; 451cb0ef41Sopenharmony_ci 461cb0ef41Sopenharmony_citypedef struct { 471cb0ef41Sopenharmony_ci int dummy; 481cb0ef41Sopenharmony_ci} node_dtrace_http_client_request_t; 491cb0ef41Sopenharmony_ci 501cb0ef41Sopenharmony_citypedef struct { 511cb0ef41Sopenharmony_ci int dummy; 521cb0ef41Sopenharmony_ci} node_http_request_t; 531cb0ef41Sopenharmony_ci 541cb0ef41Sopenharmony_ciprovider node { 551cb0ef41Sopenharmony_ci probe net__server__connection(node_dtrace_connection_t *c, 561cb0ef41Sopenharmony_ci const char *a, int p, int fd) : (node_connection_t *c, string a, int p, 571cb0ef41Sopenharmony_ci int fd); 581cb0ef41Sopenharmony_ci probe net__stream__end(node_dtrace_connection_t *c, const char *a, 591cb0ef41Sopenharmony_ci int p, int fd) : (node_connection_t *c, string a, int p, int fd); 601cb0ef41Sopenharmony_ci probe http__server__request(node_dtrace_http_server_request_t *h, 611cb0ef41Sopenharmony_ci node_dtrace_connection_t *c, const char *a, int p, const char *m, 621cb0ef41Sopenharmony_ci const char *u, int fd) : (node_http_request_t *h, node_connection_t *c, 631cb0ef41Sopenharmony_ci string a, int p, string m, string u, int fd); 641cb0ef41Sopenharmony_ci probe http__server__response(node_dtrace_connection_t *c, const char *a, 651cb0ef41Sopenharmony_ci int p, int fd) : (node_connection_t *c, string a, int p, int fd); 661cb0ef41Sopenharmony_ci probe http__client__request(node_dtrace_http_client_request_t *h, 671cb0ef41Sopenharmony_ci node_dtrace_connection_t *c, const char *a, int p, const char *m, 681cb0ef41Sopenharmony_ci const char *u, int fd) : (node_http_request_t *h, node_connection_t *c, 691cb0ef41Sopenharmony_ci string a, int p, string m, string u, int fd); 701cb0ef41Sopenharmony_ci probe http__client__response(node_dtrace_connection_t *c, const char *a, 711cb0ef41Sopenharmony_ci int p, int fd) : (node_connection_t *c, string a, int p, int fd); 721cb0ef41Sopenharmony_ci probe gc__start(int t, int f, void *isolate); 731cb0ef41Sopenharmony_ci probe gc__done(int t, int f, void *isolate); 741cb0ef41Sopenharmony_ci}; 751cb0ef41Sopenharmony_ci 761cb0ef41Sopenharmony_ci#pragma D attributes Evolving/Evolving/ISA provider node provider 771cb0ef41Sopenharmony_ci#pragma D attributes Private/Private/Unknown provider node module 781cb0ef41Sopenharmony_ci#pragma D attributes Private/Private/Unknown provider node function 791cb0ef41Sopenharmony_ci#pragma D attributes Private/Private/ISA provider node name 801cb0ef41Sopenharmony_ci#pragma D attributes Evolving/Evolving/ISA provider node args 81