Commit 6be622c3 authored by Russ Cox's avatar Russ Cox

doc: remove interior <code> spaces in debugging, diagnostics docs

Change-Id: I20de6207d386635025dbb603c57219218e9a9af5
Reviewed-on: https://go-review.googlesource.com/87019
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent ee34617d
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
"Path": "/doc/gdb" "Path": "/doc/gdb"
}--> }-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<i> <i>
<p> <p>
The following instructions apply to the standard toolchain The following instructions apply to the standard toolchain
...@@ -57,7 +64,7 @@ use to inspect a live process or a core dump. ...@@ -57,7 +64,7 @@ use to inspect a live process or a core dump.
<p> <p>
Pass the <code>'-w'</code> flag to the linker to omit the debug information Pass the <code>'-w'</code> flag to the linker to omit the debug information
(for example, <code>go build -ldflags "-w" prog.go</code>). (for example, <code>go</code> <code>build</code> <code>-ldflags=-w</code> <code>prog.go</code>).
</p> </p>
<p> <p>
...@@ -157,7 +164,7 @@ the DWARF code. ...@@ -157,7 +164,7 @@ the DWARF code.
<p> <p>
If you're interested in what the debugging information looks like, run If you're interested in what the debugging information looks like, run
'<code>objdump -W a.out</code>' and browse through the <code>.debug_*</code> <code>objdump</code> <code>-W</code> <code>a.out</code> and browse through the <code>.debug_*</code>
sections. sections.
</p> </p>
...@@ -180,7 +187,7 @@ the form <code>pkg.(*MyType).Meth</code>. ...@@ -180,7 +187,7 @@ the form <code>pkg.(*MyType).Meth</code>.
<p> <p>
In this tutorial we will inspect the binary of the In this tutorial we will inspect the binary of the
<a href="/pkg/regexp/">regexp</a> package's unit tests. To build the binary, <a href="/pkg/regexp/">regexp</a> package's unit tests. To build the binary,
change to <code>$GOROOT/src/regexp</code> and run <code>go test -c</code>. change to <code>$GOROOT/src/regexp</code> and run <code>go</code> <code>test</code> <code>-c</code>.
This should produce an executable file named <code>regexp.test</code>. This should produce an executable file named <code>regexp.test</code>.
</p> </p>
...@@ -206,7 +213,7 @@ Loading Go Runtime support. ...@@ -206,7 +213,7 @@ Loading Go Runtime support.
</pre> </pre>
<p> <p>
The message <code>"Loading Go Runtime support"</code> means that GDB loaded the The message "Loading Go Runtime support" means that GDB loaded the
extension from <code>$GOROOT/src/runtime/runtime-gdb.py</code>. extension from <code>$GOROOT/src/runtime/runtime-gdb.py</code>.
</p> </p>
...@@ -371,7 +378,7 @@ Stack level 0, frame at 0x7ffff7f9ff88: ...@@ -371,7 +378,7 @@ Stack level 0, frame at 0x7ffff7f9ff88:
</pre> </pre>
<p> <p>
The command <code>info locals</code> lists all variables local to the function and their values, but is a bit The command <code>info</code> <code>locals</code> lists all variables local to the function and their values, but is a bit
dangerous to use, since it will also try to print uninitialized variables. Uninitialized slices may cause gdb to try dangerous to use, since it will also try to print uninitialized variables. Uninitialized slices may cause gdb to try
to print arbitrary large arrays. to print arbitrary large arrays.
</p> </p>
...@@ -404,7 +411,7 @@ $3 = struct hchan&lt;*testing.T&gt; ...@@ -404,7 +411,7 @@ $3 = struct hchan&lt;*testing.T&gt;
</pre> </pre>
<p> <p>
That <code>struct hchan&lt;*testing.T&gt;</code> is the That <code>struct</code> <code>hchan&lt;*testing.T&gt;</code> is the
runtime-internal representation of a channel. It is currently empty, runtime-internal representation of a channel. It is currently empty,
or gdb would have pretty-printed its contents. or gdb would have pretty-printed its contents.
</p> </p>
......
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
"Template": true "Template": true
}--> }-->
<!--
NOTE: In this document and others in this directory, the convention is to
set fixed-width phrases with non-fixed-width spaces, as in
<code>hello</code> <code>world</code>.
Do not send CLs removing the interior tags from such phrases.
-->
<h2 id="introduction">Introduction</h2> <h2 id="introduction">Introduction</h2>
<p> <p>
...@@ -45,7 +52,7 @@ of code. The Go runtime provides <a href="https://golang.org/pkg/runtime/pprof/" ...@@ -45,7 +52,7 @@ of code. The Go runtime provides <a href="https://golang.org/pkg/runtime/pprof/"
profiling data</a> in the format expected by the profiling data</a> in the format expected by the
<a href="https://github.com/google/pprof/blob/master/doc/pprof.md">pprof visualization tool</a>. <a href="https://github.com/google/pprof/blob/master/doc/pprof.md">pprof visualization tool</a>.
The profiling data can be collected during testing The profiling data can be collected during testing
via <code>go test</code> or endpoints made available from the <a href="/pkg/net/http/pprof/"> via <code>go</code> <code>test</code> or endpoints made available from the <a href="/pkg/net/http/pprof/">
net/http/pprof</a> package. Users need to collect the profiling data and use pprof tools to filter net/http/pprof</a> package. Users need to collect the profiling data and use pprof tools to filter
and visualize the top code paths. and visualize the top code paths.
</p> </p>
...@@ -435,7 +442,7 @@ Use profiling tools instead first to address them.</p> ...@@ -435,7 +442,7 @@ Use profiling tools instead first to address them.</p>
fine, and then it became serialized. It suggests that there might fine, and then it became serialized. It suggests that there might
be lock contention for a shared resource that creates a bottleneck.</p> be lock contention for a shared resource that creates a bottleneck.</p>
<p>See <a href="https://golang.org/cmd/trace/"><code>go tool trace</code></a> <p>See <a href="https://golang.org/cmd/trace/"><code>go</code> <code>tool</code> <code>trace</code></a>
to collect and analyze runtime traces. to collect and analyze runtime traces.
</p> </p>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment