mirror of
https://github.com/Syllo/nvtop.git
synced 2026-08-02 08:25:53 -04:00
print some debug messages
This commit is contained in:
@@ -227,7 +227,8 @@ void gpuinfo_v3d_populate_static_info(struct gpu_info *_gpu_info) {
|
||||
|
||||
snprintf(static_info->device_name, sizeof(static_info->device_name), "%s", dev_name);
|
||||
SET_VALID(gpuinfo_device_name_valid, static_info->valid);
|
||||
set_init_max_memory(gpu_info->mb);
|
||||
if (gpu_info->mb >= 0)
|
||||
set_init_max_memory(gpu_info->mb);
|
||||
}
|
||||
|
||||
void gpuinfo_v3d_refresh_dynamic_info(struct gpu_info *_gpu_info) {
|
||||
|
||||
@@ -61,8 +61,14 @@ static char bo_stats_file[50];
|
||||
|
||||
void set_debug_files(int card_id) {
|
||||
snprintf(gpu_usage_file, sizeof(gpu_usage_file), "/sys/kernel/debug/dri/%d/gpu_usage", card_id);
|
||||
if (access(gpu_usage_file, F_OK))
|
||||
printf("%s is not available.\n", gpu_usage_file);
|
||||
snprintf(gpu_pid_usage_file, sizeof(gpu_pid_usage_file), "/sys/kernel/debug/dri/%d/gpu_pid_usage", card_id);
|
||||
if (access(gpu_pid_usage_file, F_OK))
|
||||
printf("%s is not available.\n", gpu_pid_usage_file);
|
||||
snprintf(bo_stats_file, sizeof(bo_stats_file), "/sys/kernel/debug/dri/%d/bo_stats", card_id);
|
||||
if (access(bo_stats_file, F_OK))
|
||||
printf("%s is not available.\n", bo_stats_file);
|
||||
}
|
||||
|
||||
static int mbox_property(int mb, void *buf) {
|
||||
|
||||
Reference in New Issue
Block a user