diff options
author | Markus Metzger <markus.t.metzger@intel.com> | 2013-11-28 16:39:12 +0100 |
---|---|---|
committer | Markus Metzger <markus.t.metzger@intel.com> | 2015-02-09 09:42:28 +0100 |
commit | d33501a51f46193387ff2d101752a9a878202f82 (patch) | |
tree | fbe786f422bb7045cc2c626314076e41ad3a346b /gdb/doc | |
parent | f4abbc168227003a4836dd1a5dd558f40be96372 (diff) | |
download | gdb-d33501a51f46193387ff2d101752a9a878202f82.zip gdb-d33501a51f46193387ff2d101752a9a878202f82.tar.gz gdb-d33501a51f46193387ff2d101752a9a878202f82.tar.bz2 |
record-btrace: add bts buffer size configuration option
Allow the size of the branch trace ring buffer to be defined by the
user. The specified buffer size will be used when BTS tracing is
enabled for new threads.
The obtained buffer size may differ from the requested size. The
actual buffer size for the current thread is shown in the "info record"
command.
Bigger buffers mean longer traces, but also longer processing time.
2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
* btrace.c (parse_xml_btrace_conf_bts): Add size.
(btrace_conf_bts_attributes): New.
(btrace_conf_children): Add attributes.
* common/btrace-common.h (btrace_config_bts): New.
(btrace_config)<bts>: New.
(btrace_config): Update comment.
* nat/linux-btrace.c (linux_enable_btrace, linux_enable_bts):
Use config.
* features/btrace-conf.dtd: Increment version. Add size
attribute to bts element.
* record-btrace.c (set_record_btrace_bts_cmdlist,
show_record_btrace_bts_cmdlist): New.
(record_btrace_adjust_size, record_btrace_print_bts_conf,
record_btrace_print_conf, cmd_set_record_btrace_bts,
cmd_show_record_btrace_bts): New.
(record_btrace_info): Call record_btrace_print_conf.
(_initialize_record_btrace): Add commands.
* remote.c: Add PACKET_Qbtrace_conf_bts_size enum.
(remote_protocol_features): Add Qbtrace-conf:bts:size packet.
(btrace_sync_conf): Synchronize bts size.
(_initialize_remote): Add Qbtrace-conf:bts:size packet.
* NEWS: Announce new commands and new packets.
doc/
* gdb.texinfo (Branch Trace Configuration Format): Add size.
(Process Record and Replay): Describe new set|show commands.
(General Query Packets): Describe Qbtrace-conf:bts:size packet.
testsuite/
* gdb.btrace/buffer-size: New.
gdbserver/
* linux-low.c (linux_low_btrace_conf): Print size.
* server.c (handle_btrace_conf_general_set): New.
(hanle_general_set): Call handle_btrace_conf_general_set.
(handle_query): Report Qbtrace-conf:bts:size as supported.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 78 |
2 files changed, 80 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index b4a9cba..b8e1f7f 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,5 +1,11 @@ 2015-02-09 Markus Metzger <markus.t.metzger@intel.com> + * gdb.texinfo (Branch Trace Configuration Format): Add size. + (Process Record and Replay): Describe new set|show commands. + (General Query Packets): Describe Qbtrace-conf:bts:size packet. + +2015-02-09 Markus Metzger <markus.t.metzger@intel.com> + * gdb.texinfo (Process Record and Replay): Describe the "record btrace bts" command. (General Query Packets): Describe qXfer:btrace-conf:read packet. diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 411f067..d1f22de 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -6561,6 +6561,30 @@ position. @item show record btrace replay-memory-access Show the current setting of @code{replay-memory-access}. +@kindex set record btrace bts +@item set record btrace bts buffer-size @var{size} +@itemx set record btrace bts buffer-size unlimited +Set the requested ring buffer size for branch tracing in @acronym{BTS} +format. Default is 64KB. + +If @var{size} is a positive number, then @value{GDBN} will try to +allocate a buffer of at least @var{size} bytes for each new thread +that uses the btrace recording method and the @acronym{BTS} format. +The actually obtained buffer size may differ from the requested +@var{size}. Use the @code{info record} command to see the actual +buffer size for each thread that uses the btrace recording method and +the @acronym{BTS} format. + +If @var{limit} is @code{unlimited} or zero, @value{GDBN} will try to +allocate a buffer of 4MB. + +Bigger buffers mean longer traces. On the other hand, @value{GDBN} will +also need longer to process the branch trace data before it can be used. + +@item show record btrace bts buffer-size @var{size} +Show the current setting of the requested ring buffer size for branch +tracing in @acronym{BTS} format. + @kindex info record @item info record Show various statistics about the recording depending on the recording @@ -6587,9 +6611,25 @@ Maximum number of instructions that may be contained in the execution log. @end itemize @item btrace -For the @code{btrace} recording method, it shows the recording format, -the number of instructions that have been recorded and the number of blocks -of sequential control-flow that is formed by the recorded instructions. +For the @code{btrace} recording method, it shows: + +@itemize @bullet +@item +Recording format. +@item +Number of instructions that have been recorded. +@item +Number of blocks of sequential control-flow formed by the recorded +instructions. +@item +Whether in record mode or replay mode. +@end itemize + +For the @code{bts} recording format, it also shows: +@itemize @bullet +@item +Size of the perf ring buffer. +@end itemize @end table @kindex record delete @@ -35826,6 +35866,11 @@ These are the currently defined stub features and their properties: @tab @samp{-} @tab Yes +@item @samp{Qbtrace-conf:bts:size} +@tab Yes +@tab @samp{-} +@tab Yes + @item @samp{QNonStop} @tab No @tab @samp{-} @@ -36083,6 +36128,9 @@ The remote stub understands the @samp{Qbtrace:off} packet. @item Qbtrace:bts The remote stub understands the @samp{Qbtrace:bts} packet. +@item Qbtrace-conf:bts:size +The remote stub understands the @samp{Qbtrace-conf:bts:size} packet. + @end table @item qSymbol:: @@ -36522,6 +36570,18 @@ Branch tracing has been disabled. A badly formed request or an error was encountered. @end table +@item Qbtrace-conf:bts:size=@var{value} +Set the requested ring buffer size for new threads that use the +btrace recording method in bts format. + +Reply: +@table @samp +@item OK +The ring buffer size has been set. +@item E.errtext +A badly formed request or an error was encountered. +@end table + @end table @node Architecture-Specific Protocol Details @@ -39050,7 +39110,16 @@ configuration using the @samp{qXfer:btrace-conf:read} (@pxref{qXfer btrace-conf read}) packet. The configuration describes the branch trace format and configuration -settings for that format. +settings for that format. The following information is described: + +@table @code +@item bts +This thread uses the @dfn{Branch Trace Store} (@acronym{BTS}) format. +@table @code +@item size +The size of the @acronym{BTS} ring buffer in bytes. +@end table +@end table @value{GDBN} must be linked with the Expat library to support XML branch trace configuration discovery. @xref{Expat}. @@ -39062,6 +39131,7 @@ The formal DTD for the branch trace configuration format is given below: <!ATTLIST btrace-conf version CDATA #FIXED "1.0"> <!ELEMENT bts EMPTY> +<!ATTLIST bts size CDATA #IMPLIED> @end smallexample @include agentexpr.texi |