~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to lib/tools/doc/src/eprof.xml

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - 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.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
<erlref>
5
5
  <header>
6
6
    <copyright>
7
 
      <year>1996</year><year>2009</year>
 
7
      <year>1996</year><year>2010</year>
8
8
      <holder>Ericsson AB. All Rights Reserved.</holder>
9
9
    </copyright>
10
10
    <legalnotice>
13
13
      compliance with the License. You should have received a copy of the
14
14
      Erlang Public License along with this software. If not, it can be
15
15
      retrieved online at http://www.erlang.org/.
16
 
    
 
16
 
17
17
      Software distributed under the License is distributed on an "AS IS"
18
18
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19
19
      the License for the specific language governing rights and limitations
20
20
      under the License.
21
 
    
 
21
 
22
22
    </legalnotice>
23
23
 
24
24
    <title>eprof</title>
35
35
      used. The profiling is done using the Erlang trace BIFs. Tracing of
36
36
      local function calls for a specified set of processes is enabled when
37
37
      profiling is begun, and disabled when profiling is stopped.</p>
38
 
    <p>When using Eprof, expect a significant slowdown in program execution,
39
 
      in most cases at least 100 percent.</p>
 
38
    <p>When using Eprof expect a slowdown in program execution.</p>
40
39
  </description>
41
40
  <funcs>
42
41
    <func>
47
46
        <v>Reason = {already_started,Pid}</v>
48
47
      </type>
49
48
      <desc>
50
 
        <p>Starts the Eprof server which owns the Eprof internal database.</p>
 
49
        <p>Starts the Eprof server which holds the internal state of the collected data.</p>
51
50
      </desc>
52
51
    </func>
53
52
    <func>
54
 
      <name>start_profiling(Rootset) -> profiling | error</name>
55
 
      <name>profile(Rootset) -> profiling | error</name>
 
53
      <name>start_profiling(Rootset) -> profiling | {error, Reason}</name>
 
54
      <name>start_profiling(Rootset,Pattern) -> profiling | {error, Reason}</name>
56
55
      <fsummary>Start profiling.</fsummary>
57
56
      <type>
58
57
        <v>Rootset = [atom() | pid()]</v>
 
58
        <v>Pattern = {Module, Function, Arity}</v>
 
59
        <v>Module = Function = atom()</v>
 
60
        <v>Arity = integer()</v>
 
61
        <v>Reason = term()</v>
59
62
      </type>
60
63
      <desc>
61
64
        <p>Starts profiling for the processes in <c>Rootset</c> (and any new
64
67
        <p><c>Rootset</c> is a list of pids and registered names.</p>
65
68
        <p>The function returns <c>profiling</c> if tracing could be enabled
66
69
          for all processes in <c>Rootset</c>, or <c>error</c> otherwise.</p>
 
70
        <p>A pattern can be selected to narrow the profiling. For instance ca a specific
 
71
            module be selected and only the code processes executes in that module will be
 
72
            profiled.</p>
67
73
      </desc>
68
74
    </func>
69
75
    <func>
75
81
      </desc>
76
82
    </func>
77
83
    <func>
78
 
      <name>profile(Rootset,Fun) -> {ok,Value} | {error,Reason} | error</name>
79
 
      <name>profile(Rootset,Module,Function,Args) -> {ok,Value} | {error,Reason} | error</name>
 
84
      <name>profile(Fun) -> profiling | {error, Reason}</name>
 
85
      <name>profile(Rootset) -> profiling | {error, Reason}</name>
 
86
      <name>profile(Rootset,Fun) -> {ok, Value} | {error,Reason}</name>
 
87
      <name>profile(Rootset,Fun,Pattern) -> {ok, Value} | {error, Reason}</name>
 
88
      <name>profile(Rootset,Module,Function,Args) -> {ok, Value} | {error, Reason}</name>
 
89
      <name>profile(Rootset,Module,Function,Args,Pattern) -> {ok, Value} | {error, Reason}</name>
80
90
      <fsummary>Start profiling.</fsummary>
81
91
      <type>
82
92
        <v>Rootset = [atom() | pid()]</v>
83
93
        <v>Fun = fun() -> term()</v>
 
94
        <v>Pattern = {Module, Function, Arity}</v>
84
95
        <v>Module = Function = atom()</v>
85
96
        <v>Args = [term()]</v>
 
97
        <v>Arity = integer()</v>
86
98
        <v>Value = Reason = term()</v>
87
99
      </type>
88
100
      <desc>
96
108
          <c>Rootset</c>, the function returns <c>{ok,Value}</c> when
97
109
          <c>Fun()</c>/<c>apply</c> returns with the value <c>Value</c>, or
98
110
          <c>{error,Reason}</c> if <c>Fun()</c>/<c>apply</c> fails with
99
 
          exit reason <c>Reason</c>. Otherwise it returns <c>error</c>
 
111
          exit reason <c>Reason</c>. Otherwise it returns <c>{error, Reason}</c>
100
112
          immediately.</p>
101
113
        <p>The programmer must ensure that the function given as argument
102
114
          is truly synchronous and that no work continues after
104
116
      </desc>
105
117
    </func>
106
118
    <func>
107
 
      <name>analyse()</name>
 
119
      <name>analyze() -> ok</name>
 
120
      <name>analyze(Type) -> ok</name>
 
121
      <name>analyze(Type,Options) -> ok</name>
 
122
      <type>
 
123
        <v>Type = procs | total</v>
 
124
        <v>Options = [{filter, Filter} | {sort, Sort}</v>
 
125
        <v>Filter = [{calls, integer()} | {time, float()}]</v>
 
126
        <v>Sort = time | calls | mfa</v>
 
127
      </type>
108
128
      <fsummary>Display profiling results per process.</fsummary>
109
129
      <desc>
110
130
        <p>Call this function when profiling has been stopped to display
113
133
          <item>how much time has been used by each process, and</item>
114
134
          <item>in which function calls this time has been spent.</item>
115
135
        </list>
116
 
        <p>Time is shown as percentage of total time, not as absolute time.</p>
117
 
      </desc>
118
 
    </func>
119
 
    <func>
120
 
      <name>total_analyse()</name>
121
 
      <fsummary>Display profiling results per function call.</fsummary>
122
 
      <desc>
123
 
        <p>Call this function when profiling has been stopped to display
 
136
        <p>Call <c>analyze</c> with <c>total</c> option when profiling has been stopped to display
124
137
          the results per function call, that is in which function calls
125
138
          the time has been spent.</p>
126
 
        <p>Time is shown as percentage of total time, not as absolute time.</p>
 
139
        <p>Time is shown as percentage of total time and as absolute time.</p>
127
140
      </desc>
128
141
    </func>
129
142
    <func>