mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: add cycle stats to debugger node
Add NVGPU_DBG_GPU_IOCTL_CYCLE_STATS to debugger node, to install/uninstall a buffer for cycle stats. Add NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT to debugger node, to attach/flush/detach a buffer for Mode-E streamout. Those ioctls will apply to the first channel in the debug session. Bug 200464613 Jira NVGPU-1442 Change-Id: I0b96d9a07c016690140292fa5886fda545697ee6 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2002060 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
efdcce03d3
commit
90b0bf98ac
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* NVGPU Public Interface Header
|
||||
*
|
||||
* Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2011-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -1421,8 +1421,33 @@ struct nvgpu_dbg_gpu_set_sm_exception_type_mask_args {
|
||||
_IOW(NVGPU_DBG_GPU_IOCTL_MAGIC, 23, \
|
||||
struct nvgpu_dbg_gpu_set_sm_exception_type_mask_args)
|
||||
|
||||
struct nvgpu_dbg_gpu_cycle_stats_args {
|
||||
__u32 dmabuf_fd;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
#define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS \
|
||||
_IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 24, struct nvgpu_dbg_gpu_cycle_stats_args)
|
||||
|
||||
/* cycle stats snapshot buffer support for mode E */
|
||||
struct nvgpu_dbg_gpu_cycle_stats_snapshot_args {
|
||||
__u32 cmd; /* in: command to handle */
|
||||
__u32 dmabuf_fd; /* in: dma buffer handler */
|
||||
__u32 extra; /* in/out: extra payload e.g.*/
|
||||
/* counter/start perfmon */
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
/* valid commands to control cycle stats shared buffer */
|
||||
#define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT_CMD_FLUSH 0
|
||||
#define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT_CMD_ATTACH 1
|
||||
#define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT_CMD_DETACH 2
|
||||
|
||||
#define NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT \
|
||||
_IOWR(NVGPU_DBG_GPU_IOCTL_MAGIC, 25, struct nvgpu_dbg_gpu_cycle_stats_snapshot_args)
|
||||
|
||||
#define NVGPU_DBG_GPU_IOCTL_LAST \
|
||||
_IOC_NR(NVGPU_DBG_GPU_IOCTL_SET_SM_EXCEPTION_TYPE_MASK)
|
||||
_IOC_NR(NVGPU_DBG_GPU_IOCTL_CYCLE_STATS_SNAPSHOT)
|
||||
|
||||
#define NVGPU_DBG_GPU_IOCTL_MAX_ARG_SIZE \
|
||||
sizeof(struct nvgpu_dbg_gpu_access_fb_memory_args)
|
||||
|
||||
Reference in New Issue
Block a user