This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RTEMS Size Information on printf, gmtime, etc


Hi

I thought having something to compare to on an architecture
with less than the densest code might provide some insight.

The code is attached. Most RTEMS applications are statically
linked including the RTOS services needed, libc services needed,
BSP startup and shutdown, etc.  I started with the Init()
task only having a call to exit(0) and then progressively added
calls so we could see what each added.

- sparc v7 (erc32) at -O2
- start up, single task, exit(0)

base:
  66688       1408       7856      75952      128b0    o-optimize/time01.exe

add start and end printf (constant strings):
  73616       1408       7856      82880      143c0    o-optimize/time01.exe

add call to time():
  75840       1408       7856      85104      14c70    o-optimize/time01.exe

add gmtime call()
  77888       1472       7856      87216      154b0    o-optimize/time01.exe

add printf() to print MM/DD/YY HH::MM::SS
 106720       1600       7856     116176      1c5d0    o-optimize/time01.exe

I hope this provides a useful set of data.

I am happy to tinker if you want to see other the impact of other methods
or repeat this on other architectures. I can repeat this for 17
architectures
but I hope we don't need to check them all. :)

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

Attachment: test.c
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]