Re: [PATCH v3 1/4] mm: cma: add trace events to debug physically-contiguous memory allocations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Aneesh,

On 03/03/15 12:13, Aneesh Kumar K.V wrote:
> 
> Are we interested only in successful allocation and release ? Should we also
> have the trace point carry information regarding failure ?
> 
> -aneesh
> 

I think we actually can be interested in tracing allocation failures
too. Thanks for the remark.

Should it be smth like that?
@@ -408,6 +410,8 @@ struct page *cma_alloc(struct cma *cma, int count,
unsigned int align)
 		start = bitmap_no + mask + 1;
 	}

+	trace_cma_alloc(cma, page, count);
+
 	pr_debug("%s(): returned %p\n", __func__, page);
 	return page;
 }

and in include/trace/events/cma.h:
+TRACE_EVENT(cma_alloc,
<...>
+	TP_fast_assign(
+		__entry->page = page;
+		__entry->count = count;
+	),
+
+	TP_printk("page=%p pfn=%lu count=%lu\n",
+		  __entry->page,
+		  __entry->page ? page_to_pfn(__entry->page) : 0,
+		  __entry->count)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]