title: Using perf to monitor raw event counters
body: <p>I am trying to measure certain hardware events on a (Intel Xeon) machine with multiple (physical) processors. Specifically, I wish to know how many requests are issued for reading 'offcore' data.</p>
  
  <p>I found <a href="http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/amplifierxe/win/ug_docs/reference/pmw_dp/events/offcore_requests.html" rel="noreferrer">the OFFCORE_REQUESTS</a> hardware event in Intels documentation and it gives the event descriptor 0xB0 and for data demands, the additional mask 0x01.</p>
  
  <p>Would it then be correct to tell perf to record the event 0xB1 (i.e. <code>0xB0 | 0x01</code>) and to call it as:</p>
  
  <pre><code>perf record -e r0B1 ./mytestapp someargs
  </code></pre>
  
  <p>Or is this incorrect?
  Because <code>perf report</code> shows no output for events entered like this.</p>
  
  <p>The perf documentation is rather sparse in this area, apart from a <a href="https://perf.wiki.kernel.org/index.php/Tutorial#Options_controlling_event_selection" rel="noreferrer">tutorial entry</a> which does not say which event it was (though this one works for me), or how it was encoded...</p>
  
  <p>Any help is greatly appreciated.</p>