The IO Visor project appears to be doing something like this with LLVM and JIT constructs to dynamically insert code into the kernel in a platform-independent manner. Perhaps we can leverage that technology?

Bill

On Mon, Nov 9, 2015 at 4:33 PM, Jim Wilson <jim.wilson@linaro.org> wrote:
On Fri, Nov 6, 2015 at 6:48 AM, Zoltan Kiss <zoltan.kiss@linaro.org> wrote:
> I've checked link time optimization (-flto), but it only helps with static
> linking. Is there any way to keep the ODP application and platform
> implementation binaries in separate files while having the performance
> benefit of inlining?

I haven't been able to think of a good way to do this, and apparently
no one else has either.

There is a not so good way to do it.  You could distribute relocatable
link (i.e. ld -r) output instead of executables and shared libraries,
and then do the final LTO compile and link at run-time.  This just
creates a new set of problems though.  There would be a long delay for
the LTO compile and link before you start routing packets which would
be inconvenient.  It would be better to do the LTO compile and link
just once and reuse the binary, but then you have the problem of where
do you put the binary and how do you give it proper owner and group
permissions.  There may also be issues with using ld -r with LTO.  You
probably don't want this mess.

Otherwise, you need some kind of JIT or rewritable code scheme to redo
compiler optimizations at run-time, and we don't have that technology,
at least not with gcc.  I don't know if LLVM has any useful feature
here.

Jim
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp