FROMGIT: mm: cma: Add the CMA instance name to the cma_alloc_start trace event
During CMA allocation, print also the name to identify the CMA instance. Link: https://lkml.kernel.org/r/20210326155414.25006-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Suggested-by: Minchan Kim <minchan@kernel.org> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Bug: 178721512 (cherry picked from commit dd9767786e02 https://github.com/hnaz/linux-mm tags/v5.12-rc7-mmots-2021-04-11-20-49) Change-Id: I64a27ce16feed2ba66489c2839aefbd9e86c08fd Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
This commit is contained in:
parent
c453643efa
commit
1cfa9bc019
@ -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)
|
||||
);
|
||||
|
2
mm/cma.c
2
mm/cma.c
@ -455,7 +455,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);
|
||||
|
Loading…
Reference in New Issue
Block a user