<?xml version="1.0" encoding="UTF-8"?>
<bag xmlns:boolean="http://www.w3.org/2001/XMLSchema#boolean" xmlns:double="http://www.intel.com/2001/XMLSchema#double" xmlns:exsl="http://exslt.org/common" xmlns:int="http://www.w3.org/2001/XMLSchema#int" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <internal>
  <name>%AdvancedHotspotsAtypeName</name>
  <shortName>%AdvancedHotspotsAtypeShortName</shortName>
  <description>%AdvancedHotspotsAtypeDescription</description>
  <abbreviation>ah</abbreviation>
  <alias>advanced-hotspots</alias>
  <int:schemaVersion>1</int:schemaVersion>
  <int:contentVersion>1</int:contentVersion>
  <property name="helpId">configs.analysis_type-adv_hotspots_f1176</property>
 </internal>
 <prerequisites xsl:version="1.0" exsl:keep_exsl_namespace="" syntax="norules">
  <xsl:copy-of select="document('config://analysis_type/include/prerequisites.xsl')/pmu_prerequisites/*"/>
 </prerequisites>
 <knobs xsl:version="1.0" exsl:keep_exsl_namespace="" syntax="norules">
  <doubleKnob id="samplingInterval" displayName="%SamplingInterval" cliName="sampling-interval" boolean:visible="true">
   <description>%SamplingIntervalDescription</description>
   <double:min>0.01</double:min>
   <double:max>1000</double:max>
   <double:defaultValue>1</double:defaultValue>
  </doubleKnob>
  <groupKnob id="groupForCustomControl">
   <xsl:if test="(exsl:ctx('connectionType') = 'mic' or exsl:ctx('connectionType') = 'mic-offload')">
    <xsl:attribute name="boolean:visible">false</xsl:attribute>
   </xsl:if>
   <knobProperty name="knob_control_id">RadioButtonGroup</knobProperty>
   <knobs>
    <enumKnob id="collectionDetailLevel" displayName="%CollectionDetailLevel" cliName="collection-detail" boolean:visible="true">
     <description>%CollectionDetailLevelDescription</description>
     <values>
      <value displayName="%LightweightSampling" cliName="hotspots-sampling">hotspots-sampling</value>
      <value displayName="%StackSampling" cliName="stack-sampling">stack-sampling</value>
      <value displayName="%StackSamplingWithCallCount" cliName="stack-and-callcount">stack-and-callcount</value>
      <value displayName="%StackSamplingWithCallAndTripCount" cliName="stack-call-and-tripcount">stack-call-and-tripcount</value>
      <defaultValue>hotspots-sampling</defaultValue>
     </values>
    </enumKnob>
   </knobs>
  </groupKnob>
  <enumKnob id="eventCollectionMode" displayName="%EventMode" boolean:visible="true" cliName="event-mode">
   <description>%EventModeDescription</description>
   <values>
    <value displayName="%EventModeAll">all</value>
    <value displayName="%EventModeUser">user</value>
    <value displayName="%EventModeOs">os</value>
    <defaultValue>all</defaultValue>
   </values>
  </enumKnob>
  <booleanKnob id="userTasksCollection" displayName="%UserTasksCollection" boolean:visible="true" cliName="enable-user-tasks">
   <description>%UserTasksCollectionDescription</description>
   <boolean:defaultValue>false</boolean:defaultValue>
  </booleanKnob>
  <booleanKnob id="gpuDXCollectionDeprecated" displayName="%GpuDXCollection" boolean:visible="false" cliName="gpu-dx-mode">
   <description>%GpuDXCollectionDescription</description>
   <boolean:defaultValue>false</boolean:defaultValue>
  </booleanKnob>
  <booleanKnob id="analyzeFPU" displayName="%analyzeFPU" boolean:visible="false" cliName="analyze-fpu">
   <xsl:if test="exsl:is_experimental('fpu-analysis')">
    <xsl:attribute name="boolean:visible">true</xsl:attribute>
   </xsl:if>
   <description>%anlyzeFPUDescription</description>
   <boolean:defaultValue>false</boolean:defaultValue>
  </booleanKnob>
  <booleanKnob id="gpuUsageCollection" cliName="enable-gpu-usage">
   <xsl:choose>
    <xsl:when test="exsl:ctx('targetOS')='Windows'">
     <xsl:attribute name="displayName">%GpuDXCollection</xsl:attribute>
     <xsl:attribute name="boolean:visible">true</xsl:attribute>
     <description>%GpuDXCollectionDescription</description>
    </xsl:when>
    <xsl:otherwise>
     <xsl:attribute name="displayName">%IGFXFtraceEventsCollection</xsl:attribute>
     <xsl:attribute name="boolean:visible">false</xsl:attribute>
     <xsl:if test="exsl:ctx('targetOS')='Android' or exsl:ctx('targetOS')='Linux'">
      <xsl:attribute name="boolean:visible">true</xsl:attribute>
     </xsl:if>
     <description>%IGFXFtraceEventsCollectionDescription</description>
    </xsl:otherwise>
   </xsl:choose>
   <boolean:defaultValue>false</boolean:defaultValue>
  </booleanKnob>
  <enumKnob id="gpuCountersCollection" displayName="%GpuCountersCollection" boolean:visible="false" cliName="gpu-counters-mode">
   <xsl:if test="exsl:ctx('targetOS')='Windows' or exsl:ctx('targetOS')='Android' or (exsl:ctx('targetOS')='Linux' and exsl:is_experimental('gpu-metrics2'))">
    <xsl:attribute name="boolean:visible">true</xsl:attribute>
   </xsl:if>
   <description>%GpuCountersCollectionDescription</description>
   <values>
    <value displayName="%None">none</value>
    <value displayName="%GpuOverview">overview</value>
    <value displayName="%GpuComputeBasic">global-local-accesses</value>
    <xsl:if test="exsl:ctx('PlatformIndex', 0)=6">
     <value displayName="%GpuComputeExtended">compute-extended</value>
    </xsl:if>
    <xsl:if test="exsl:is_experimental('gpu-metrics2')">
     <value displayName="%GpuPreset3">preset3</value>
     <value displayName="%GpuPreset4">preset4</value>
     <value displayName="%GpuPreset5">preset5</value>
    </xsl:if>
    <defaultValue>none</defaultValue>
   </values>
  </enumKnob>
  <intKnob id="gpuSamplingInterval" displayName="%GpuSamplingInterval" boolean:visible="false" cliName="gpu-sampling-interval">
   <description>%GpuSamplingIntervalDescription</description>
   <int:min>10</int:min>
   <int:max>10000</int:max>
   <int:defaultValue>1000</int:defaultValue>
  </intKnob>
  <booleanKnob id="gpuOpenCLCollection" displayName="%GpuOpenCLCollection" cliName="enable-gpu-runtimes">
   <xsl:attribute name="boolean:visible">
    <xsl:value-of select="exsl:ctx('OS')='Windows' or exsl:ctx('OS')='Linux'"/>
   </xsl:attribute>
   <description>%GpuOpenCLCollectionDescription</description>
   <boolean:defaultValue>false</boolean:defaultValue>
  </booleanKnob>
  <stringKnob id="initialViewpoint" displayName="%InitialViewpoint" boolean:visible="false">
   <defaultValue>%LightweightHotspotsViewpointName</defaultValue>
  </stringKnob>
 </knobs>
 <analysis xsl:version="1.0" exsl:keep_exsl_namespace="" syntax="norules">
  <collector id="runsa">
   <collectorKnob knob="collectUserTasksMode">
    <xsl:copy-of select="exsl:ctx('userTasksCollection')"/>
   </collectorKnob>
   <collectorKnob knob="gpuCounters">
    <xsl:copy-of select="exsl:ctx('gpuCountersCollection')"/>
   </collectorKnob>
   <collectorKnob knob="gpuSamplingInterval">
    <xsl:copy-of select="exsl:ctx('gpuSamplingInterval')"/>
   </collectorKnob>
   <xsl:choose>
    <xsl:when test="exsl:ctx('gpuUsageCollection') or exsl:ctx('gpuDXCollectionDeprecated')">
     <boolean:collectorKnob knob="gpuUsage">true</boolean:collectorKnob>
    </xsl:when>
    <xsl:otherwise>
     <boolean:collectorKnob knob="gpuUsage">false</boolean:collectorKnob>
    </xsl:otherwise>
   </xsl:choose>
   <collectorKnob knob="collectGpuOpenCl">
    <xsl:copy-of select="exsl:ctx('gpuOpenCLCollection')"/>
   </collectorKnob>
   <collectorKnob knob="eventMode">
    <xsl:copy-of select="exsl:ctx('eventCollectionMode')"/>
   </collectorKnob>
   <xsl:if test="exsl:ctx('collectionDetailLevel')='hotspots-sampling'">
    <boolean:collectorKnob knob="enableVTSSCollection">false</boolean:collectorKnob>
    <boolean:collectorKnob knob="collectCallCounts">false</boolean:collectorKnob>
    <boolean:collectorKnob knob="enableCSwitch">false</boolean:collectorKnob>
   </xsl:if>
   <xsl:if test="exsl:ctx('collectionDetailLevel')='stack-sampling'">
    <boolean:collectorKnob knob="enableVTSSCollection">true</boolean:collectorKnob>
    <boolean:collectorKnob knob="collectCallCounts">false</boolean:collectorKnob>
    <boolean:collectorKnob knob="enableCSwitch">true</boolean:collectorKnob>
   </xsl:if>
   <xsl:if test="exsl:ctx('collectionDetailLevel')='stack-and-callcount'">
    <boolean:collectorKnob knob="enableVTSSCollection">true</boolean:collectorKnob>
    <boolean:collectorKnob knob="collectCallCounts">true</boolean:collectorKnob>
    <boolean:collectorKnob knob="enableCSwitch">true</boolean:collectorKnob>
   </xsl:if>
   <xsl:if test="exsl:ctx('collectionDetailLevel')='stack-call-and-tripcount'">
    <boolean:collectorKnob knob="enableVTSSCollection">true</boolean:collectorKnob>
    <boolean:collectorKnob knob="collectCallCounts">true</boolean:collectorKnob>
    <boolean:collectorKnob knob="collectTripCounts">true</boolean:collectorKnob>
    <boolean:collectorKnob knob="enableCSwitch">true</boolean:collectorKnob>
   </xsl:if>
   <boolean:collectorKnob knob="cpuGpuUsageData">true</boolean:collectorKnob>
   <boolean:collectorKnob knob="spinOverheadTimeExpandedData">true</boolean:collectorKnob>
   <collectorKnob knob="advancedLoopAnalysis">
    <xsl:copy-of select="exsl:ctx('analyzeFPU')"/>
   </collectorKnob>
   <collectorKnob knob="analyzeFPU">
    <xsl:copy-of select="exsl:ctx('analyzeFPU')"/>
   </collectorKnob>
   <xsl:variable name="events" select="document('config://analysis_type/include/common_events.xsl')"/>
   <collectorKnob knob="pmuEventConfig">
    <xsl:value-of select="$events//events/cpi"/>
   </collectorKnob>
  </collector>
 </analysis>
</bag>
