<?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 Re: How do I use Using Pause/Resume API to do the following? in Analyzers</title>
    <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853180#M3085</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/120176"&gt;Vladimir Tsymbal (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;By "time call" I was meaning just using Windows API time functions. Something like&lt;STRONG&gt;timeGetTime&lt;/STRONG&gt; or &lt;STRONG&gt;QueryPerformanceCounter&lt;/STRONG&gt; for better precision.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I don't know what I pressed by mistake, and got those large fonts : ).&lt;BR /&gt;Anyway, thanks!!&lt;BR /&gt;</description>
    <pubDate>Mon, 20 Jul 2009 10:52:48 GMT</pubDate>
    <dc:creator>zgzg2020</dc:creator>
    <dc:date>2009-07-20T10:52:48Z</dc:date>
    <item>
      <title>How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853173#M3078</link>
      <description>Hi,&lt;BR /&gt;I am using a large third-party open-source software with OpenMP. The "main" C++ function is located in a closed-source counter part.&lt;BR /&gt;I have added some OpenMP for directives and I would like to see how well or worse the performance has become.&lt;BR /&gt;I read the &lt;A href="http://www.intel.com/software/products/documentation/vlin/mergedprojects/analyzer_ec/analyzer_hh/using_apis.htm"&gt;article&lt;/A&gt; on Using Pause/Resume API. However, I want to do the opposite of what is written there. I want the sampling to be Off during the whole duration. Then, it turns on right before the part where I placed my OpenMP directives. Then, it goes back off, until it re-reaches that OpenMP directive part again.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE&gt;[cpp]#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main () // I have no access to this part&lt;BR /&gt;{&lt;BR /&gt;  //If I had access I can simply add VTPause()&lt;BR /&gt;  time_t seconds;&lt;BR /&gt;&lt;BR /&gt;  while(...)&lt;BR /&gt;  {&lt;BR /&gt;    seconds = time (NULL);&lt;BR /&gt;    // VTResume()&lt;BR /&gt;    for(...)&lt;BR /&gt;    printf ("%ld hours since January 1, 1970", seconds/3600);&lt;BR /&gt;    // VTPause&lt;BR /&gt;  }&lt;BR /&gt;  return 0;&lt;BR /&gt;}[/cpp]&lt;/TIME.H&gt;&lt;/STDIO.H&gt;&lt;/PRE&gt;
&lt;BR /&gt;If that is not possible, then I would like to change my question to be that I want to calculate how much a certain function has taken. I have done some sampling in the past. But, the displayed information is just too much for me to know which one to look at. Many CLOCK columns.&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Jul 2009 12:12:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853173#M3078</guid>
      <dc:creator>zgzg2020</dc:creator>
      <dc:date>2009-07-17T12:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853174#M3079</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417125"&gt;zgzg2020&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;Hi,&lt;BR /&gt;I am using a large third-party open-source software with OpenMP. The "main" C++ function is located in a closed-source counter part.&lt;BR /&gt;I have added some OpenMP for directives and I would like to see how well or worse the performance has become.&lt;BR /&gt;I read the &lt;A href="http://www.intel.com/software/products/documentation/vlin/mergedprojects/analyzer_ec/analyzer_hh/using_apis.htm"&gt;article&lt;/A&gt; on Using Pause/Resume API. However, I want to do the opposite of what is written there. I want the sampling to be Off during the whole duration. Then, it turns on right before the part where I placed my OpenMP directives. Then, it goes back off, until it re-reaches that OpenMP directive part again.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;
&lt;/EM&gt;&lt;PRE&gt;&lt;EM&gt;[cpp]#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main () // I have no access to this part&lt;BR /&gt;{&lt;BR /&gt;  //If I had access I can simply add VTPause()&lt;BR /&gt;  time_t seconds;&lt;BR /&gt;&lt;BR /&gt;  while(...)&lt;BR /&gt;  {&lt;BR /&gt;    seconds = time (NULL);&lt;BR /&gt;    // VTResume()&lt;BR /&gt;    for(...)&lt;BR /&gt;    printf ("%ld hours since January 1, 1970", seconds/3600);&lt;BR /&gt;    // VTPause&lt;BR /&gt;  }&lt;BR /&gt;  return 0;&lt;BR /&gt;}[/cpp]&lt;/TIME.H&gt;&lt;/STDIO.H&gt;&lt;/EM&gt;&lt;/PRE&gt;
&lt;BR /&gt;If that is not possible, then I would like to change my question to be that I want to calculate how much a certain function has taken. I have done some sampling in the past. But, the displayed information is just too much for me to know which one to look at. Many CLOCK columns.&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;May be I didn't get it what do you mean by saying that you "want to do the opposite of what is written there", but if you put the VTResume()call right before the omp for' pragma and the VTPause() call right after the end of scope, you'll get the sampling results over threads created ror your function. If you interested in measuring performance gain only, you may want to insert only time calls instead.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2009 14:11:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853174#M3079</guid>
      <dc:creator>Vladimir_T_Intel</dc:creator>
      <dc:date>2009-07-17T14:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853175#M3080</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/120176"&gt;Vladimir Tsymbal (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;May be I didn't get it what do you mean by saying that you "want to do the opposite of what is written there", but if you put the VTResume()call right before the omp for' pragma and the VTPause() call right after the end of scope, you'll get the sampling results over threads created ror your function. If you interested in measuring performance gain only, you may want to insert only time calls instead.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;As I understand from the tutorial, if I want to monitor a certain area with VTune, I should place a VTPause() a the beginning of the program, and then add a VTResume() right before the area where I want to monitor.&lt;BR /&gt;But, because I do not have access to the main function of the program, I want to know what kind of orgnization do I place the VTPause()/VTResume() in my program? Where should I place them if I have no access to the main function? Note, I want to monitor a very small area in a very large program.&lt;BR /&gt;&lt;BR /&gt;Can you tell me how to use those time calls?&lt;BR /&gt;</description>
      <pubDate>Sat, 18 Jul 2009 13:06:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853175#M3080</guid>
      <dc:creator>zgzg2020</dc:creator>
      <dc:date>2009-07-18T13:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853176#M3081</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/120176"&gt;Vladimir Tsymbal (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;May be I didn't get it what do you mean by saying that you "want to do the opposite of what is written there", but if you put the VTResume()call right before the omp for' pragma and the VTPause() call right after the end of scope, you'll get the sampling results over threads created ror your function. If you interested in measuring performance gain only, you may want to insert only time calls instead.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;
