I would like to add hardware counters (to let cache misses or branch mispredictions appear in WPA) to a custom wpr profile. The only related information I could find by now are the suggestions made by VS after adding the windows performance recorder profile scheme. Hardware counter seems to be configurable but I could not find a way yet to configure it correctly.
Here is what I've tried so far
<?xml version="1.0" encoding="utf-8" standalone='yes'?><WindowsPerformanceRecorder Version="1.0" Author="Lars Kleen" Team="Motor" Company="Steinberg Media Technologies GmbH" Copyright="Steinberg Media Technologies GmbH" Tag="Media;Audio"><Profiles><SystemCollector Id="TestCollector" Name="NT Kernel Logger"><BufferSize Value="1024"/><Buffers Value="256"/><StackCaching CacheSize="1024" BucketCount="64"/></SystemCollector><HardwareCounter Id="TestCounter"><Counters><!-- try with output of 'tracelog -profilesource help--><Counter Value="10"/><Counter Value="CacheMisses"/><!-- try stuff from performace monitor suggestions when creating data collector sets --><Counter Value="\Processor\(*)\*"/></Counters></HardwareCounter><Profile Id="SteinbergProfile.Verbose.Memory" LoggingMode="Memory" Name="SteinbergProfile" DetailLevel="Verbose" Description="TEST"><ProblemCategories><ProblemCategory Value="MMCSS"/></ProblemCategories><Collectors><SystemCollectorId Value="TestCollector"><SystemProvider Id="system-provider"><Stacks><Stack Value="CSwitch"/></Stacks></SystemProvider> <HardwareCounterId Value="TestCounter"><SampledCounters Operation="Add"><SampledCounter Value="\Processor\(*)\*" Interval="1221"/> <!-- interval valid --><SampledCounter Value="CacheMisses"/> <!-- interval not valid --><!--<SampledCounter Value="10" Interval="1221"/>--><!--<SampledCounter Interval="2000" Value="CacheMisses"/>--></SampledCounters></HardwareCounterId></SystemCollectorId></Collectors></Profile></Profiles><TraceMergeProperties><TraceMergeProperty Id="TraceMerge_Default" Name="TraceMerge_Default" Base=""><DeletePreMergedTraceFiles Value="true"/><CustomEvents><CustomEvent Value="ImageId"/><CustomEvent Value="BuildInfo"/><CustomEvent Value="VolumeMapping"/><CustomEvent Value="EventMetadata"/><CustomEvent Value="PerfTrackMetadata"/><CustomEvent Value="WinSAT"/><CustomEvent Value="NetworkInterface"/></CustomEvents></TraceMergeProperty></TraceMergeProperties></WindowsPerformanceRecorder>How is it configured correctly?