mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-20 14:26:17 +00:00
intel_gpu_top: access hardware before running profiling command
Without this patch, intel_gpu_top will try to get access to the hardware after running the profiling command in the background. In case such access fails, the main process quits, but the background one will continue running. So let's move this test up, so it is done before we fork. Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
This commit is contained in:
parent
8ad08546e5
commit
15cb282187
@ -486,6 +486,11 @@ int main(int argc, char **argv)
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
|
pci_dev = intel_get_pci_device();
|
||||||
|
devid = pci_dev->device_id;
|
||||||
|
intel_get_mmio(pci_dev);
|
||||||
|
init_instdone_definitions(devid);
|
||||||
|
|
||||||
/* Do we have a command to run? */
|
/* Do we have a command to run? */
|
||||||
if (cmd != NULL) {
|
if (cmd != NULL) {
|
||||||
if (output != stdout) {
|
if (output != stdout) {
|
||||||
@ -514,11 +519,6 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pci_dev = intel_get_pci_device();
|
|
||||||
devid = pci_dev->device_id;
|
|
||||||
intel_get_mmio(pci_dev);
|
|
||||||
init_instdone_definitions(devid);
|
|
||||||
|
|
||||||
for (i = 0; i < num_instdone_bits; i++) {
|
for (i = 0; i < num_instdone_bits; i++) {
|
||||||
top_bits[i].bit = &instdone_bits[i];
|
top_bits[i].bit = &instdone_bits[i];
|
||||||
top_bits[i].count = 0;
|
top_bits[i].count = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user