~rdoering/ubuntu/lucid/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/observer/doc/src/ttb_ug.xml

  • Committer: Elliot Murphy
  • Date: 2009-12-22 02:56:21 UTC
  • mfrom: (3.3.5 sid)
  • Revision ID: elliot@elliotmurphy.com-20091222025621-qv3rja8gbpiabkbe
* Merge with Debian testing; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
* Fixed dialyzer(1) manpage which was placed into section 3 and conflicted
  with dialyzer(3erl).
* New upstream release (it adds a new binary package erlang-erl-docgen).
* Refreshed patches, removed most of emacs.patch which is applied upstream.
* Linked run_test binary from erlang-common-test package to /usr/bin.
* Fixed VCS headers in debian/control.
* Moved from prebuilt manpages to generated from sources. This adds
  erlang-manpages binary package and xsltproc build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
<chapter>
5
5
  <header>
6
6
    <copyright>
7
 
      <year>2002</year>
8
 
      <year>2007</year>
9
 
      <holder>Ericsson AB, All Rights Reserved</holder>
 
7
      <year>2002</year><year>2009</year>
 
8
      <holder>Ericsson AB. All Rights Reserved.</holder>
10
9
    </copyright>
11
10
    <legalnotice>
12
 
  The contents of this file are subject to the Erlang Public License,
13
 
  Version 1.1, (the "License"); you may not use this file except in
14
 
  compliance with the License. You should have received a copy of the
15
 
  Erlang Public License along with this software. If not, it can be
16
 
  retrieved online at http://www.erlang.org/.
17
 
 
18
 
  Software distributed under the License is distributed on an "AS IS"
19
 
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
20
 
  the License for the specific language governing rights and limitations
21
 
  under the License.
22
 
 
23
 
  The Initial Developer of the Original Code is Ericsson AB.
 
11
      The contents of this file are subject to the Erlang Public License,
 
12
      Version 1.1, (the "License"); you may not use this file except in
 
13
      compliance with the License. You should have received a copy of the
 
14
      Erlang Public License along with this software. If not, it can be
 
15
      retrieved online at http://www.erlang.org/.
 
16
    
 
17
      Software distributed under the License is distributed on an "AS IS"
 
18
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
19
      the License for the specific language governing rights and limitations
 
20
      under the License.
 
21
    
24
22
    </legalnotice>
25
23
 
26
24
    <title>Trace Tool Builder</title>
28
26
    <docno></docno>
29
27
    <date></date>
30
28
    <rev></rev>
 
29
    <file>ttb_ug.xml</file>
31
30
  </header>
32
31
 
33
32
  <section>
107
106
f() ->
108
107
   receive 
109
108
      From when pid(From) -> 
110
 
\011 Now = erlang:now(),
 
109
         Now = erlang:now(),
111
110
         From ! {self(),Now}
112
111
   end.      </code>
113
112
      <p>The following example shows the basic use of <c>ttb</c> from
215
214
 
216
215
do_print(Out,{trace_ts,P,call,{M,F,A},Ts},N) ->
217
216
    io:format(Out,
218
 
\011      "~w: ~w, ~w:~n"
219
 
\011      "Call      : ~w:~w/~w~n"
220
 
\011      "Arguments :~p~n~n",
221
 
\011      [N,Ts,P,M,F,length(A),A]);
 
217
              "~w: ~w, ~w:~n"
 
218
              "Call      : ~w:~w/~w~n"
 
219
              "Arguments :~p~n~n",
 
220
              [N,Ts,P,M,F,length(A),A]);
222
221
do_print(Out,{trace_ts,P,return_from,{M,F,A},R,Ts},N) ->
223
222
    io:format(Out,
224
 
\011      "~w: ~w, ~w:~n"
225
 
\011      "Return from  : ~w:~w/~w~n"
226
 
\011      "Return value :~p~n~n",
227
 
\011      [N,Ts,P,M,F,A,R]).      ]]></code>
 
223
              "~w: ~w, ~w:~n"
 
224
              "Return from  : ~w:~w/~w~n"
 
225
              "Return value :~p~n~n",
 
226
              [N,Ts,P,M,F,A,R]).      ]]></code>
228
227
      <p>To distinguish trace logs produced with this tool from other
229
228
        logs, the <c>file</c> option is used in <c>tracer/2</c>. The
230
229
        logs will therefore be named <c>Node-debug_log</c>, where
323
322
  <section>
324
323
    <title>Wrap Logs</title>
325
324
    <p>If you want to limit the size of the trace logs, you can use
326
 
      wrap logs. This works almost like a ciclular buffer. You can
 
325
      wrap logs. This works almost like a circular buffer. You can
327
326
      specify the maximum number of binary logs and the maximum size of
328
327
      each log. <c>ttb</c> will create a new binary log each time a log
329
328
      reaches the maximum size. When the the maximum number of logs are
471
470
        works with local call trace, i.e. when trace patterns are set
472
471
        with <c>ttb:tpl</c>.
473
472
        </p>
474
 
      <p>The same result can be obtaind by using the <c>call</c> flag
 
473
      <p>The same result can be obtained by using the <c>call</c> flag
475
474
        only and setting a match specification like this on local or
476
475
        global function calls:</p>
477
476
      <code type="none">
515
514
        following result:
516
515
        </p>
517
516
      <p></p>
518
 
      <image file="et_processes">
 
517
      <image file="et_processes.gif">
519
518
        <icaption>Filter: "processes"</icaption>
520
519
      </image>
521
 
      <image file="et_modsprocs">
 
520
      <image file="et_modsprocs.gif">
522
521
        <icaption>Filter: "mods_and_procs"</icaption>
523
522
      </image>
524
523
    </section>
691
690
      <em><c>seq_trace</c></em> module in the <em><c>kernel</c></em>
692
691
      application.
693
692
      </p>
694
 
    <p>The support for sequencial tracing provided by the Trace Tool
 
693
    <p>The support for sequential tracing provided by the Trace Tool
695
694
      Builder includes </p>
696
695
    <list type="bulleted">
697
696
      <item>Initiation of the system tracer. This is automatically