<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<style>
.hmmessage P
{margin:0px;padding:0px;}
body.hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Dear all,<br> I just upgraded an old version of rtems (2002) to the newer 4.9.0.<br><br>The real time application I'm working on, is based on a MCF5272 (66MHz), has a clock tick of 5 ms and the time consumption was about 3.2 ms with the older rtems.<br><br>With rtems 4.9.0, the time consumption is now 4.2 ms (for us is unacceptable).<br><br>What I see, using the debugger, is that the 1 ms comes from two calls to the function rtems_clock_get inside the tick period.<br><br>The new approach of "rtems_clock_get" is to call "rtems_clock_get_tod" which calls "gmtime_r" and finally the "_mktm_r" function (located in newlib).<br><br>This should be the issue. The mktm_r function uses 5 divisions ("/") and 5 module ("%") operators to compute the TOD. And these operators make the execution time huge in a 66MHz processor. <br><br>The old approach was to keep the TOD updated at every clock tick using just simple sums. <br><br>Does anybody know if there is a way to avoid this issue?<br><br>thank you.<br><br>Regards,<br>Maurizio<br><br /><hr />Scarica Messenger gratis: <a href='http://messenger.it/home_comunica.aspx' target='_new'>comunica, divertiti e condividi rapidamente!</a></body>
</html>