<div dir="ltr">I assume symbols prefixed with "_" are to be considered part of the private API.  What are the guidelines and legalities, if any, of bringing in these private symbols into our own code?  </div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 12, 2018 at 11:10 AM, Fabrício de Novaes Kucinskis <span dir="ltr"><<a href="mailto:fabricio.kucinskis@inpe.br" target="_blank">fabricio.kucinskis@inpe.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="PT-BR" link="blue" vlink="purple"><div class="m_4588807827400947375WordSection1"><p class="MsoNormal"><span lang="EN-US">Hi Mathew and Joel,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">On the past, I’ve used the following code to get individual task usage and monitor tasks behavior through time. It’s completely based on rtems_cpu_usage_report_with_<wbr>plugin and I know it’s not the best way to do it, but worked for me </span><span lang="EN-US" style="font-family:"Segoe UI Emoji",sans-serif">😊</span><span lang="EN-US">.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Regards,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Fabrício.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:#3f7f5f">/**</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#3f7f5f"> * Returns the task usage in us. If the taskId is zero, returns the time since boot.</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#3f7f5f">* Code based on ‘rtems_cpu_usage_report_with_<wbr>plugin’.</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#3f7f5f"> **/</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint64_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> <b>TasksStatusList::<span style="background:silver">GetCpuUsagePe<wbr>rTask</span></b>(</span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">const</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> rtems_id &taskId)</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">{</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">if</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> (taskId == 0)</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                {</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">struct</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">timespec</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> uptime;</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">struct</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">timespec</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> total;</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#642880">rtems_clock_get_uptime</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">(&<wbr>uptime);</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#642880">_Timespec_Subtract</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">(&CPU_usage_<wbr>Uptime_at_last_reset, &uptime, &total);</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint64_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> totalCpuUsageInUs = (total.</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#0000c0">tv_sec</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> * </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">static_cast</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"><</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint64_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">>(1000000)<wbr>) + (total.</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#0000c0">tv_nsec</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> / </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">static_cast</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"><</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint64_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">>(1000));</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">return</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> totalCpuUsageInUs;</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                }</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">else</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                {</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">Objects_Information</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> *ptObjInformation = NULL;</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">Thread_Control</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                <wbr>        *ptThread = NULL;</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">Thread_CPU_usage_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> timeRan;</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">for</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> (</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint32_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> i = 1; i <= OBJECTS_APIS_LAST; i++)</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               {</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                 </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">if</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> (!_Objects_Information_table[<wbr>i])</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                 </span><span style="font-size:8.0pt;font-family:Monospace;color:black">{</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                                              <wbr>                 </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">continue</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">; </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#3f7f5f">// that’s ugly, but it works</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                 }</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                 ptObjInformation = _Objects_Information_table[i][<wbr>1];</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                 </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">if</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> (ptObjInformation != NULL)</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                 {</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>   </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">for</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> (</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint32_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> j = 1; j <= ptObjInformation-></span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#0000c0">maximum</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">; j++)</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>   {</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                   ptThread = </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">reinterpret_cast</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"><</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">Thread_<wbr>Control</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> *>(ptObjInformation-></span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#0000c0">local_<wbr>table</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">[j]);</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                   </span><b><span style="font-size:8.0pt;font-family:Monospace;color:#7f0055">if</span></b><span style="font-size:8.0pt;font-family:Monospace;color:black"> (ptThread == NULL)</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                   {</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                                              <wbr>                              <wbr>                   </span><b><span style="font-size:8.0pt;font-family:Monospace;color:#7f0055">continue</span></b><span style="font-size:8.0pt;font-family:Monospace;color:black">; </span><span style="font-size:8.0pt;font-family:Monospace;color:#3f7f5f">// still ugly, still works</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                   }</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                   </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#3f7f5f">// if the caller task asks for its own cpu usage, the time since the last context switch will not be computed</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                   </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">if</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> (ptThread-></span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#0000c0">Object</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">.</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#0000c0">id</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> == taskId)</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                   {</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                              <wbr>    timeRan = ptThread-></span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#0000c0">cpu_time_used</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">;</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                              <wbr>    </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint64_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"> cpuUsageInUs = (_Timestamp_Get_seconds(&<wbr>timeRan) * </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">static_cast</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"><</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint64_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">>(1000000)<wbr>) + (_Timestamp_Get_nanoseconds(&<wbr>timeRan) / </span><b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#7f0055">static_cast</span></b><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black"><</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#005032">uint64_t</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">>(1000));</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                              <wbr>    </span><b><span style="font-size:8.0pt;font-family:Monospace;color:#7f0055">return</span></b><span style="font-size:8.0pt;font-family:Monospace;color:black"> cpuUsageInUs;</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>                   }</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                              <wbr>   }</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                              <wbr>                 }</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                               }</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:#3f7f5f">// if the rtemsId doesn’t exist...</span><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:8.0pt;font-family:Monospace;color:black">                               </span><b><span style="font-size:8.0pt;font-family:Monospace;color:#7f0055">return</span></b><span style="font-size:8.0pt;font-family:Monospace;color:black"> 0;</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">                }</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:8.0pt;font-family:Monospace;color:black">}</span><span style="font-size:8.0pt;font-family:Monospace"><u></u><u></u></span></p><p class="MsoNormal"><span><u></u> <u></u></span></p><p class="MsoNormal"><b>De:</b> users [mailto:<a href="mailto:users-bounces@rtems.org" target="_blank">users-bounces@rtems.<wbr>org</a>] <b>Em nome de </b>Joel Sherrill<br><b>Enviada em:</b> quinta-feira, 12 de julho de 2018 11:37<br><b>Para:</b> Mathew Benson <<a href="mailto:mbenson@windhoverlabs.com" target="_blank">mbenson@windhoverlabs.com</a>><br><b>Cc:</b> RTEMS <<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a>><br><b>Assunto:</b> Re: CPU utilization<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal"><u></u> <u></u></p><div><span class=""><p class="MsoNormal"><span lang="EN-US">On Tue, Jul 10, 2018 at 2:30 PM, Mathew Benson <</span><a href="mailto:mbenson@windhoverlabs.com" target="_blank"><span lang="EN-US">mbenson@windhoverlabs.com</span></a><span lang="EN-US">> wrote:<u></u><u></u></span></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><p class="MsoNormal"><span lang="EN-US">What would be the recommend way to read CPU utilization?  Am I correct in saying, the best way would be to call rtems_cpu_usage_report_with_<wbr>plugin()?  Its ill advised to access the private symbols utilized by the rtems_cpu_usage_report_with_<wbr>plugin() call directly, right?  Is there another function that I can call to return a structure rather than parsing it with the rtems_printer plugin?  I haven't dug into the rtems_printer object yet, but I'm assuming I could use it and parse a string sent to it.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US" style="color:#888888"><u></u> <u></u></span></p></div></div></blockquote><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">Yes. You could use the printer_object passed in to parse it. <u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">There isn't a call to get this information (yet) and similarly, there isn't an<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">API to get the stack usage. <u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">Proposals and code welcomed. :)<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US">--joel<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p></div></span><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><p class="MsoNormal"><span lang="EN-US" style="color:#888888"><br>-- <u></u><u></u></span></p><div><div><div><div><div><span class=""><div><div><p class="MsoNormal"><b><span lang="EN-US" style="color:#888888">Mathew Benson</span></b><span lang="EN-US" style="color:#888888"><u></u><u></u></span></p></div><p class="MsoNormal"><span lang="EN-US" style="color:#888888">CEO | Chief Engineer<u></u><u></u></span></p></div></span><p class="MsoNormal"><span lang="EN-US" style="color:#888888">Windhover Labs, LLC<br>832-640-4018<br><br></span><span style="color:#888888"><img border="0" width="250" height="39" style="width:2.6041in;height:.4062in" id="m_4588807827400947375_x0000_i1025" src="https://drive.google.com/a/windhoverlabs.com/uc?id=1cLDczWESrU667xKgEJlFhHa2yjq5UVhJ&export=download" alt="https://drive.google.com/a/windhoverlabs.com/uc?id=1cLDczWESrU667xKgEJlFhHa2yjq5UVhJ&export=download"></span><span lang="EN-US" style="color:#888888"><u></u><u></u></span></p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><a href="http://www.windhoverlabs.com" target="_blank"><span lang="EN-US">www.windhoverlabs.com</span></a><span lang="EN-US" style="color:#888888"><u></u><u></u></span></p></div></div></div></div></div></div><span class=""><p class="MsoNormal"><span lang="EN-US"><br>______________________________<wbr>_________________<br>users mailing list<br></span><a href="mailto:users@rtems.org" target="_blank"><span lang="EN-US">users@rtems.org</span></a><span lang="EN-US"><br></span><a href="http://lists.rtems.org/mailman/listinfo/users" target="_blank"><span lang="EN-US">http://lists.rtems.org/<wbr>mailman/listinfo/users</span></a><span lang="EN-US"><u></u><u></u></span></p></span></blockquote></div><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div></div></div><br>______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/<wbr>mailman/listinfo/users</a><br></blockquote></div><br></div>