-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfile.dtrace_probes.html
230 lines (198 loc) · 11.9 KB
/
file.dtrace_probes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no'>
<meta name='apple-touch-fullscreen' content='yes'>
<meta name='apple-mobile-web-app-capable' content='yes'>
<meta name='apple-mobile-web-app-status-bar-style' content='rgba(228,228,228,1.0)'>
<title>File: Dtrace Probes — Ruby-2.6.10</title>
<link rel='stylesheet' type='text/css' href='../css/y_fonts.css' />
<link rel='stylesheet' type='text/css' href='../css/highlight.github.css' />
<link rel='stylesheet' type='text/css' href='../css/y_style.css' />
<link rel='stylesheet' type='text/css' href='../css/y_list.css' />
<link rel='stylesheet' type='text/css' href='../css/y_color.css' />
<script type='text/javascript'>
var pathId = "dtrace_probes",
relpath = '';
var t2Info = {
CSEP: '.',
ISEP: '#',
NSEP: '::'
};
</script>
<script type='text/javascript' charset='utf-8' src='../js/highlight.pack.js'></script>
<script type='text/javascript' charset='utf-8' src='../js/y_app.js'></script>
</head>
<body>
<svg id='y_wait' class viewBox='0 0 90 90'></svg>
<div id='settings' class='hidden'></div>
<div id='y_list' class='d h'>
<header id='list_header'></header>
<nav id= 'list_nav' class='y_nav l_nav'>
<ul id='list_items'></ul>
</nav>
</div>
<div id='y_toc' class='f h'>
<header id='toc_header'></header>
<nav id= 'toc_nav' class='y_nav t_nav'>
<ol id='toc_items'></ol>
</nav>
</div>
<div id='y_main' tabindex='-1'>
<header id='y_header'>
<div id='y_menu'>
<a id='home_no_xhr' href='/'>Home</a> »
<a href='.'>Ruby-2.6.10</a> »
<a href='_index.html'>Index</a> »
<span class='title'><a id='t2_doc_top' href='#'>File: Dtrace Probes ▲</a></span>
</div>
<a id='list_href' href="file_list.html"></a>
<div id='y_measure_em' class='y_measure'></div>
<div id='y_measure_vh' class='y_measure'></div>
<span id='y_measure_50pre' class='y_measure'><code>123456789_123456789_123456789_123456789_123456789_</code></span>
</header>
<div id='content' class='file'>
<h1 id="label-DTrace+Probes">DTrace Probes</h1>
<p>A list of DTrace probes and their functionality. “Module” and “Function” cannot be defined in user defined probes (known as USDT), so they will not be specified. Probe definitions are in the format of:</p>
<pre class="code ruby"><code class="ruby">provider:module:function:name(arguments)</code></pre>
<p>Since module and function cannot be specified, they will be blank. An example probe definition for Ruby would then be:</p>
<pre class="code ruby"><code class="ruby">ruby:::method-entry(class name, method name, file name, line number)</code></pre>
<p>Where “ruby” is the provider name, module and function names are blank, the probe name is “method-entry”, and the probe takes four arguments:</p>
<ul><li>
<p>class name</p>
</li><li>
<p>method name</p>
</li><li>
<p>file name</p>
</li><li>
<p>line number</p>
</li></ul>
<h2 id="label-Probes+List">Probes List</h2>
<h3 id="label-Stability">Stability</h3>
<p>Before we list the specific probes, let’s talk about stability. Probe stability is declared in the probes.d file at the bottom on the #pragma D attributes lines. Here is a description of each of the stability declarations.</p>
<dl class="rdoc-list label-list"><dt>Provider name stability
<dd>
<p>The provider name of “ruby” has been declared as stable. It is unlikely that we will change the provider name from “ruby” to something else.</p>
</dd><dt>Module and Function stability
<dd>
<p>Since we are not allowed to provide values for the module and function name, the values we have provided (no value) is declared as stable.</p>
</dd><dt>Probe name stability
<dd>
<p>The probe names are likely to change in the future, so they are marked as “Evolving”. Consumers should not depend on these names to be stable.</p>
</dd><dt>Probe argument stability
<dd>
<p>The parameters passed to the probes are likely to change in the future, so they are marked as “Evolving”. Consumers should not depend on these to be stable.</p>
</dd></dl>
<h3 id="label-Declared+probes">Declared probes</h3>
<p>Probes are defined in the probes.d file. Here are the declared probes along with when they are fired and the arguments they take:</p>
<dl class="rdoc-list label-list"><dt>ruby:::method-entry(classname, methodname, filename, lineno);
<dd>
<p>This probe is fired just before a method is entered.</p>
<pre class="code ruby"><code class="ruby">classname name of the class (a string)
methodname name of the method about to be executed (a string)
filename the file name where the method is _being called_ (a string)
lineno the line number where the method is _being called_ (an int)</code></pre>
</dd><dt>ruby:::method-return(classname, methodname, filename, lineno);
<dd>
<p>This probe is fired just after a method has returned. The arguments are the same as “ruby:::method-entry”.</p>
</dd><dt>ruby:::cmethod-entry(classname, methodname, filename, lineno);
<dd>
<p>This probe is fired just before a C method is entered. The arguments are the same as “ruby:::method-entry”.</p>
</dd><dt>ruby:::cmethod-return(classname, methodname, filename, lineno);
<dd>
<p>This probe is fired just before a C method returns. The arguments are the same as “ruby:::method-entry”.</p>
</dd><dt>ruby:::require-entry(requiredfile, filename, lineno);
<dd>
<p>This probe is fired on calls to rb_require_safe (when a file is required).</p>
<pre class="code ruby"><code class="ruby">requiredfile is the name of the file to be required (string).
filename is the file that called "require" (string).
lineno is the line number where the call to require was made (int).</code></pre>
</dd><dt>ruby:::require-return(requiredfile, filename, lineno);
<dd>
<p>This probe is fired just before rb_require_safe (when a file is required) returns. The arguments are the same as “ruby:::require-entry”. This probe will not fire if there was an exception during file require.</p>
</dd><dt>ruby:::find-require-entry(requiredfile, filename, lineno);
<dd>
<p>This probe is fired right before search_required is called. search_required determines whether the file has already been required by searching loaded features ($“), and if not, figures out which file must be loaded.</p>
<pre class="code ruby"><code class="ruby">requiredfile is the file to be required (string).
filename is the file that called "require" (string).
lineno is the line number where the call to require was made (int).</code></pre>
</dd><dt>ruby:::find-require-return(requiredfile, filename, lineno);
<dd>
<p>This probe is fired right after search_required returns. See the documentation for “ruby:::find-require-entry” for more details. Arguments for this probe are the same as “ruby:::find-require-entry”.</p>
</dd><dt>ruby:::load-entry(loadedfile, filename, lineno);
<dd>
<p>This probe is fired when calls to “load” are made. The arguments are the same as “ruby:::require-entry”.</p>
</dd><dt>ruby:::load-return(loadedfile, filename, lineno);
<dd>
<p>This probe is fired when “load” returns. The arguments are the same as “ruby:::load-entry”.</p>
</dd><dt>ruby:::raise(classname, filename, lineno);
<dd>
<p>This probe is fired when an exception is raised.</p>
<pre class="code ruby"><code class="ruby">classname is the class name of the raised exception (string)
filename the name of the file where the exception was raised (string)
lineno the line number in the file where the exception was raised (int)</code></pre>
</dd><dt>ruby:::object-create(classname, filename, lineno);
<dd>
<p>This probe is fired when an object is about to be allocated.</p>
<pre class="code ruby"><code class="ruby">classname the class of the allocated object (string)
filename the name of the file where the object is allocated (string)
lineno the line number in the file where the object is allocated (int)</code></pre>
</dd><dt>ruby:::array-create(length, filename, lineno);
<dd>
<p>This probe is fired when an Array is about to be allocated.</p>
<pre class="code ruby"><code class="ruby">length the size of the array (long)
filename the name of the file where the array is allocated (string)
lineno the line number in the file where the array is allocated (int)</code></pre>
</dd><dt>ruby:::hash-create(length, filename, lineno);
<dd>
<p>This probe is fired when a Hash is about to be allocated.</p>
<pre class="code ruby"><code class="ruby">length the size of the hash (long)
filename the name of the file where the hash is allocated (string)
lineno the line number in the file where the hash is allocated (int)</code></pre>
</dd><dt>ruby:::string-create(length, filename, lineno);
<dd>
<p>This probe is fired when a String is about to be allocated.</p>
<pre class="code ruby"><code class="ruby">length the size of the string (long)
filename the name of the file where the string is allocated (string)
lineno the line number in the file where the string is allocated (int)</code></pre>
</dd><dt>ruby:::symbol-create(str, filename, lineno);
<dd>
<p>This probe is fired when a Symbol is about to be allocated.</p>
<pre class="code ruby"><code class="ruby">str the contents of the symbol (string)
filename the name of the file where the string is allocated (string)
lineno the line number in the file where the string is allocated (int)</code></pre>
</dd><dt>ruby:::parse-begin(sourcefile, lineno);
<dd>
<p>Fired just before parsing and compiling a source file.</p>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_sourcefile'>sourcefile</span> <span class='id identifier rubyid_the'>the</span> <span class='id identifier rubyid_file'>file</span> <span class='id identifier rubyid_being'>being</span> <span class='id identifier rubyid_parsed'>parsed</span> (<span class='id identifier rubyid_string'>string</span>)
<span class='id identifier rubyid_lineno'>lineno</span> <span class='id identifier rubyid_the'>the</span> <span class='id identifier rubyid_line'>line</span> <span class='id identifier rubyid_number'>number</span> <span class='id identifier rubyid_where'>where</span> <span class='id identifier rubyid_the'>the</span> <span class='id identifier rubyid_source'>source</span> <span class='id identifier rubyid_starts'>starts</span> (<span class='id identifier rubyid_int'>int</span>)</code></pre>
</dd><dt>ruby:::parse-end(sourcefile, lineno);
<dd>
<p>Fired just after parsing and compiling a source file.</p>
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_sourcefile'>sourcefile</span> <span class='id identifier rubyid_the'>the</span> <span class='id identifier rubyid_file'>file</span> <span class='id identifier rubyid_being'>being</span> <span class='id identifier rubyid_parsed'>parsed</span> (<span class='id identifier rubyid_string'>string</span>)
<span class='id identifier rubyid_lineno'>lineno</span> <span class='id identifier rubyid_the'>the</span> <span class='id identifier rubyid_line'>line</span> <span class='id identifier rubyid_number'>number</span> <span class='id identifier rubyid_where'>where</span> <span class='id identifier rubyid_the'>the</span> <span class='id identifier rubyid_source'>source</span> <span class='id identifier rubyid_ended'>ended</span> (<span class='id identifier rubyid_int'>int</span>)</code></pre>
</dd><dt>ruby:::gc-mark-begin();
<dd>
<p>Fired at the beginning of a mark phase.</p>
</dd><dt>ruby:::gc-mark-end();
<dd>
<p>Fired at the end of a mark phase.</p>
</dd><dt>ruby:::gc-sweep-begin();
<dd>
<p>Fired at the beginning of a sweep phase.</p>
</dd><dt>ruby:::gc-sweep-end();
<dd>
<p>Fired at the end of a sweep phase.</p>
</dd><dt>ruby:::method-cache-clear(class, sourcefile, lineno);
<dd>
<p>Fired when the method cache is cleared.</p>
<pre class="code ruby"><code class="ruby">class is the classname being cleared, or "global" (string)
sourcefile the file being parsed (string)
lineno the line number where the source ended (int)</code></pre>
</dd></dl>
<div id='footer'></div>
</div> <!-- content -->
</div> <!-- y_main -->
</body>
</html>