Re: [PATCH 5/5] set/show code-cache NEWS and doc

Yao Qi
2013-10-24T08:26:46Z

On 10/23/2013 11:25 PM, Eli Zaretskii wrote:
> Thanks. However, this (and even more importantly, the manual) should
> explain what is "code" in this context. "Code" is too general a word
> to hope that the reader will immediately understand what you mean.
>

I go through gdb.texinfo, and find "program code" is used in some
places. I choose it.

> Also, the last sentence above should be in the manual; it's not good
> that the manual has less details than NEWS.

OK, add one line in the manual to mention that this improves
disassemble. How about this?

--
Yao (é½å°§)

gdb:

2013-10-23 Yao Qi <yao@codesourcery.com>

* NEWS: Add note on new "set code-cache" option.

gdb/doc:

2013-10-23 Yao Qi <yao@codesourcery.com>

* gdb.texinfo (Caching Remote Data): Document new
`set/show stack-cache' option.
---
gdb/NEWS | 6 ++++++
gdb/doc/gdb.texinfo | 15 ++++++++++++++-
2 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/gdb/NEWS b/gdb/NEWS
index 10834df..10d5804 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -98,6 +98,12 @@ set range-stepping
show range-stepping
Control whether target-assisted range stepping is enabled.

+set code-cache
+show code-cache
+ Use more aggressive caching for accesses to the program code. This
+ improves performance of remote debugging (particularly disassemble)
+ without affecting correctness.
+
* You can now use a literal value 'unlimited' for options that
interpret 0 or -1 as meaning "unlimited". E.g., "set
trace-buffer-size unlimited" is now an alias for "set
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 44fb174..5770382 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -10796,7 +10796,8 @@ Therefore, by default, @value{GDBN} only caches data
known to be on the stack@footnote{In non-stop mode, it is moderately
rare for a running thread to modify the stack of a stopped thread
in a way that would interfere with a backtrace, and caching of
-stack reads provides a significant speed up of remote backtraces.}.
+stack reads provides a significant speed up of remote backtraces.} or
+in the program code.
Other regions of memory can be explicitly marked as
cacheable; see @pxref{Memory Region Attributes}.

@@ -10821,6 +10822,18 @@ caching. By default, this option is @code{ON}.
@item show stack-cache
Show the current state of data caching for memory accesses.

+@kindex set code-cache
+@item set code-cache on
+@itemx set code-cache off
+Enable or disable caching of program code accesses. When @code{ON},
+use caching. By default, this option is @code{ON}. This improves
+performance of disassemble in remote debugging without affecting
+correctness.
+
+@kindex show code-cache
+@item show code-cache
+Show the current state of data caching for program code accesses.
+
@kindex info dcache
@item info dcache @r{[}line@r{]}
Print the information about the data cache performance. The
--
1.7.7.6