Skip to content

Commit fda4f1a

Browse files
authored
Merge pull request #490 from akloniex/fix-trace-error
debugability: Restore error traces always using mbox.
2 parents ac9bbed + b015076 commit fda4f1a

6 files changed

Lines changed: 58 additions & 3 deletions

File tree

src/include/sof/trace.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ void trace_init(struct sof *sof);
180180

181181
/* error tracing */
182182
#if TRACEE
183-
#define trace_error(__c, __e, ...) \
184-
_log_message(,, LOG_LEVEL_CRITICAL, __c, __e, ##__VA_ARGS__)
183+
#define trace_error(__c, __e, ...) _log_message(_mbox, _atomic, \
184+
LOG_LEVEL_CRITICAL, __c, __e, ##__VA_ARGS__)
185185
#define trace_error_atomic(__c, __e, ...) \
186-
_log_message(, _atomic, LOG_LEVEL_CRITICAL, __c, __e, ##__VA_ARGS__)
186+
trace_error(__c, __e, ##__VA_ARGS__)
187187
/* write back error value to mbox */
188188
#define trace_error_value(x) \
189189
trace_error(0, "value %u", x)

test/cmocka/src/audio/buffer/mock.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ void _trace_event1(uint32_t log_entry, uint32_t param)
4545
(void)param;
4646
}
4747

48+
void _trace_event_mbox_atomic0(uint32_t log_entry)
49+
{
50+
(void)log_entry;
51+
}
52+
53+
void _trace_event_mbox_atomic1(uint32_t log_entry, uint32_t param)
54+
{
55+
(void)log_entry;
56+
(void)param;
57+
}
58+
4859
void *rzalloc(int zone, uint32_t caps, size_t bytes)
4960
{
5061
(void)zone;

test/cmocka/src/audio/component/mock.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ void _trace_event1(uint32_t log_entry, uint32_t param)
4545
(void)param;
4646
}
4747

48+
void _trace_event_mbox_atomic0(uint32_t log_entry)
49+
{
50+
(void)log_entry;
51+
}
52+
53+
void _trace_event_mbox_atomic1(uint32_t log_entry, uint32_t param)
54+
{
55+
(void)log_entry;
56+
(void)param;
57+
}
58+
4859
void *rzalloc(int zone, uint32_t caps, size_t bytes)
4960
{
5061
(void)zone;

test/cmocka/src/audio/mixer/mock.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ void _trace_event1(uint32_t log_entry, uint32_t param)
4949
(void)param;
5050
}
5151

52+
void _trace_event_mbox_atomic0(uint32_t log_entry)
53+
{
54+
(void)log_entry;
55+
}
56+
57+
void _trace_event_mbox_atomic1(uint32_t log_entry, uint32_t param)
58+
{
59+
(void)log_entry;
60+
(void)param;
61+
}
62+
5263
void *rballoc(int zone, uint32_t caps, size_t bytes)
5364
{
5465
(void)zone;

test/cmocka/src/audio/pipeline/pipeline_mocks.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,17 @@ void _trace_event1(uint32_t log_entry, uint32_t param)
9292
(void)param;
9393
}
9494

95+
void _trace_event_mbox_atomic0(uint32_t log_entry)
96+
{
97+
(void)log_entry;
98+
}
99+
100+
void _trace_event_mbox_atomic1(uint32_t log_entry, uint32_t param)
101+
{
102+
(void)log_entry;
103+
(void)param;
104+
}
105+
95106
int arch_cpu_is_core_enabled(int id)
96107
{
97108
return 1;

test/cmocka/src/lib/alloc/mock.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ void _trace_event1(uint32_t log_entry, uint32_t param)
5555
(void)param;
5656
}
5757

58+
void _trace_event_mbox_atomic0(uint32_t log_entry)
59+
{
60+
(void)log_entry;
61+
}
62+
63+
void _trace_event_mbox_atomic1(uint32_t log_entry, uint32_t param)
64+
{
65+
(void)log_entry;
66+
(void)param;
67+
}
68+
5869
void trace_flush(void)
5970
{
6071
}

0 commit comments

Comments
 (0)