radv: Add _WIN32 guard in radv_check_gpu_hangs
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6162>
This commit is contained in:
@@ -638,10 +638,8 @@ void
|
|||||||
radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
||||||
{
|
{
|
||||||
struct radv_device *device = queue->device;
|
struct radv_device *device = queue->device;
|
||||||
char dump_dir[256], dump_path[512];
|
|
||||||
enum ring_type ring;
|
enum ring_type ring;
|
||||||
uint64_t addr;
|
uint64_t addr;
|
||||||
FILE *f;
|
|
||||||
|
|
||||||
ring = radv_queue_family_to_ring(queue->queue_family_index);
|
ring = radv_queue_family_to_ring(queue->queue_family_index);
|
||||||
|
|
||||||
@@ -655,12 +653,14 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
|||||||
|
|
||||||
fprintf(stderr, "radv: GPU hang detected...\n");
|
fprintf(stderr, "radv: GPU hang detected...\n");
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
/* Create a directory into $HOME/radv_dumps_<pid>_<time> to save
|
/* Create a directory into $HOME/radv_dumps_<pid>_<time> to save
|
||||||
* various debugging info about that GPU hang.
|
* various debugging info about that GPU hang.
|
||||||
*/
|
*/
|
||||||
struct tm *timep, result;
|
struct tm *timep, result;
|
||||||
time_t raw_time;
|
time_t raw_time;
|
||||||
char buf_time[128];
|
FILE *f;
|
||||||
|
char dump_dir[256], dump_path[512], buf_time[128];
|
||||||
|
|
||||||
time(&raw_time);
|
time(&raw_time);
|
||||||
timep = os_localtime(&raw_time, &result);
|
timep = os_localtime(&raw_time, &result);
|
||||||
@@ -768,6 +768,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
|||||||
radv_dump_dmesg(f);
|
radv_dump_dmesg(f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
fprintf(stderr, "radv: GPU hang report saved successfully!\n");
|
fprintf(stderr, "radv: GPU hang report saved successfully!\n");
|
||||||
abort();
|
abort();
|
||||||
|
Reference in New Issue
Block a user