PATCH: Circular trace buffers
Stan Shebs
stan@codesourcery.com
Tue Mar 16 21:42:00 GMT 2010
This patch adds a flag that requests the target agent to make the trace
buffer circular, so that instead of filling it up and then stopping, the
agent discards the oldest trace frames as necessary to accommodate new
ones. Any hairy memory management code is going to be on the target
side; GDB just has to transmit the setting (and now always via target
vector), and report back status, which may now include a total number of
frames that were created. This also adds complete documentation of the
qTStatus reply, per request. Any comments before I commit?
Stan
2010-03-16 Stan Shebs <stan@codesourcery.com>
Pedro Alves <pedro@codesourcery.com>
* target.h (struct target_ops): New method
to_set_circular_trace_buffer.
(target_set_circular_trace_buffer): New macro.
* target.c (update_current_target): Add
to_set_circular_trace_buffer, fix to_set_disconnected_tracing
default behavior.
* remote.c (remote_set_circular_trace_buffer): New function.
(init_remote_ops): Add it to vector.
* tracepoint.h (struct trace_status): New field traceframes_created,
change buffer_size and buffer_free to int.
* tracepoint.c (circular_trace_buffer): New global.
(start_tracing): Send values of disconnected tracing and circular
trace buffer settings.
(set_circular_trace_buffer): New function.
(parse_trace_state): Handle total space and frames created.
(trace_status_command): Display total space and total frames
created.
(trace_save): Write out new status values.
(parse_trace_status): Set traceframe_count, traceframes_created,
buffer_free and buffer_size to -1 by default.
(_initialize_tracepoint): New setshow for circular-trace-buffer.
* NEWS: Mention the circular trace buffer option.
[gdb/doc]
* gdb.texinfo (Starting and Stopping Trace Experiments): Describe
circular-trace-buffer.
(Tracepoint Packets): Describe QTBuffer, and details of the
qTStatus reply.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: circ-patch-1
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20100316/d7625cf8/attachment.ksh>
More information about the Gdb-patches
mailing list