return;
va_start(args, format);
+ fprintf(stderr, "intel_dump_gpu: ");
vfprintf(stderr, format, args);
va_end(args);
int handle;
relocated = malloc(bo->size);
- fail_if(relocated == NULL, "intel_aubdump: out of memory\n");
+ fail_if(relocated == NULL, "out of memory\n");
memcpy(relocated, GET_PTR(bo->map), bo->size);
for (size_t i = 0; i < obj->relocation_count; i++) {
- fail_if(relocs[i].offset >= bo->size, "intel_aubdump: reloc outside bo\n");
+ fail_if(relocs[i].offset >= bo->size, "reloc outside bo\n");
if (execbuffer2->flags & I915_EXEC_HANDLE_LUT)
handle = exec_objects[relocs[i].target_handle].handle;
aub_write_header(&aub_file, program_invocation_short_name);
if (verbose)
- printf("[intel_aubdump: running, "
- "output file %s, chipset id 0x%04x, gen %d]\n",
+ printf("[running, output file %s, chipset id 0x%04x, gen %d]\n",
output_filename, device, devinfo.gen);
}
if (bo->map == NULL && bo->size > 0)
bo->map = gem_mmap(fd, obj->handle, 0, bo->size);
- fail_if(bo->map == MAP_FAILED, "intel_aubdump: bo mmap failed\n");
+ fail_if(bo->map == MAP_FAILED, "bo mmap failed\n");
if (aub_use_execlists(&aub_file))
aub_map_ppgtt(&aub_file, bo->offset, bo->size);
{
struct bo *bo = &bos[handle];
- fail_if(handle >= MAX_BO_COUNT, "intel_aubdump: bo handle out of range\n");
- fail_if(size == 0, "intel_aubdump: bo size is invalid\n");
+ fail_if(handle >= MAX_BO_COUNT, "bo handle out of range\n");
+ fail_if(size == 0, "bo size is invalid\n");
bo->size = size;
bo->map = map;
}
} else if (!strcmp(key, "device")) {
fail_if(sscanf(value, "%i", &device) != 1,
- "intel_aubdump: failed to parse device id '%s'",
+ "failed to parse device id '%s'",
value);
device_override = true;
} else if (!strcmp(key, "file")) {
output_filename = strdup(value);
output_file = fopen(output_filename, "w+");
fail_if(output_file == NULL,
- "intel_aubdump: failed to open file '%s'\n",
+ "failed to open file '%s'\n",
output_filename);
} else {
- fprintf(stderr, "intel_aubdump: unknown option '%s'\n", key);
+ fprintf(stderr, "unknown option '%s'\n", key);
}
free(key);
fclose(config);
bos = calloc(MAX_BO_COUNT, sizeof(bos[0]));
- fail_if(bos == NULL, "intel_aubdump: out of memory\n");
+ fail_if(bos == NULL, "out of memory\n");
}
__attribute__ ((visibility ("default"))) int
(buf.st_mode & S_IFMT) == S_IFCHR && major(buf.st_rdev) == DRM_MAJOR) {
drm_fd = fd;
if (verbose)
- printf("[intel_aubdump: intercept drm ioctl on fd %d]\n", fd);
+ printf("[intercept drm ioctl on fd %d]\n", fd);
}
if (fd == drm_fd) {
case DRM_IOCTL_I915_GEM_EXECBUFFER: {
static bool once;
if (!once) {
- fprintf(stderr, "intel_aubdump: "
+ fprintf(stderr,
"application uses DRM_IOCTL_I915_GEM_EXECBUFFER, not handled\n");
once = true;
}
off_t size;
size = lseek(prime->fd, 0, SEEK_END);
- fail_if(size == -1, "intel_aubdump: failed to get prime bo size\n");
+ fail_if(size == -1, "failed to get prime bo size\n");
add_new_bo(prime->handle, size, NULL);
}
libc_close = dlsym(RTLD_NEXT, "close");
libc_ioctl = dlsym(RTLD_NEXT, "ioctl");
fail_if(libc_close == NULL || libc_ioctl == NULL,
- "intel_aubdump: failed to get libc ioctl or close\n");
+ "failed to get libc ioctl or close\n");
}
static int