6cc3169677
This patch adds the ability to chain multiple trace entries together to extend the size of the argument buffer. This means that a tracepoint is no longer limited to the size of a single entry, so it can have any number of arguments, and their size is also not constrained to a single entry. Some limitations are still there: a tracepoint can have up to 5 arguments and strings are limited to 255 bytes. These constraints stem from the definitions of tracepoint structures, which could be easily modified to extend the limits if needed. To record a tracepoint requiring larger buffer, aside from reserving `spdk_trace_entry` structure, a series of `spdk_trace_entry_buffer` structures are allocated too. Each of them acts as a buffer for the arguments. To allow trace tools to treat the buffer structures similarly to regular entries, they also have the `tpoint_id` and `tsc` fields. The id is always assigned to `SPDK_TRACE_MAX_TPOINT_ID` to make sure that a buffer is never mistaken for an entry, while the value of `tsc` is always shared with the initial entry. This also provides a way for the trace tools to verify if an entry is part of a chained buffer. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I51ceea6b6e57df95d4b8bd797f04edbc4936c180 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8405 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> |
||
---|---|---|
.. | ||
Makefile | ||
spdk_trace.map | ||
trace_flags.c | ||
trace_rpc.c | ||
trace.c |