Class IOReportFunctions
java.lang.Object
oshi.ffm.ForeignFunctions
oshi.ffm.mac.MacForeignFunctions
oshi.ffm.mac.IOReportFunctions
Bindings for the private IOReport framework (Apple Silicon GPU residency and energy counters).
IOReport is a private Apple framework. It may not be present on all systems. isAvailable() must be checked
before calling any method; calling wrapper methods when isAvailable() returns false will result in a
NullPointerException since the underlying handles are not initialized.
-
Field Summary
Fields inherited from class MacForeignFunctions
FRAMEWORK_SEARCH_PATHSFields inherited from class ForeignFunctions
CAPTURE_CALL_STATE, CAPTURED_STATE_LAYOUT, ERRNO_HANDLE, LIBRARY_ARENA, LINKER, NATIVE_LONG_SIZE, NATIVE_POINTER_SIZE, NATIVE_SIZE_T_SIZE, SYMBOL_LOOKUP -
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentstatic MemorySegmentIOReportChannelGetGroup(MemorySegment channel) static MemorySegmentIOReportChannelGetSubGroup(MemorySegment channel) static MemorySegmentIOReportCopyChannelsInGroup(MemorySegment group, MemorySegment subgroup, long a, long b, long c) static MemorySegmentIOReportCreateSamples(MemorySegment subscription, MemorySegment subscribedChannels, MemorySegment reserved) static MemorySegmentIOReportCreateSamplesDelta(MemorySegment a, MemorySegment b, MemorySegment reserved) static MemorySegmentIOReportCreateSubscription(MemorySegment a, MemorySegment channels, MemorySegment subscribedChannelsOut, long b, MemorySegment c) static voidIOReportMergeChannels(MemorySegment a, MemorySegment b, MemorySegment null3) static longIOReportSimpleGetIntegerValue(MemorySegment channel, int reserved) static intIOReportStateGetCount(MemorySegment channel) static MemorySegmentIOReportStateGetNameForIndex(MemorySegment channel, int index) static longIOReportStateGetResidency(MemorySegment channel, int index) static booleanReturnstrueif the IOReport library was successfully loaded and all symbols resolved.Methods inherited from class MacForeignFunctions
frameworkLookupMethods inherited from class ForeignFunctions
downcall, getByteArrayFromNativePointer, getErrno, getStringFromNativePointer, getStructFromNativePointer, lib, libraryLookup
-
Method Details
-
isAvailable
public static boolean isAvailable()Returnstrueif the IOReport library was successfully loaded and all symbols resolved.- Returns:
- whether IOReport is available on this system
-
IOReportCopyChannelsInGroup
public static MemorySegment IOReportCopyChannelsInGroup(MemorySegment group, MemorySegment subgroup, long a, long b, long c) throws Throwable - Throws:
Throwable
-
IOReportMergeChannels
public static void IOReportMergeChannels(MemorySegment a, MemorySegment b, MemorySegment null3) throws Throwable - Throws:
Throwable
-
IOReportCreateSubscription
public static MemorySegment IOReportCreateSubscription(MemorySegment a, MemorySegment channels, MemorySegment subscribedChannelsOut, long b, MemorySegment c) throws Throwable - Throws:
Throwable
-
IOReportCreateSamples
public static MemorySegment IOReportCreateSamples(MemorySegment subscription, MemorySegment subscribedChannels, MemorySegment reserved) throws Throwable - Throws:
Throwable
-
IOReportCreateSamplesDelta
public static MemorySegment IOReportCreateSamplesDelta(MemorySegment a, MemorySegment b, MemorySegment reserved) throws Throwable - Throws:
Throwable
-
IOReportSimpleGetIntegerValue
public static long IOReportSimpleGetIntegerValue(MemorySegment channel, int reserved) throws Throwable - Throws:
Throwable
-
IOReportChannelGetGroup
- Throws:
Throwable
-
IOReportChannelGetSubGroup
- Throws:
Throwable
-
IOReportChannelGetChannelName
- Throws:
Throwable
-
IOReportStateGetCount
- Throws:
Throwable
-
IOReportStateGetNameForIndex
public static MemorySegment IOReportStateGetNameForIndex(MemorySegment channel, int index) throws Throwable - Throws:
Throwable
-
IOReportStateGetResidency
- Throws:
Throwable
-