btrace, linux: add perf event buffer abstraction
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 17 Jan 2014 13:40:02 +0000 (14:40 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Mon, 9 Feb 2015 08:33:59 +0000 (09:33 +0100)
commitaadf7753fd4cc3d9eb1cd0c089fd7a483b58f59e
treec2ecfeb8490e4595b14c2a3ae89c6a094b51f3ab
parent043c35779713a14e0916a1b3e31e006cd1270ee4
btrace, linux: add perf event buffer abstraction

Collect perf event buffer related fields from btrace_target_info into
a new struct perf_event_buffer.  Update functions that operated on the
buffer to take a struct perf_event_buffer pointer rather than a
btrace_target_info pointer.

2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>

* nat/linux-btrace.h (perf_event_buffer): New.
(btrace_target_info) <buffer, size, data_head>: Replace with ...
<bts>: ... this.
* nat/linux-btrace.c (perf_event_header, perf_event_mmap_size)
(perf_event_buffer_size, perf_event_buffer_begin)
(perf_event_buffer_end, linux_btrace_has_changed): Removed.
Updated users.
(perf_event_new_data): New.
gdb/ChangeLog
gdb/nat/linux-btrace.c
gdb/nat/linux-btrace.h