~ubuntu-branches/ubuntu/wily/google-perftools/wily

« back to all changes in this revision

Viewing changes to doc/pprof_remote_servers.html

  • Committer: Bazaar Package Importer
  • Author(s): Daigo Moriwaki
  • Date: 2009-09-19 00:10:06 UTC
  • mto: (3.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090919001006-m997dckgoqs3sru9
Tags: upstream-1.4
ImportĀ upstreamĀ versionĀ 1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
<code>pprof</code> can send, and the responses it expects in
38
38
return.</p>
39
39
 
 
40
<p>Here are examples that pprof will recognize, when you give them
 
41
on the commandline, are urls.  In general, you
 
42
specify the host and a port (the port-number is required), and put
 
43
the service-name at the end of the url.:</p>
 
44
<blockquote><pre>
 
45
http://myhost:80/pprof/heap            # retrieves a heap profile
 
46
http://myhost:8008/pprof/profile       # retrieves a CPU profile
 
47
http://myhost:80                       # retrieves a CPU profile (the default)
 
48
http://myhost:8080/                    # retrieves a CPU profile (the default)
 
49
myhost:8088/pprof/growth               # "http://" is optional, but port is not
 
50
http://myhost:80/myservice/pprof/heap  # /pprof/heap just has to come at the end
 
51
</pre></blockquote>
40
52
 
41
 
<ul><li> <code><b>/pprof/heap</b></code>
 
53
<h2> <code><b>/pprof/heap</b></code> </h2>
42
54
 
43
55
<p><code>pprof</code> asks for the url <code>/pprof/heap</code> to
44
56
get heap information.  The actual url is controlled via the variable
53
65
<code>pprof</code>.  <code>MallocExtension</code> is defined in the
54
66
header file <code>google/malloc_extension.h</code>.</p>
55
67
 
56
 
<p>Here's an example, from an actual Google webserver, of what the
57
 
output should look like:</p>
58
 
<pre>
59
 
heap profile:   9369: 126987529 [  9369: 126987529] @ heap
60
 
     2:     1024 [     2:     1024] @ 0x87da913 0x8923ad4 0x891d4c2 0x892de12 0x8930519 0x83a16c2 0x836cb38 0x834cd1c 0x8349ba5 0x10a3177 0x8349961
61
 
     1:       36 [     1:       36] @ 0x87da913 0x83a0929 0x836cb38 0x834cd1c 0x8349ba5 0x10a3177 0x8349961
62
 
   308: 10092544 [   308: 10092544] @ 0x87da913 0x8970d66 0x8970e64 0x896e8e2 0x88e69d2 0x88e6add 0x88e6dec 0x88e7384 0x88e73fa 0x8838793 0x8838b36 0x88395f8 0x88f5a4b 0x890d03a 0x890d65a 0x8917666 0x890d1f3 0x890e6e4 0x8349c1b 0x10a3177 0x8349961
63
 
[...]
64
 
</pre>
65
 
 
66
 
 
67
 
</li><li> <code><b>/pprof/growth</b></code>
 
68
<p>Here's an example of what the output should look like:</p>
 
69
<pre>
 
70
heap profile:   1923: 127923432 [  1923: 127923432] @ heap_v2/524288
 
71
     1:      312 [     1:      312] @ 0x2aaaabaf5ccc 0x2aaaaba4cd2c 0x2aaaac08c09a
 
72
   928: 122586016 [   928: 122586016] @ 0x2aaaabaf682c 0x400680 0x400bdd 0x2aaaab1c368a 0x2aaaab1c8f77 0x2aaaab1c0396 0x2aaaab1c86ed 0x4007ff 0x2aaaaca62afa
 
73
     1:       16 [     1:       16] @ 0x2aaaabaf5ccc 0x2aaaabb04bac 0x2aaaabc1b262 0x2aaaabc21496 0x2aaaabc214bb
 
74
[...]
 
75
</pre>
 
76
 
 
77
 
 
78
<p> Older code may produce "version 1" heap profiles which look like this:<p/>
 
79
<pre>
 
80
heap profile:  14933: 791700132 [ 14933: 791700132] @ heap
 
81
     1:   848688 [     1:   848688] @ 0xa4b142 0x7f5bfc 0x87065e 0x4056e9 0x4125f8 0x42b4f1 0x45b1ba 0x463248 0x460871 0x45cb7c 0x5f1744 0x607cee 0x5f4a5e 0x40080f 0x2aaaabad7afa
 
82
     1:  1048576 [     1:  1048576] @ 0xa4a9b2 0x7fd025 0x4ca6d8 0x4ca814 0x4caa88 0x2aaaab104cf0 0x404e20 0x4125f8 0x42b4f1 0x45b1ba 0x463248 0x460871 0x45cb7c 0x5f1744 0x607cee 0x5f4a5e 0x40080f 0x2aaaabad7afa
 
83
  2942: 388629374 [  2942: 388629374] @ 0xa4b142 0x4006a0 0x400bed 0x5f0cfa 0x5f1744 0x607cee 0x5f4a5e 0x40080f 0x2aaaabad7afa
 
84
[...]
 
85
</pre>
 
86
<p> pprof accepts both old and new heap profiles and automatically detects which one you are using.</p>
 
87
 
 
88
<h2> <code><b>/pprof/growth</b></code> </h2>
68
89
 
69
90
<p><code>pprof</code> asks for the url <code>/pprof/growth</code> to
70
91
get heap-profiling delta (growth) information.  The actual url is
89
110
</pre>
90
111
 
91
112
 
92
 
</li><li> <code><b>/pprof/profile</b></code>
 
113
<h2> <code><b>/pprof/profile</b></code> </h2>
93
114
 
94
115
<p><code>pprof</code> asks for the url
95
116
<code>/pprof/profile?seconds=XX</code> to get cpu-profiling
119
140
</pre>
120
141
 
121
142
 
122
 
</li><li> <code><b>/pprof/contention</b></code>
 
143
<h2> <code><b>/pprof/contention</b></code> </h2>
123
144
 
124
145
<p>This is intended to be able to profile (thread) lock contention in
125
146
addition to CPU and memory use.  It's not yet usable.</p>
126
147
 
127
148
 
128
 
</li><li> <code><b>/pprof/cmdline</b></code>
 
149
<h2> <code><b>/pprof/cmdline</b></code> </h2>
129
150
 
130
151
<p><code>pprof</code> asks for the url <code>/pprof/cmdline</code> to
131
152
figure out what application it's profiling.  The actual url is
145
166
</pre>
146
167
 
147
168
 
148
 
</li><li> <code><b>/pprof/symbol</b></code>
 
169
<h2> <code><b>/pprof/symbol</b></code> </h2>
149
170
 
150
171
<p><code>pprof</code> asks for the url <code>/pprof/symbol</code> to
151
172
map from hex addresses to variable names.  The actual url is