Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trace: fix error trace missing issue #3278

Merged
merged 1 commit into from
Aug 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ static void put_header(uint32_t *dst, uint32_t id_0,
platform_shared_commit(timer, sizeof(*timer));
}

#if CONFIG_TRACEM
static inline void mtrace_event(const char *data, uint32_t length)
{
struct trace *trace = trace_get();
Expand Down Expand Up @@ -94,7 +93,6 @@ static inline void mtrace_event(const char *data, uint32_t length)

platform_shared_commit(trace, sizeof(*trace));
}
#endif /* CONFIG_TRACEM */

/**
* \brief Runtime trace filtering
Expand Down Expand Up @@ -150,6 +148,10 @@ void trace_log(bool send_atomic, const void *log_entry,
} else {
mtrace_event((const char *)data, MESSAGE_SIZE(arg_count));
}
#else
/* send event by mail box if level is LOG_LEVEL_CRITICAL. */
if (lvl == LOG_LEVEL_CRITICAL)
mtrace_event((const char *)data, MESSAGE_SIZE(arg_count));
#endif /* CONFIG_TRACEM */
}

Expand Down