performance issue
Sterling Augustine
sterling at tensilica.com
Fri Feb 24 20:57:39 UTC 2006
Mike Frysinger wrote:
> not surprised there by the performance of our C string functions ... so you
> ported uClibc to Xtensa ? is that something you can contribute back ? :)
That would be the libgloss port I did, which hasn't kept up. I sent a
patch to the mailing list a few weeks ago, but it bounced for being too big.
Attached is the message I sent with it. Anyone is free to ask for the
patch, which now that I have actually done it, will go more easily.
--------
Enclosed is a (rather large) patch of all our changes that we did to get
uclibc running on libgloss. It against 0.9.27 with a small amount of
stuff holding over from 0.9.26.
I do not expect it to be checked into the mainline uclibc tree, and it
would probably cause major havoc if it was, as I have not done any
testing to ensure that the linux side still works. (I don't know why it
would fail, but "If it isn't tested, it doesn't work.")
The patch does 3 things. If I had a chance to do it again, I would stage
these things, but I didn't and don't.
1. Adds support for building outside the source tree. These portions
have since been obviated by other uClibc changes, but we haven't pulled
them in yet.
2. Adds support for building to target libgloss.
3. Adds an Xtensa target under libgloss.
In this patch, Xtensa is the only target supported under libgloss.
Adding another should be as simple as adding another target under linux,
or easier if you are copying a target from the linux side. But you'll
have to do that part yourself unless you are building for Xtensa.
Several issues here:
1. Much of libc/sysdeps/linux/* isn't really system dependent. In fact,
the vast majority of libc/sysdeps/libgloss/* is simply a direct copy of
sysdeps/linux/*. If we really want to have uclibc support multiple
operating systems, then most of that directory should be moved to a
directory named libc/internal or something.
2. Much of the bits and sys directories would be duplicates if the
target wanted to support linux and libgloss (today Xtensa only supports
libgloss, so there is no issue here). There should probably be some sort
of architecture (arch) directory for the OS independent portions.
3. Although we are using it just fine, this patch is probably more of a
starting point than an ending point for libgloss support for most
people. It would take a fair amount of work to integrate it into the
latest uclibc stuff, because there have been a lot of changes, the vast
majority of which are not relevant to libgloss environments.
Finally, make sure that libgloss can do all you want it to before you
commit too much time to this project.
I'm happy to answer questions as to what I did and why.
Insert "No warranty, standard disclaimers as to merchantability,
usefulness for a particular purpose and other legalese" here.
Sterling Augustine
Member, Technical Staff
Tensilica, Inc.
sterling at tensilica.com
More information about the uClibc
mailing list