<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <interface name="org.gnome.Sysprof3.Service">
    <!--
      PerfEventOpen:
      @options: key-value pair of attributes for the perf_event_open() syscall.
      @pid: the process id to monitor, or -1 for system-wide.
      @cpu: affinity to cpu.
      @group: a FD handle for an existing group
      @flags: flags for perf_event_open() syscall.
      @perf_stream_fd: (out): A fd to communicate with perf.

      Performs the perf_event_open() syscall with elevated privileges and passes
      the resulting fd back to the calling process.
    -->
    <method name="PerfEventOpen">
      <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
      <arg name="options" type="a{sv}" direction="in"/>
      <arg name="pid" type="i" direction="in"/>
      <arg name="cpu" type="i" direction="in"/>
      <arg name="group_fd" type="h" direction="in"/>
      <arg name="flags" type="t" direction="in"/>
      <arg name="perf_stream_fd" type="h" direction="out"/>
    </method>

    <!--
      GetProcFile:
      @path: the path including "/proc/" prefix.

      Gets a file from /proc/ or /sys/.

      The file must be a C-string (no embedded NUL bytes) but need not be UTF-8.

      Returns: an array of bytes.

      Since: 3.34
    -->
    <method name="GetProcFile">
      <arg name="path" type="ay" direction="in"/>
      <arg name="contents" type="ay" direction="out"/>
    </method>

    <!--
      GetProcFd:
      @path: the path within /proc or /sys

      Like GetProcFile, but returns a FD for the file.

      This is useful for situations where you need to seek() back to 0 to
      optimize the parsing of the file contents.

      Returns: a file-descriptor

      Since: 3.34
    -->
    <method name="GetProcFd">
      <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
      <arg name="path" type="ay" direction="in"/>
      <arg name="fd" type="h" direction="out"/>
    </method>

    <!--
      ListProcesses:

      List the processes on the system.

      Returns: an array of 32-bit integers

      Since: 3.34
    -->
    <method name="ListProcesses">
      <arg name="processes" type="ai" direction="out"/>
    </method>

    <!--
      GetProcessInfo:
      @attributes: a comma separated string of attributes to load

      Gets information about the processes on the system.

      Attributes can be a comma separated list of the following:

      - pid: (int32): the process identifier, always included
      - cmdline: (string): Provides the command line
      - comm: (string): Provide the comm, useful when cmdline is empty
      - maps: (string): Provide the contents of /proc/pid/maps
      - statm: (string): Provide the contents of /proc/pid/statm
      - mountinfo: (string): Provide the contents of/proc/pid/mountinfo

      Returns: an array of vardict containing the requested attributs
    -->
    <method name="GetProcessInfo">
      <arg name="attributes" type="s" direction="in"/>
      <arg name="processes" type="aa{sv}" direction="out"/>
    </method>

    <!--
      SetGovernor:
      @governor: the new governor to use (such as "performance").
      @old_governor: the governor that was in use before setting

      Sets the CPU governor to be used on the system.
    -->
    <method name="SetGovernor">
      <arg name="governor" type="s" direction="in"/>
      <arg name="old_governor" type="s" direction="out"/>
    </method>

    <!--
      SetParanoid:
      @governor: the new perf paranoid setting
      @old_governor: the old perf paranoid setting

      Sets the perf_event_paranoid setting for the system.
    -->
    <method name="SetParanoid">
      <arg name="paranoid" type="i" direction="in"/>
      <arg name="old_paranoid" type="i" direction="out"/>
    </method>
  </interface>
</node>
