static RTE_DEFINE_PER_LCORE(int, ctf_count);
static struct trace_point_head tp_list = STAILQ_HEAD_INITIALIZER(tp_list);
-static struct trace trace;
+static struct trace trace = { .args = STAILQ_HEAD_INITIALIZER(trace.args), };
struct trace *
trace_obj_get(void)
int
eal_trace_init(void)
{
+ struct trace_arg *arg;
+
/* Trace memory should start with 8B aligned for natural alignment */
RTE_BUILD_BUG_ON((offsetof(struct __rte_trace_header, mem) % 8) != 0);
goto fail;
}
+ if (!STAILQ_EMPTY(&trace.args))
+ trace.status = true;
+
if (!rte_trace_is_enabled())
return 0;
*/
trace_uuid_generate();
+ /* Apply buffer size configuration for trace output */
+ trace_bufsz_args_apply();
+
/* Generate CTF TDSL metadata */
if (trace_metadata_create() < 0)
goto fail;
if (trace_epoch_time_save() < 0)
goto fail;
+ /* Apply global configurations */
+ STAILQ_FOREACH(arg, &trace.args, next)
+ trace_args_apply(arg->val);
+
rte_trace_mode_set(trace.mode);
return 0;
return;
trace_mem_per_thread_free();
trace_metadata_destroy();
+ eal_trace_args_free();
}
bool