<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How would you do this in the in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123232#M6215</link>
    <description>&lt;P&gt;How would you do this in the Windows OS?&lt;/P&gt;</description>
    <pubDate>Mon, 13 Mar 2017 18:55:09 GMT</pubDate>
    <dc:creator>Adrian_C_</dc:creator>
    <dc:date>2017-03-13T18:55:09Z</dc:date>
    <item>
      <title>how to use rdmsr from my C program?</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123231#M6214</link>
      <description>&lt;P&gt;From intel software developer manual 3b, I came to know MSR (10H) equal to RDTSC. So I wanted to verify it using piece of code as follows in my program:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
	&lt;P&gt;asm volatile("rdmsr":"=a"(lo),"=d"(hi):"c"(0x10));&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;But when I run my program it showed segmentation fault. Then a realized the caution that it work only in privilege level 0. So I run the program again with sudo access. This time the program ran without seg fault but the statement after asm volatile(..) are not getting executed. Even it dint work out.&lt;/P&gt;

&lt;P&gt;What shall I do to make rdmsr work in my program?&lt;BR /&gt;
	(I am using linux on i7 core which supports these counters. I verified it.)&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 10:41:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123231#M6214</guid>
      <dc:creator>anthony_b_</dc:creator>
      <dc:date>2016-05-11T10:41:49Z</dc:date>
    </item>
    <item>
      <title>How would you do this in the</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123232#M6215</link>
      <description>&lt;P&gt;How would you do this in the Windows OS?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2017 18:55:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123232#M6215</guid>
      <dc:creator>Adrian_C_</dc:creator>
      <dc:date>2017-03-13T18:55:09Z</dc:date>
    </item>
    <item>
      <title>I don't know whether there is</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123233#M6216</link>
      <description>&lt;P&gt;I don't know whether there is a WindowsOS native way to access the MSRs, probably through some debugging interface or such.&lt;/P&gt;

&lt;P&gt;You can use the Windows driver from Intel PCM &lt;A href="https://github.com/opcm/pcm"&gt;https://github.com/opcm/pcm&lt;/A&gt; to get an interface to the user space. For further information see the Windows HOWTO&amp;nbsp;&lt;A href="https://github.com/opcm/pcm/blob/master/WINDOWS_HOWTO.rtf"&gt;https://github.com/opcm/pcm/blob/master/WINDOWS_HOWTO.rtf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Here is also a link with some explanations how to install the driver: &lt;A href="https://software.intel.com/en-us/forums/software-tuning-performance-optimization-platform-monitoring/topic/371243"&gt;https://software.intel.com/en-us/forums/software-tuning-performance-optimization-platform-monitoring/topic/371243&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 11:06:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123233#M6216</guid>
      <dc:creator>Thomas_G_4</dc:creator>
      <dc:date>2017-03-17T11:06:23Z</dc:date>
    </item>
    <item>
      <title>If it will be helpfull - good</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123234#M6217</link>
      <description>&lt;P&gt;If it will be helpfull - good examples of how to use rd/wrmsr is the source code of Intel Performance Counter Monitor and Likwid.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2017 17:08:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/how-to-use-rdmsr-from-my-C-program/m-p/1123234#M6217</guid>
      <dc:creator>SB17</dc:creator>
      <dc:date>2017-04-06T17:08:05Z</dc:date>
    </item>
  </channel>
</rss>

