pull/3184/head
Gabriele Gristina 2 years ago
parent 7eb66e9936
commit fb12de4be6

@ -6746,10 +6746,7 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
#if defined (__APPLE__)
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
{
if (device_param->skipped == false)
{
need_iokit = true;
}
need_iokit = true;
}
#endif
@ -6778,16 +6775,15 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
#endif
}
#if defined (__APPLE__)
if (strncmp (device_param->device_name, "Apple M", 7) == 0)
{
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
{
if (device_param->skipped == false)
{
need_iokit = true;
}
need_iokit = true;
}
}
#endif
}
if (device_param->opencl_device_type & CL_DEVICE_TYPE_CPU)

@ -249,30 +249,37 @@ int hm_IOKIT_get_utilization_current (void *hashcat_ctx, int *utilization)
{
// Service dictionary creation failed.
IOObjectRelease (regEntry);
continue;
}
CFMutableDictionaryRef perf_properties = (CFMutableDictionaryRef) CFDictionaryGetValue( serviceDictionary, CFSTR("PerformanceStatistics"));
CFMutableDictionaryRef perf_properties = (CFMutableDictionaryRef) CFDictionaryGetValue (serviceDictionary, CFSTR ("PerformanceStatistics"));
if (perf_properties)
{
static ssize_t gpuCoreUtil=0;
const void* gpuCoreUtilization = CFDictionaryGetValue(perf_properties, CFSTR("Device Utilization %"));
if (gpuCoreUtilization)
static ssize_t gpuCoreUtil = 0;
const void *gpuCoreUtilization = CFDictionaryGetValue (perf_properties, CFSTR ("Device Utilization %"));
if (gpuCoreUtilization != NULL)
{
CFNumberGetValue( gpuCoreUtilization, kCFNumberSInt64Type, &gpuCoreUtil);
CFNumberGetValue (gpuCoreUtilization, kCFNumberSInt64Type, &gpuCoreUtil);
*utilization = gpuCoreUtil;
rc = true;
}
}
CFRelease(serviceDictionary);
CFRelease (serviceDictionary);
IOObjectRelease (regEntry);
IOObjectRelease(iterator);
if (rc == true) break;
}
IOObjectRelease (iterator);
return rc;
}

Loading…
Cancel
Save