@@ -63,21 +63,24 @@ TRACE_EVENT(cma_release,
TRACE_EVENT(cma_alloc_start,
- TP_PROTO(unsigned int count, unsigned int align),
+ TP_PROTO(const char *name, unsigned int count, unsigned int align),
- TP_ARGS(count, align),
+ TP_ARGS(name, count, align),
TP_STRUCT__entry(
+ __string(name, name)
__field(unsigned int, count)
__field(unsigned int, align)
),
TP_fast_assign(
+ __assign_str(name, name);
__entry->count = count;
__entry->align = align;
),
- TP_printk("count=%u align=%u",
+ TP_printk("name=%s count=%u align=%u",
+ __get_str(name),
__entry->count,
__entry->align)
);
@@ -443,7 +443,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
if (!count)
goto out;
- trace_cma_alloc_start(count, align);
+ trace_cma_alloc_start(cma->name, count, align);
mask = cma_bitmap_aligned_mask(cma, align);
offset = cma_bitmap_aligned_offset(cma, align);
During CMA allocation, print also the name to identify the CMA instance. Suggested-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> --- include/trace/events/cma.h | 9 ++++++--- mm/cma.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-)