1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 299e8ea6cSStefan Strogin #undef TRACE_SYSTEM 399e8ea6cSStefan Strogin #define TRACE_SYSTEM cma 499e8ea6cSStefan Strogin 599e8ea6cSStefan Strogin #if !defined(_TRACE_CMA_H) || defined(TRACE_HEADER_MULTI_READ) 699e8ea6cSStefan Strogin #define _TRACE_CMA_H 799e8ea6cSStefan Strogin 899e8ea6cSStefan Strogin #include <linux/types.h> 999e8ea6cSStefan Strogin #include <linux/tracepoint.h> 1099e8ea6cSStefan Strogin 1199e8ea6cSStefan Strogin TRACE_EVENT(cma_alloc, 1299e8ea6cSStefan Strogin 1399e8ea6cSStefan Strogin TP_PROTO(unsigned long pfn, const struct page *page, 1499e8ea6cSStefan Strogin unsigned int count, unsigned int align), 1599e8ea6cSStefan Strogin 1699e8ea6cSStefan Strogin TP_ARGS(pfn, page, count, align), 1799e8ea6cSStefan Strogin 1899e8ea6cSStefan Strogin TP_STRUCT__entry( 1999e8ea6cSStefan Strogin __field(unsigned long, pfn) 2099e8ea6cSStefan Strogin __field(const struct page *, page) 2199e8ea6cSStefan Strogin __field(unsigned int, count) 2299e8ea6cSStefan Strogin __field(unsigned int, align) 2399e8ea6cSStefan Strogin ), 2499e8ea6cSStefan Strogin 2599e8ea6cSStefan Strogin TP_fast_assign( 2699e8ea6cSStefan Strogin __entry->pfn = pfn; 2799e8ea6cSStefan Strogin __entry->page = page; 2899e8ea6cSStefan Strogin __entry->count = count; 2999e8ea6cSStefan Strogin __entry->align = align; 3099e8ea6cSStefan Strogin ), 3199e8ea6cSStefan Strogin 3299e8ea6cSStefan Strogin TP_printk("pfn=%lx page=%p count=%u align=%u", 3399e8ea6cSStefan Strogin __entry->pfn, 3499e8ea6cSStefan Strogin __entry->page, 3599e8ea6cSStefan Strogin __entry->count, 3699e8ea6cSStefan Strogin __entry->align) 3799e8ea6cSStefan Strogin ); 3899e8ea6cSStefan Strogin 3999e8ea6cSStefan Strogin TRACE_EVENT(cma_release, 4099e8ea6cSStefan Strogin 4199e8ea6cSStefan Strogin TP_PROTO(unsigned long pfn, const struct page *page, 4299e8ea6cSStefan Strogin unsigned int count), 4399e8ea6cSStefan Strogin 4499e8ea6cSStefan Strogin TP_ARGS(pfn, page, count), 4599e8ea6cSStefan Strogin 4699e8ea6cSStefan Strogin TP_STRUCT__entry( 4799e8ea6cSStefan Strogin __field(unsigned long, pfn) 4899e8ea6cSStefan Strogin __field(const struct page *, page) 4999e8ea6cSStefan Strogin __field(unsigned int, count) 5099e8ea6cSStefan Strogin ), 5199e8ea6cSStefan Strogin 5299e8ea6cSStefan Strogin TP_fast_assign( 5399e8ea6cSStefan Strogin __entry->pfn = pfn; 5499e8ea6cSStefan Strogin __entry->page = page; 5599e8ea6cSStefan Strogin __entry->count = count; 5699e8ea6cSStefan Strogin ), 5799e8ea6cSStefan Strogin 5899e8ea6cSStefan Strogin TP_printk("pfn=%lx page=%p count=%u", 5999e8ea6cSStefan Strogin __entry->pfn, 6099e8ea6cSStefan Strogin __entry->page, 6199e8ea6cSStefan Strogin __entry->count) 6299e8ea6cSStefan Strogin ); 6399e8ea6cSStefan Strogin 6499e8ea6cSStefan Strogin #endif /* _TRACE_CMA_H */ 6599e8ea6cSStefan Strogin 6699e8ea6cSStefan Strogin /* This part must be outside protection */ 6799e8ea6cSStefan Strogin #include <trace/define_trace.h> 68