&lt;H2&gt;I looked for what "time calls" are, but couldn't find them. Is there a closer keyword I can look for to find those?&lt;BR /&gt;&lt;/H2&gt;</description>
      <pubDate>Mon, 20 Jul 2009 05:15:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853176#M3081</guid>
      <dc:creator>zgzg2020</dc:creator>
      <dc:date>2009-07-20T05:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853177#M3082</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417125"&gt;zgzg2020&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;As I understand from the tutorial, if I want to monitor a certain area with VTune, I should place a VTPause() a the beginning of the program, and then add a VTResume() right before the area where I want to monitor.&lt;BR /&gt;But, because I do not have access to the main function of the program, I want to know what kind of orgnization do I place the VTPause()/VTResume() in my program? Where should I place them if I have no access to the main function? Note, I want to monitor a very small area in a very large program.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;
&lt;P&gt;Not quite right. When using VTune API, you start VTune collection in "paused" mode. This means that VTune doesn't collect any data until program execution reached VTResume() call. After that collection starts and then it goes until reaching VTPause() call. So, you can collect profiling data on any code region within your program, just put VTResume() before and VTPause() after the code of interest.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2009 10:10:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853177#M3082</guid>
      <dc:creator>Vladimir_T_Intel</dc:creator>
      <dc:date>2009-07-20T10:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853178#M3083</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417125"&gt;zgzg2020&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;&lt;BR /&gt;
&lt;H2&gt;I looked for what "time calls" are, but couldn't find them. Is there a closer keyword I can look for to find those?&lt;BR /&gt;&lt;/H2&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;By "time call" I was meaning just using Windows API time functions. Something like&lt;STRONG&gt;timeGetTime&lt;/STRONG&gt;or &lt;STRONG&gt;QueryPerformanceCounter&lt;/STRONG&gt; for better precision.</description>
      <pubDate>Mon, 20 Jul 2009 10:16:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853178#M3083</guid>
      <dc:creator>Vladimir_T_Intel</dc:creator>
      <dc:date>2009-07-20T10:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853179#M3084</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/120176"&gt;Vladimir Tsymbal (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;P&gt;Not quite right. When using VTune API, you start VTune collection in "paused" mode. This means that VTune doesn't collect any data until program execution reached VTResume() call. After that collection starts and then it goes until reaching VTPause() call. So, you can collect profiling data on any code region within your program, just put VTResume() before and VTPause() after the code of interest.&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I see now. Thanks for clearing that out for me!&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Jul 2009 10:51:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853179#M3084</guid>
      <dc:creator>zgzg2020</dc:creator>
      <dc:date>2009-07-20T10:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853180#M3085</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/120176"&gt;Vladimir Tsymbal (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;By "time call" I was meaning just using Windows API time functions. Something like&lt;STRONG&gt;timeGetTime&lt;/STRONG&gt; or &lt;STRONG&gt;QueryPerformanceCounter&lt;/STRONG&gt; for better precision.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I don't know what I pressed by mistake, and got those large fonts : ).&lt;BR /&gt;Anyway, thanks!!&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Jul 2009 10:52:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853180#M3085</guid>
      <dc:creator>zgzg2020</dc:creator>
      <dc:date>2009-07-20T10:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853181#M3086</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/120176"&gt;Vladimir Tsymbal (Intel)&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;By "time call" I was meaning just using Windows API time functions. Something like&lt;STRONG&gt;timeGetTime&lt;/STRONG&gt; or &lt;STRONG&gt;QueryPerformanceCounter&lt;/STRONG&gt; for better precision.&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I have just finished adding QueryPerformanceCounter into my project. From what I can see, it is very precise. I used to use ctime's clock() function, which was nothing like this one.&lt;BR /&gt;&lt;BR /&gt;Anyway, thank you for your help!!! : )&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Jul 2009 14:32:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853181#M3086</guid>
      <dc:creator>zgzg2020</dc:creator>
      <dc:date>2009-07-20T14:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use Using Pause/Resume API to do the following?</title>
      <link>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853182#M3087</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417125"&gt;zgzg2020&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;I have just finished adding QueryPerformanceCounter into my project. From what I can see, it is very precise. I used to use ctime's clock() function, which was nothing like this one.&lt;BR /&gt;&lt;BR /&gt;Anyway, thank you for your help!!! : )&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;You are welcome! Good to know that it helped :)</description>
      <pubDate>Mon, 20 Jul 2009 14:39:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Analyzers/How-do-I-use-Using-Pause-Resume-API-to-do-the-following/m-p/853182#M3087</guid>
      <dc:creator>Vladimir_T_Intel</dc:creator>
      <dc:date>2009-07-20T14:39:50Z</dc:date>
    </item>
  </channel>
</rss>

