| /* SPDX-License-Identifier: GPL-2.0-only */ |
| /* |
| * Trace events for gxp |
| * |
| * Copyright (c) 2023 Google LLC |
| */ |
| |
| #undef TRACE_SYSTEM |
| #define TRACE_SYSTEM gxp |
| |
| #if !defined(_TRACE_GXP_H) || defined(TRACE_HEADER_MULTI_READ) |
| #define _TRACE_GXP_H |
| |
| #include <linux/stringify.h> |
| #include <linux/tracepoint.h> |
| |
| #define GXP_TRACE_SYSTEM __stringify(TRACE_SYSTEM) |
| |
| TRACE_EVENT(gxp_mapping_create_start, |
| |
| TP_PROTO(u64 user_address, size_t size), |
| |
| TP_ARGS(user_address, size), |
| |
| TP_STRUCT__entry(__field(u64, user_address) __field(size_t, size)), |
| |
| TP_fast_assign(__entry->user_address = user_address; __entry->size = size;), |
| |
| TP_printk("user_address = %#llX, size = %ld", __entry->user_address, __entry->size)); |
| |
| TRACE_EVENT(gxp_mapping_create_end, |
| |
| TP_PROTO(u64 user_address, size_t size, int nents), |
| |
| TP_ARGS(user_address, size, nents), |
| |
| TP_STRUCT__entry(__field(u64, user_address) __field(size_t, size) __field(int, nents)), |
| |
| TP_fast_assign(__entry->user_address = user_address; __entry->size = size; |
| __entry->nents = nents;), |
| |
| TP_printk("user_address = %#llX, size = %ld, nents = %d", __entry->user_address, |
| __entry->size, __entry->nents)); |
| |
| TRACE_EVENT(gxp_mapping_destroy_start, |
| |
| TP_PROTO(dma_addr_t device_address, size_t size), |
| |
| TP_ARGS(device_address, size), |
| |
| TP_STRUCT__entry(__field(dma_addr_t, device_address) __field(size_t, size)), |
| |
| TP_fast_assign(__entry->device_address = device_address; __entry->size = size;), |
| |
| TP_printk("device_address = %#llX, size = %ld", __entry->device_address, |
| __entry->size)); |
| |
| TRACE_EVENT(gxp_mapping_destroy_end, |
| |
| TP_PROTO(dma_addr_t device_address, size_t size), |
| |
| TP_ARGS(device_address, size), |
| |
| TP_STRUCT__entry(__field(dma_addr_t, device_address) __field(size_t, size)), |
| |
| TP_fast_assign(__entry->device_address = device_address; __entry->size = size;), |
| |
| TP_printk("device_address = %#llX, size = %ld", __entry->device_address, |
| __entry->size)); |
| |
| TRACE_EVENT(gxp_dmabuf_mapping_create_start, |
| |
| TP_PROTO(int fd), |
| |
| TP_ARGS(fd), |
| |
| TP_STRUCT__entry(__field(int, fd)), |
| |
| TP_fast_assign(__entry->fd = fd;), |
| |
| TP_printk("fd = %d", __entry->fd)); |
| |
| TRACE_EVENT(gxp_dmabuf_mapping_create_end, |
| |
| TP_PROTO(dma_addr_t device_address, size_t size), |
| |
| TP_ARGS(device_address, size), |
| |
| TP_STRUCT__entry(__field(dma_addr_t, device_address) __field(size_t, size)), |
| |
| TP_fast_assign(__entry->device_address = device_address; __entry->size = size;), |
| |
| TP_printk("device_address = %#llX, size = %ld", __entry->device_address, |
| __entry->size)); |
| |
| TRACE_EVENT(gxp_dmabuf_mapping_destroy_start, |
| |
| TP_PROTO(dma_addr_t device_address, size_t size), |
| |
| TP_ARGS(device_address, size), |
| |
| TP_STRUCT__entry(__field(dma_addr_t, device_address) __field(size_t, size)), |
| |
| TP_fast_assign(__entry->device_address = device_address; __entry->size = size;), |
| |
| TP_printk("device_address = %#llX, size = %ld", __entry->device_address, |
| __entry->size)); |
| |
| TRACE_EVENT(gxp_dmabuf_mapping_destroy_end, |
| |
| TP_PROTO(dma_addr_t device_address, size_t size), |
| |
| TP_ARGS(device_address, size), |
| |
| TP_STRUCT__entry(__field(dma_addr_t, device_address) __field(size_t, size)), |
| |
| TP_fast_assign(__entry->device_address = device_address; __entry->size = size;), |
| |
| TP_printk("device_address = %#llX, size = %ld", __entry->device_address, |
| __entry->size)); |
| |
| TRACE_EVENT(gxp_vd_block_ready_start, |
| |
| TP_PROTO(int vdid), |
| |
| TP_ARGS(vdid), |
| |
| TP_STRUCT__entry(__field(int, vdid)), |
| |
| TP_fast_assign(__entry->vdid = vdid;), |
| |
| TP_printk("vdid = %d", __entry->vdid)); |
| |
| TRACE_EVENT(gxp_vd_block_ready_end, |
| |
| TP_PROTO(int vdid), |
| |
| TP_ARGS(vdid), |
| |
| TP_STRUCT__entry(__field(int, vdid)), |
| |
| TP_fast_assign(__entry->vdid = vdid;), |
| |
| TP_printk("vdid = %d", __entry->vdid)); |
| |
| TRACE_EVENT(gxp_vd_block_unready_start, |
| |
| TP_PROTO(int vdid), |
| |
| TP_ARGS(vdid), |
| |
| TP_STRUCT__entry(__field(int, vdid)), |
| |
| TP_fast_assign(__entry->vdid = vdid;), |
| |
| TP_printk("vdid = %d", __entry->vdid)); |
| |
| TRACE_EVENT(gxp_vd_block_unready_end, |
| |
| TP_PROTO(int vdid), |
| |
| TP_ARGS(vdid), |
| |
| TP_STRUCT__entry(__field(int, vdid)), |
| |
| TP_fast_assign(__entry->vdid = vdid;), |
| |
| TP_printk("vdid = %d", __entry->vdid)); |
| |
| TRACE_EVENT(gxp_vd_allocate_start, |
| |
| TP_PROTO(u16 requested_cores), |
| |
| TP_ARGS(requested_cores), |
| |
| TP_STRUCT__entry(__field(u16, requested_cores)), |
| |
| TP_fast_assign(__entry->requested_cores = requested_cores;), |
| |
| TP_printk("requested_cores = %d", __entry->requested_cores)); |
| |
| TRACE_EVENT(gxp_vd_allocate_end, |
| |
| TP_PROTO(int vdid), |
| |
| TP_ARGS(vdid), |
| |
| TP_STRUCT__entry(__field(int, vdid)), |
| |
| TP_fast_assign(__entry->vdid = vdid;), |
| |
| TP_printk("vdid = %d", __entry->vdid)); |
| |
| TRACE_EVENT(gxp_vd_release_start, |
| |
| TP_PROTO(int vdid), |
| |
| TP_ARGS(vdid), |
| |
| TP_STRUCT__entry(__field(int, vdid)), |
| |
| TP_fast_assign(__entry->vdid = vdid;), |
| |
| TP_printk("vdid = %d", __entry->vdid)); |
| |
| TRACE_EVENT(gxp_vd_release_end, |
| |
| TP_PROTO(int vdid), |
| |
| TP_ARGS(vdid), |
| |
| TP_STRUCT__entry(__field(int, vdid)), |
| |
| TP_fast_assign(__entry->vdid = vdid;), |
| |
| TP_printk("vdid = %d", __entry->vdid)); |
| |
| #endif /* _TRACE_GXP_H */ |
| |
| /* This part must be outside protection */ |
| #include <trace/define_trace.h> |