Interface IOReport

All Superinterfaces:
com.sun.jna.Library

public interface IOReport extends com.sun.jna.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 Classes

    Nested classes/interfaces inherited from interface com.sun.jna.Library

    com.sun.jna.Library.Handler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final IOReport
     

    Fields inherited from interface com.sun.jna.Library

    OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER
  • Method Summary

    Modifier and Type
    Method
    Description
    com.sun.jna.platform.mac.CoreFoundation.CFStringRef
    IOReportChannelGetChannelName(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel)
    Returns the channel name of a channel entry.
    com.sun.jna.platform.mac.CoreFoundation.CFStringRef
    IOReportChannelGetGroup(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel)
    Returns the group name of a channel entry.
    com.sun.jna.platform.mac.CoreFoundation.CFStringRef
    IOReportChannelGetSubGroup(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel)
    Returns the subgroup name of a channel entry.
    com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef
    IOReportCopyChannelsInGroup(com.sun.jna.platform.mac.CoreFoundation.CFStringRef group, com.sun.jna.platform.mac.CoreFoundation.CFStringRef subgroup, long a, long b, long c)
    Returns a mutable dictionary describing all channels in the given group (and optional subgroup).
    com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef
    IOReportCreateSamples(IOReport.IOReportSubscriptionRef subscription, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef subscribedChannels, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef reserved)
    Takes a sample of all subscribed channels.
    com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef
    IOReportCreateSamplesDelta(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef a, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef b, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef reserved)
    Computes the delta between two samples taken from the same subscription.
    IOReportCreateSubscription(com.sun.jna.Pointer a, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channels, com.sun.jna.ptr.PointerByReference subscribedChannels, long b, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef c)
    Creates a subscription for the channels described by channels.
    void
    IOReportMergeChannels(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef a, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef b, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef null3)
    Merges the channel descriptors from b into a in place.
    long
    IOReportSimpleGetIntegerValue(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel, int reserved)
    Extracts the integer value from a single channel entry in a sample or delta dictionary.
    int
    IOReportStateGetCount(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel)
    Returns the number of states in a channel entry.
    com.sun.jna.platform.mac.CoreFoundation.CFStringRef
    IOReportStateGetNameForIndex(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel, int index)
    Returns the name of the state at the given index.
    long
    IOReportStateGetResidency(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel, int index)
    Returns the residency tick count for the state at the given index.
  • Field Details

    • INSTANCE

      static final IOReport INSTANCE
  • Method Details

    • IOReportCopyChannelsInGroup

      com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef IOReportCopyChannelsInGroup(com.sun.jna.platform.mac.CoreFoundation.CFStringRef group, com.sun.jna.platform.mac.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, or null for all subgroups
      a - reserved, pass 0
      b - reserved, pass 0
      c - reserved, pass 0
      Returns:
      a CFDictionaryRef channel descriptor (caller must release), or null on failure
    • IOReportMergeChannels

      void IOReportMergeChannels(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef a, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef b, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef null3)
      Merges the channel descriptors from b into a in place.
      Parameters:
      a - destination channel descriptor (mutable)
      b - source channel descriptor
      null3 - reserved, pass null
    • IOReportCreateSubscription

      IOReport.IOReportSubscriptionRef IOReportCreateSubscription(com.sun.jna.Pointer a, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channels, com.sun.jna.ptr.PointerByReference subscribedChannels, long b, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef c)
      Creates a subscription for the channels described by channels. The framework writes the actually subscribed channel descriptor into subscribedChannels; callers must use that value (not the original channels) when calling IOReportCreateSamples(IOReport.IOReportSubscriptionRef, CoreFoundation.CFDictionaryRef, CoreFoundation.CFTypeRef).
      Parameters:
      a - reserved, pass null
      channels - channel descriptor from IOReportCopyChannelsInGroup(CoreFoundation.CFStringRef, CoreFoundation.CFStringRef, long, long, long)
      subscribedChannels - receives the subscribed channel descriptor (caller must release)
      b - reserved, pass 0
      c - reserved, pass null
      Returns:
      subscription handle (caller must release), or null on failure
    • IOReportCreateSamples

      com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef IOReportCreateSamples(IOReport.IOReportSubscriptionRef subscription, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef subscribedChannels, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef reserved)
      Takes a sample of all subscribed channels.
      Parameters:
      subscription - the subscription handle
      subscribedChannels - the subscribed channel descriptor from IOReportCreateSubscription(Pointer, CoreFoundation.CFDictionaryRef, PointerByReference, long, CoreFoundation.CFTypeRef)
      reserved - reserved, pass null
      Returns:
      a CFDictionaryRef sample (caller must release), or null on failure
    • IOReportCreateSamplesDelta

      com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef IOReportCreateSamplesDelta(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef a, com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef b, com.sun.jna.platform.mac.CoreFoundation.CFTypeRef reserved)
      Computes the delta between two samples taken from the same subscription.
      Parameters:
      a - earlier sample
      b - later sample
      reserved - reserved, pass null
      Returns:
      a CFDictionaryRef delta (caller must release), or null on failure
    • IOReportSimpleGetIntegerValue

      long IOReportSimpleGetIntegerValue(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel, int reserved)
      Extracts the integer value from a single channel entry in a sample or delta dictionary.
      Parameters:
      channel - a channel entry dictionary
      reserved - reserved, pass 0
      Returns:
      the channel's integer value
    • IOReportChannelGetGroup

      com.sun.jna.platform.mac.CoreFoundation.CFStringRef IOReportChannelGetGroup(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel)
      Returns the group name of a channel entry.
      Parameters:
      channel - a channel entry dictionary
      Returns:
      the group name as a CFStringRef
    • IOReportChannelGetSubGroup

      com.sun.jna.platform.mac.CoreFoundation.CFStringRef IOReportChannelGetSubGroup(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel)
      Returns the subgroup name of a channel entry.
      Parameters:
      channel - a channel entry dictionary
      Returns:
      the subgroup name as a CFStringRef
    • IOReportChannelGetChannelName

      com.sun.jna.platform.mac.CoreFoundation.CFStringRef IOReportChannelGetChannelName(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel)
      Returns the channel name of a channel entry.
      Parameters:
      channel - a channel entry dictionary
      Returns:
      the channel name as a CFStringRef
    • IOReportStateGetCount

      int IOReportStateGetCount(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel)
      Returns the number of states in a channel entry.
      Parameters:
      channel - a channel entry dictionary
      Returns:
      the number of states
    • IOReportStateGetNameForIndex

      com.sun.jna.platform.mac.CoreFoundation.CFStringRef IOReportStateGetNameForIndex(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel, int index)
      Returns the name of the state at the given index.
      Parameters:
      channel - a channel entry dictionary
      index - zero-based state index
      Returns:
      the state name as a CFStringRef
    • IOReportStateGetResidency

      long IOReportStateGetResidency(com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef channel, int index)
      Returns the residency tick count for the state at the given index.
      Parameters:
      channel - a channel entry dictionary
      index - zero-based state index
      Returns:
      residency ticks