Commit d7511094 authored by lio via Evl's avatar lio via Evl Committed by Philippe Gerum
Browse files

evl trace:fix the occasional NULL pointer references



Trace event *evl_sched_attrs* calls TP_printk("%s") to out print the thread
name get by evl_element_name().

However, evl_element_name() may return NULL sometimes, and TP_printk(%s)
may cause some problems.

This patch will avoid this.
Signed-off-by: default avatarlio <carver4lio@163.com>
parent 1396f154
......@@ -177,7 +177,8 @@ DECLARE_EVENT_CLASS(evl_sched_attrs,
),
TP_printk("thread=%s policy=%s param={ %s }",
evl_element_name(&__entry->thread->element),
evl_element_name(&__entry->thread->element)?
evl_element_name(&__entry->thread->element):"{ }",
evl_print_sched_policy(__entry->policy),
evl_trace_sched_attrs(p,
(struct evl_sched_attrs *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment