Skip to content

Commit

Permalink
#100 Update manual page references for IPD 4
Browse files Browse the repository at this point in the history
  • Loading branch information
rmustacc committed Feb 12, 2022
1 parent ce4427a commit 8c023e6
Show file tree
Hide file tree
Showing 60 changed files with 315 additions and 315 deletions.
2 changes: 1 addition & 1 deletion raw/dtrace/chapter1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ back to you. If you don't specify any actions for a probe, DTrace will just
take note of each time the probe fires.</para><para>Every probe in DTrace has two names: a unique integer ID and a human-readable
string name. We're going to start learning DTrace by building some very simple
requests using the probe named <literal>BEGIN</literal>, which fires once
each time you start a new tracing request. You can use the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> utility's <option>n</option> option
each time you start a new tracing request. You can use the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> utility's <option>n</option> option
to enable a probe using its string name. Type the following command:</para><screen><userinput># dtrace -n BEGIN</userinput></screen><para>After a brief pause, you will see DTrace tell you that one probe was
enabled and you will see a line of output indicating that the <literal>BEGIN</literal> probe
fired. Once you see this output, <command>dtrace</command> remains paused
Expand Down
12 changes: 6 additions & 6 deletions raw/dtrace/chp-actsub.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ induced the action. Indeed, whenever any data is traced, it must be accompanied
by the <acronym>EPID</acronym> to enable the consumer to make sense of the
data. Therefore, the default action is to trace the <acronym>EPID</acronym> and
nothing else.</para>
<para>Using the default action allows for simple use of <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry>. For example, the following
<para>Using the default action allows for simple use of <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry>. For example, the following
example command enables all probes in the <literal>TS</literal> timeshare
scheduling module with the default action:</para>
<screen><userinput># dtrace -m TS</userinput></screen>
Expand Down Expand Up @@ -127,7 +127,7 @@ more information on using the <function>print</function> action.</para>
traces D expressions. However, <function>printf</function> allows for elaborate <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3C</manvolnum></citerefentry>-style formatting. Like <citerefentry><refentrytitle>printf</refentrytitle><manvolnum>3C</manvolnum></citerefentry>, the parameters consists
of a <replaceable>format</replaceable> string followed by a variable number
of arguments. By default, the arguments are traced to the directed buffer.
The arguments are later formatted for output by <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> according to the specified
The arguments are later formatted for output by <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> according to the specified
format string. For example, the first two examples of <function>trace</function> from <xref linkend="chp-actsub-trace" /> could be combined in a single <function>printf</function>:</para><programlisting>printf("execname is %s; priority is %d", execname, curlwpsinfo-&gt;pr_pri);</programlisting><para>For more information on <function>printf</function>, see <xref linkend="chp-fmt" />.</para>
</sect2>
<sect2 xml:id="chp-actsub-printa">
Expand Down Expand Up @@ -429,9 +429,9 @@ in a stack with Java frame translation in place.</para>
<para><indexterm><primary>destructive actions</primary></indexterm><indexterm><primary>actions</primary><secondary>destructive</secondary></indexterm>Some
DTrace actions are destructive in that they change the state of the system
in some well-defined way. Destructive actions may not be used unless they
have been explicitly enabled. When using <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry>, you can enable destructive
have been explicitly enabled. When using <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry>, you can enable destructive
actions using the <option>w</option> option. If an attempt is made to enable
destructive actions in <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> without
destructive actions in <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> without
explicitly enabling them, <command>dtrace</command> will fail with a message
similar to the following example:</para>
<screen>dtrace: failed to enable 'syscall': destructive actions not allowed</screen>
Expand All @@ -448,7 +448,7 @@ for details on DTrace security privileges.</para>
<programlisting>void stop(void)</programlisting>
<para><indexterm><primary>actions</primary><secondary>destructive</secondary><tertiary><literal>stop</literal></tertiary></indexterm>The <function>stop</function> action
forces the process that fires the enabled probe to stop when it next leaves
the kernel, as if stopped by a <citerefentry><refentrytitle>proc</refentrytitle><manvolnum>4</manvolnum></citerefentry> action.
the kernel, as if stopped by a <citerefentry><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry> action.
The <citerefentry><refentrytitle>prun</refentrytitle><manvolnum>1</manvolnum></citerefentry> utility may
be used to resume a process that has been stopped by the <function>stop</function> action.
The <function>stop</function> action can be used to stop a process at any
Expand Down Expand Up @@ -653,7 +653,7 @@ causing the panic. For example:</para>
100% done: 11837 pages dumped, compression ratio 4.66, dump
succeeded
rebooting...</screen>
<para><citerefentry><refentrytitle>syslogd</refentrytitle><manvolnum>1M</manvolnum></citerefentry> will
<para><citerefentry><refentrytitle>syslogd</refentrytitle><manvolnum>8</manvolnum></citerefentry> will
also emit a message upon reboot:</para>
<screen> Jun 10 16:56:31 machine1 savecore: [ID 570001 auth.error] reboot after panic:
dtrace: panic action at probe syscall::mmap:entry (ecb 300000acfc8)</screen>
Expand Down
10 changes: 5 additions & 5 deletions raw/dtrace/chp-anon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ However, only the super user may create an anonymous enabling, and only one
anonymous enabling can exist at any time.</para>
<sect1 xml:id="chp-anon-1">
<title>Anonymous Enablings</title>
<para><indexterm><primary>anonymous tracing</primary></indexterm><indexterm><primary>anonymous enabling</primary></indexterm>To create an anonymous enabling, use the <option>A</option> option with a <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> invocation that specifies the desired probes, predicates, actions and options. <command>dtrace</command> will add a series of driver properties representing your request to the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>7D</manvolnum></citerefentry> driver's configuration file, typically <filename>/kernel/drv/dtrace.conf</filename>. These properties will be read by the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>7D</manvolnum></citerefentry> driver when it is loaded. The driver will enable the specified probes with the specified actions, and create an <firstterm>anonymous state</firstterm> to associate with the new enabling. Normally, the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>7D</manvolnum></citerefentry> driver is loaded on-demand, as are any drivers that act as DTrace providers. To allow tracing during boot, the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>7D</manvolnum></citerefentry> driver must be loaded as early as possible. <command>dtrace</command> adds the necessary <literal>forceload</literal> statements to <filename>/etc/system</filename> (see <citerefentry><refentrytitle>system</refentrytitle><manvolnum>4</manvolnum></citerefentry>) for each required DTrace provider and for <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>7D</manvolnum></citerefentry> itself.</para>
<para>Thereafter, when the system boots, a message is emitted by <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>7D</manvolnum></citerefentry> to indicate that the configuration file has been successfully processed.</para>
<para><indexterm><primary>anonymous tracing</primary></indexterm><indexterm><primary>anonymous enabling</primary></indexterm>To create an anonymous enabling, use the <option>A</option> option with a <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> invocation that specifies the desired probes, predicates, actions and options. <command>dtrace</command> will add a series of driver properties representing your request to the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>4D</manvolnum></citerefentry> driver's configuration file, typically <filename>/kernel/drv/dtrace.conf</filename>. These properties will be read by the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>4D</manvolnum></citerefentry> driver when it is loaded. The driver will enable the specified probes with the specified actions, and create an <firstterm>anonymous state</firstterm> to associate with the new enabling. Normally, the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>4D</manvolnum></citerefentry> driver is loaded on-demand, as are any drivers that act as DTrace providers. To allow tracing during boot, the <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>4D</manvolnum></citerefentry> driver must be loaded as early as possible. <command>dtrace</command> adds the necessary <literal>forceload</literal> statements to <filename>/etc/system</filename> (see <citerefentry><refentrytitle>system</refentrytitle><manvolnum>5</manvolnum></citerefentry>) for each required DTrace provider and for <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>4D</manvolnum></citerefentry> itself.</para>
<para>Thereafter, when the system boots, a message is emitted by <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>4D</manvolnum></citerefentry> to indicate that the configuration file has been successfully processed.</para>
<para>All options may be set with an anonymous enabling, including buffer size, dynamic variable size, speculation size, number of speculations, and so on.</para>
<para>To remove an anonymous enabling, specify <option>A</option> to <command>dtrace</command> without any probe descriptions.</para>
</sect1>
Expand All @@ -24,13 +24,13 @@ anonymous enabling can exist at any time.</para>
</sect1>
<sect1 xml:id="chp-anon-3">
<title>Anonymous Tracing Examples</title>
<para><indexterm><primary>examples</primary><secondary>anonymous tracing</secondary></indexterm><indexterm><primary>anonymous tracing</primary><secondary>example of use</secondary></indexterm>The following example shows an anonymous DTrace enabling for every probe in the <citerefentry><refentrytitle>iprb</refentrytitle><manvolnum>7D</manvolnum></citerefentry> module:</para>
<para><indexterm><primary>examples</primary><secondary>anonymous tracing</secondary></indexterm><indexterm><primary>anonymous tracing</primary><secondary>example of use</secondary></indexterm>The following example shows an anonymous DTrace enabling for every probe in the <citerefentry><refentrytitle>iprb</refentrytitle><manvolnum>4D</manvolnum></citerefentry> module:</para>
<screen><userinput># dtrace -A -m iprb</userinput>
dtrace: saved anonymous enabling in /kernel/drv/dtrace.conf
dtrace: added forceload directives to /etc/system
dtrace: run update_drv(1M) or reboot to enable changes
<userinput># reboot</userinput></screen>
<para>After rebooting, <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>7D</manvolnum></citerefentry> prints a message on the console to indicate that it is enabling the specified probes:</para>
<para>After rebooting, <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>4D</manvolnum></citerefentry> prints a message on the console to indicate that it is enabling the specified probes:</para>
<screen> ...
Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Expand Down Expand Up @@ -84,7 +84,7 @@ dtrace: saved anonymous enabling in /kernel/drv/dtrace.conf
dtrace: added forceload directives to /etc/system
dtrace: run update_drv(1M) or reboot to enable changes
<userinput># reboot</userinput></screen>
<para>After rebooting, <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>7D</manvolnum></citerefentry> prints a different message on the console to indicate the slightly different enabling:</para>
<para>After rebooting, <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>4D</manvolnum></citerefentry> prints a different message on the console to indicate the slightly different enabling:</para>
<screen> ...
Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Expand Down
12 changes: 6 additions & 6 deletions raw/dtrace/chp-buf.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<chapter xml:id="chp-buf">
<title>Buffers and Buffering</title>
<para><phrase role="first-word">Data buffering and management</phrase> is an essential service provided by the
DTrace framework for its clients, such as <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry>. This chapter explores data
DTrace framework for its clients, such as <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry>. This chapter explores data
buffering in detail and describes options you can use to change DTrace's buffer
management policies.</para>
<sect1 xml:id="chp-buf-1">
Expand Down Expand Up @@ -75,7 +75,7 @@ the rate at which the system processes such actions.</para>
</note><para>Under the <literal>switch</literal> policy, if a given
enabled probe would trace more data than there is space available in the active
principal buffer, the data is <emphasis>dropped</emphasis> and a per-CPU drop
count is incremented. In the event of one or more drops, <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> displays a message similar
count is incremented. In the event of one or more drops, <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> displays a message similar
to the following example:</para><screen>dtrace: 11 drops on CPU 0</screen><para>If a given record is larger than the total buffer size, the record will
be dropped regardless of buffer policy. You can reduce or eliminate drops
by either increasing the size of the principal buffer with the <literal>bufsize</literal> option
Expand All @@ -94,7 +94,7 @@ one or more of the per-CPU buffers has filled, use the <literal>fill</literal> b
policy. Under this policy, tracing continues until an enabled probe attempts
to trace more data than can fit in the remaining principal buffer space. When
insufficient space remains, the buffer is marked as filled and the consumer
is notified that at least one of its per-CPU buffers has filled. Once <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> detects a single filled buffer,
is notified that at least one of its per-CPU buffers has filled. Once <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> detects a single filled buffer,
tracing is stopped, all buffers are processed and <command>dtrace</command> exits.
No further data will be traced to a filled buffer even if the data would fit
in the buffer.</para><para>To use the <literal>fill</literal> policy, set the <literal>bufpolicy</literal> option
Expand All @@ -113,7 +113,7 @@ the <literal>END</literal> probe may fire on a CPU that has a filled buffer.
To accommodate <literal>END</literal> tracing in <literal>fill</literal> buffers,
DTrace calculates the amount of space potentially consumed by <literal>END</literal> probes
and <emphasis>subtracts</emphasis> this space from the size of the principal
buffer. If the net size is negative, DTrace will refuse to start, and <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> will output a corresponding
buffer. If the net size is negative, DTrace will refuse to start, and <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> will output a corresponding
error message:</para><screen>dtrace: END enablings exceed size of principal buffer</screen><para>The reservation mechanism ensures that a full buffer always has sufficient
space for any <literal>END</literal> probes.</para>
</sect3>
Expand All @@ -125,7 +125,7 @@ policy helps you trace the events leading up to a failure. If reproducing
the failure takes hours or days, you might wish to keep only the most recent
data. Once a principal buffer has filled, tracing wraps around to the first
entry, thereby overwriting older tracing data. You establish the ring buffer
by setting the <literal>bufpolicy</literal> option to the string <literal>ring</literal>:</para><screen><userinput># dtrace -s foo.d -x bufpolicy=ring</userinput></screen><para>When used to create a ring buffer, <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> will not display any output
by setting the <literal>bufpolicy</literal> option to the string <literal>ring</literal>:</para><screen><userinput># dtrace -s foo.d -x bufpolicy=ring</userinput></screen><para>When used to create a ring buffer, <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> will not display any output
until the process is terminated. At that time, the ring buffer is consumed
and processed. <command>dtrace</command> processes each ring buffer in CPU
order. Within a CPU's buffer, trace records will be displayed in order from
Expand Down Expand Up @@ -210,7 +210,7 @@ to allocate a buffer of desired size either because not enough memory is availab
or because the DTrace consumer has exceeded one of the tunable limits described
in <xref linkend="chp-opt" />.
You can configure the policy for buffer allocation failure using <literal>bufresize</literal> option, which defaults to <literal>auto</literal>. Under the <literal>auto</literal> buffer resize policy, the size of a buffer is halved until
a successful allocation occurs. <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> generates
a successful allocation occurs. <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8M</manvolnum></citerefentry> generates
a message if a buffer as allocated is smaller than the requested size:</para>
<screen><userinput># dtrace -P syscall -b 4g</userinput>
dtrace: description 'syscall' matched 430 probes
Expand Down
2 changes: 1 addition & 1 deletion raw/dtrace/chp-dtrace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ CPU ID FUNCTION:NAME
dtrace: error on enabled probe ID 1 (ID 1: dtrace:::BEGIN): invalid address
(0x0) in action #1 at DIF offset 12
dtrace: 1 error on CPU 2</screen>
<para>The output shows that the <literal>ERROR</literal> probe fired, and also illustrates <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>1M</manvolnum></citerefentry> reporting the error. <command>dtrace</command> has its own enabling of the <literal>ERROR</literal> probe to allow it to report errors. Using the <literal>ERROR</literal> probe, you can create your own custom error handling.</para>
<para>The output shows that the <literal>ERROR</literal> probe fired, and also illustrates <citerefentry><refentrytitle>dtrace</refentrytitle><manvolnum>8</manvolnum></citerefentry> reporting the error. <command>dtrace</command> has its own enabling of the <literal>ERROR</literal> probe to allow it to report errors. Using the <literal>ERROR</literal> probe, you can create your own custom error handling.</para>
<para>The arguments to the <literal>ERROR</literal> probe are as follows:</para>
<informaltable frame="topbot">
<tgroup cols="2" colsep="0" rowsep="0">
Expand Down
Loading

0 comments on commit 8c023e6

Please sign in to comment.