24#include <l4/sys/ktrace_events.h>
30#if defined(__cpp_lib_generator)
39static constexpr size_t log_name_buffer_size = 64U;
42static constexpr size_t object_name_buffer_size = 16U;
53 using Sequence = L4_ktrace_t__Mword;
54 using Item = l4_tracebuffer_entry_t;
57 using Drop_policy = Buffer::Drop_policy;
58 using Status = Buffer::Status;
59 using Slot = Buffer::Slot;
61 using Id =
unsigned long;
70 std::string shortname;
98 static std::optional<Index_desc>
index(
unsigned idx);
106#if defined(__cpp_lib_generator)
107 static std::generator<Index_desc>
indexes();
137 size_t dequeue(Item *
items,
size_t capacity,
size_t burst, Drop_policy policy,
138 Sequence *drops =
nullptr);
167 static constexpr unsigned tracebuffer_version = 0;
168 static constexpr size_t yield_cycles = 100;
L4::Cap related definitions.
C++ interface for capabilities.
Blocking ring buffer consumer.
static std::endian endianness()
Get the endianness supported by this class.
static std::optional< Id > ptr_to_id(void *const ptr)
Convert kernel object pointer to global kernel object ID.
static void validate()
Check that the base debugger (JDB) capability is valid and accessible.
static std::optional< Index_desc > index(unsigned idx)
Map a dynamic tracebuffer log index to names.
static std::vector< Index_desc > indexes()
Get all mappings of dynamic tracebuffer log indexes to names.
static Tracebuffer & instance()
Get the singleton instance of this class.
size_t dequeue(Item *items, size_t capacity, size_t burst, Drop_policy policy, Sequence *drops=nullptr)
Dequeue items from the tracebuffer.
static std::optional< std::string > id_to_name(Id const id)
Convert global kernel object ID to object name.
static unsigned version()
Get the tracebuffer format version supported by this class.
size_t items() const
Get the capacity (in items) of the tracebuffer ring buffer.
The debugger interface specifies common debugging related definitions.
#define L4_PAGESIZE
Minimal page size (in bytes).
Shared-memory multiple-producer multiple-consumer head-drop ring buffer implementation.
Data buffer used to transfer packets.
Mapping of the dynamic tracebuffer log indexes to names.