Interface IOReport
- All Superinterfaces:
Library
IOReport is a private Apple framework that provides access to hardware performance counters, including GPU residency
and energy metrics on Apple Silicon.
These are non-public APIs. Mappings are provided for OSHI internal use only and should not be considered stable.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classNested classes/interfaces inherited from interface Library
Library.Handler -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the channel name of a channel entry.Returns the group name of a channel entry.Returns the subgroup name of a channel entry.IOReportCopyChannelsInGroup(CoreFoundation.CFStringRef group, CoreFoundation.CFStringRef subgroup, long a, long b, long c) Returns a mutable dictionary describing all channels in the given group (and optional subgroup).IOReportCreateSamples(IOReport.IOReportSubscriptionRef subscription, CoreFoundation.CFDictionaryRef subscribedChannels, CoreFoundation.CFTypeRef reserved) Takes a sample of all subscribed channels.IOReportCreateSamplesDelta(CoreFoundation.CFDictionaryRef a, CoreFoundation.CFDictionaryRef b, CoreFoundation.CFTypeRef reserved) Computes the delta between two samples taken from the same subscription.IOReportCreateSubscription(Pointer a, CoreFoundation.CFDictionaryRef channels, PointerByReference subscribedChannels, long b, CoreFoundation.CFTypeRef c) Creates a subscription for the channels described bychannels.voidIOReportMergeChannels(CoreFoundation.CFDictionaryRef a, CoreFoundation.CFDictionaryRef b, CoreFoundation.CFTypeRef null3) Merges the channel descriptors frombintoain place.longIOReportSimpleGetIntegerValue(CoreFoundation.CFDictionaryRef channel, int reserved) Extracts the integer value from a single channel entry in a sample or delta dictionary.intReturns the number of states in a channel entry.IOReportStateGetNameForIndex(CoreFoundation.CFDictionaryRef channel, int index) Returns the name of the state at the given index.longIOReportStateGetResidency(CoreFoundation.CFDictionaryRef channel, int index) Returns the residency tick count for the state at the given index.
-
Field Details
-
INSTANCE
-
-
Method Details
-
IOReportCopyChannelsInGroup
CoreFoundation.CFDictionaryRef IOReportCopyChannelsInGroup(CoreFoundation.CFStringRef group, CoreFoundation.CFStringRef subgroup, long a, long b, long c) Returns a mutable dictionary describing all channels in the given group (and optional subgroup).- Parameters:
group- channel group name (e.g."GPU Stats")subgroup- subgroup name, ornullfor all subgroupsa- reserved, pass 0b- reserved, pass 0c- reserved, pass 0- Returns:
- a CFDictionaryRef channel descriptor (caller must release), or
nullon failure
-
IOReportMergeChannels
void IOReportMergeChannels(CoreFoundation.CFDictionaryRef a, CoreFoundation.CFDictionaryRef b, CoreFoundation.CFTypeRef null3) Merges the channel descriptors frombintoain place.- Parameters:
a- destination channel descriptor (mutable)b- source channel descriptornull3- reserved, passnull
-
IOReportCreateSubscription
IOReport.IOReportSubscriptionRef IOReportCreateSubscription(Pointer a, CoreFoundation.CFDictionaryRef channels, PointerByReference subscribedChannels, long b, CoreFoundation.CFTypeRef c) Creates a subscription for the channels described bychannels. The framework writes the actually subscribed channel descriptor intosubscribedChannels; callers must use that value (not the originalchannels) when callingIOReportCreateSamples(IOReport.IOReportSubscriptionRef, CoreFoundation.CFDictionaryRef, CoreFoundation.CFTypeRef).- Parameters:
a- reserved, passnullchannels- channel descriptor fromIOReportCopyChannelsInGroup(CoreFoundation.CFStringRef, CoreFoundation.CFStringRef, long, long, long)subscribedChannels- receives the subscribed channel descriptor (caller must release)b- reserved, pass 0c- reserved, passnull- Returns:
- subscription handle (caller must release), or
nullon failure
-
IOReportCreateSamples
CoreFoundation.CFDictionaryRef IOReportCreateSamples(IOReport.IOReportSubscriptionRef subscription, CoreFoundation.CFDictionaryRef subscribedChannels, CoreFoundation.CFTypeRef reserved) Takes a sample of all subscribed channels.- Parameters:
subscription- the subscription handlesubscribedChannels- the subscribed channel descriptor fromIOReportCreateSubscription(Pointer, CoreFoundation.CFDictionaryRef, PointerByReference, long, CoreFoundation.CFTypeRef)reserved- reserved, passnull- Returns:
- a CFDictionaryRef sample (caller must release), or
nullon failure
-
IOReportCreateSamplesDelta
CoreFoundation.CFDictionaryRef IOReportCreateSamplesDelta(CoreFoundation.CFDictionaryRef a, CoreFoundation.CFDictionaryRef b, CoreFoundation.CFTypeRef reserved) Computes the delta between two samples taken from the same subscription.- Parameters:
a- earlier sampleb- later samplereserved- reserved, passnull- Returns:
- a CFDictionaryRef delta (caller must release), or
nullon failure
-
IOReportSimpleGetIntegerValue
Extracts the integer value from a single channel entry in a sample or delta dictionary.- Parameters:
channel- a channel entry dictionaryreserved- reserved, pass 0- Returns:
- the channel's integer value
-
IOReportChannelGetGroup
Returns the group name of a channel entry.- Parameters:
channel- a channel entry dictionary- Returns:
- the group name as a CFStringRef
-
IOReportChannelGetSubGroup
Returns the subgroup name of a channel entry.- Parameters:
channel- a channel entry dictionary- Returns:
- the subgroup name as a CFStringRef
-
IOReportChannelGetChannelName
Returns the channel name of a channel entry.- Parameters:
channel- a channel entry dictionary- Returns:
- the channel name as a CFStringRef
-
IOReportStateGetCount
Returns the number of states in a channel entry.- Parameters:
channel- a channel entry dictionary- Returns:
- the number of states
-
IOReportStateGetNameForIndex
CoreFoundation.CFStringRef IOReportStateGetNameForIndex(CoreFoundation.CFDictionaryRef channel, int index) Returns the name of the state at the given index.- Parameters:
channel- a channel entry dictionaryindex- zero-based state index- Returns:
- the state name as a CFStringRef
-
IOReportStateGetResidency
Returns the residency tick count for the state at the given index.- Parameters:
channel- a channel entry dictionaryindex- zero-based state index- Returns:
- residency ticks
-