diff options
Diffstat (limited to 'drivers/gpu/trace')
| -rw-r--r-- | drivers/gpu/trace/Kconfig | 13 | ||||
| -rw-r--r-- | drivers/gpu/trace/Makefile | 3 | ||||
| -rw-r--r-- | drivers/gpu/trace/trace_gpu_mem.c | 13 |
3 files changed, 29 insertions, 0 deletions
diff --git a/drivers/gpu/trace/Kconfig b/drivers/gpu/trace/Kconfig new file mode 100644 index 000000000000..cd3d19c4a201 --- /dev/null +++ b/drivers/gpu/trace/Kconfig @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-2.0-only + +config TRACE_GPU_MEM + bool "Enable GPU memory usage tracepoints" + default n + help + Choose this option to enable tracepoints for tracking + global and per-process GPU memory usage. Intended for + performance profiling and required for Android. + + Tracepoint availability varies by GPU driver. + + If in doubt, say "N". diff --git a/drivers/gpu/trace/Makefile b/drivers/gpu/trace/Makefile new file mode 100644 index 000000000000..b70fbdc5847f --- /dev/null +++ b/drivers/gpu/trace/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_TRACE_GPU_MEM) += trace_gpu_mem.o diff --git a/drivers/gpu/trace/trace_gpu_mem.c b/drivers/gpu/trace/trace_gpu_mem.c new file mode 100644 index 000000000000..01e855897b6d --- /dev/null +++ b/drivers/gpu/trace/trace_gpu_mem.c @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * GPU memory trace points + * + * Copyright (C) 2020 Google, Inc. + */ + +#include <linux/module.h> + +#define CREATE_TRACE_POINTS +#include <trace/events/gpu_mem.h> + +EXPORT_TRACEPOINT_SYMBOL(gpu_mem_total); |
