Skip to content

Commit d39410a

Browse files
Lixin Guonashif
authored andcommitted
tests: subsys: fixed the samples/tracing code can not generate coverage
Add some tracing functions to fix that the samples/tracing code cannot generate coverage by twister. Fixed #38323 Signed-off-by: Lixin Guo <[email protected]>
1 parent 6badb7f commit d39410a

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

subsys/tracing/test/tracing_string_format_test.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,3 +301,39 @@ void sys_trace_k_timer_init(struct k_timer *timer, k_timer_expiry_t expiry_fn,
301301
{
302302
TRACING_STRING("%s: %p\n", __func__, timer);
303303
}
304+
305+
void sys_trace_k_heap_init(struct k_heap *h, void *mem, size_t bytes)
306+
{
307+
TRACING_STRING("%s: %p\n", __func__, h);
308+
}
309+
310+
void sys_trace_k_heap_aligned_alloc_enter(struct k_heap *h, size_t bytes, k_timeout_t timeout)
311+
{
312+
TRACING_STRING("%s: %p\n", __func__, h);
313+
}
314+
315+
void sys_trace_k_heap_alloc_enter(struct k_heap *h, size_t bytes, k_timeout_t timeout)
316+
{
317+
TRACING_STRING("%s: %p\n", __func__, h);
318+
}
319+
320+
void sys_trace_k_heap_free(struct k_heap *h, void *mem)
321+
{
322+
TRACING_STRING("%s: %p\n", __func__, h);
323+
}
324+
325+
void sys_trace_k_heap_aligned_alloc_blocking(struct k_heap *h, size_t bytes, k_timeout_t timeout)
326+
{
327+
TRACING_STRING("%s: %p\n", __func__, h);
328+
}
329+
330+
void sys_trace_k_heap_alloc_exit(struct k_heap *h, size_t bytes, k_timeout_t timeout, void *ret)
331+
{
332+
TRACING_STRING("%s: %p\n", __func__, h);
333+
}
334+
335+
void sys_trace_k_heap_aligned_alloc_exit(struct k_heap *h, size_t bytes,
336+
k_timeout_t timeout, void *ret)
337+
{
338+
TRACING_STRING("%s: %p\n", __func__, h);
339+
}

0 commit comments

Comments
 (0)