Thanks Joel's comments very much! See my input inline marked [Alan].<br><br>Regards,<br>Alan<br><br><div><span class="gmail_quote">2008/3/21, Joel Sherrill <<a href="mailto:joel.sherrill@oarcorp.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">joel.sherrill@oarcorp.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Reng Zeng wrote:<br> > Hi Joel, Chris and all,<br> ><br> > Other than this project, I also have some ideas as below, just what I<br> > could think of while trying to understand this project, it may be<br> > wrong or inappropriate for RTEMS, anyway, your any comments would be<br>
> highly appreciated.<br> <br>Attached is an example of using the GNU ld --wrap argument to wrap all<br> calls to malloc.<br> <br> I wrote a program which could be provided a list of function prototypes and<br> produce wrapper functions similar to the one shown in the attached code.<br>
But it would put all the arguments along with a event type indicator in<br> a buffer<br> and pass that all to the capture engine.</blockquote><div><br>[Alan] What is the event type indicator here? Current capture engine provide specific handler for each event. Now to integrate to capture engine from ALL the wrapper function, it would have SOLE handler in capture engine, is that right? Then besides all the arguments could be passed into capture engine, what kind of event type indicator could be passed along here?<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Chris was sure he could take the same list of function prototypes and auto<br> generate python code to decode the trace log.</blockquote>
<div><br>[Alan] For the "decode" here, do you mean the function name to be traced had already been encoded to something?<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
><br> > 1. For the log generated from run-time trace, the capture engine code<br> > only has Thread_Control as input, if we had another parameter there,<br> > that could make it possible for RTEMS application to add customized<br>
> info into the log. For example, if the run-time trace is used to trace<br> > the phone call usage, it may be required to have user id info included<br> > into the log.<br> ><br> <br>Agreed. Chris and I discussed passing a buffer along with the event type.<br>
<br>> 2. I guess, the run-time trace is mainly for debug purpose since it<br> > impact the performance anyway, especially in case high traffic. Is<br> > there any measurement available for specific characteristic? For<br>
> example, user may be interested to know average CPU utilization in the<br> > past 5 minutes, 30 minutes, and 24 hours.<br> <br>Exactly. It would indeed add overhead -- both CPU and precious<br> communications<br>
bandwidth. The user would have to have the capability to filter the<br> events logged.<br> I recall Chris and I identifying two points:<br> <br> + methods actually wrapped. If it isn't wrapped, this this executable<br>
won't be<br> able to trace that method.<br> + A boolean expression filter in the capture engine to let logging<br> happen but say that<br> you only want events from a particular task.<br> <br> RTEMS keeps cpu utilization statistics but there would be nothing wrong<br>
with snapshotting<br> this and having a log message for it. But remember, you could derive<br> this information<br> from the constext switch traces in the logging information.</blockquote><div><br>[Alan] Yes, the CPU utilization could be derived from context switch traces. But how about memory utilization? And, how about if user is interested to know what is the usage for specific semaphore?<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> All RTEMS systems do not have filesystems. Most will not have any type<br>
of permanent<br> storage at all to write data into. They will have to use some type of<br> communications<br> mechanism like TCP/IP to get the data off board dynamically. The<br> communication<br> mechanism may be unusual like CanBUS or something else. This is a deeply<br>
embedded system. :-D</blockquote><div><br>[Alan] Understood. Thanks for the detailed explanation. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
--<br> Joel Sherrill, Ph.D. Director of Research & Development<br> <a href="mailto:joel.sherrill@OARcorp.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">joel.sherrill@OARcorp.com</a> On-Line Applications Research<br>
Ask me about RTEMS: a free RTOS Huntsville AL 35805<br> Support Available (256) 722-9985<br> <br> <br> <br></blockquote></div><br>