|
|
Subscribe / Log in / New account

SELF: Anatomy of an (alleged) failure

SELF: Anatomy of an (alleged) failure

Posted Jun 24, 2010 1:08 UTC (Thu) by cesarb (subscriber, #6266)
In reply to: SELF: Anatomy of an (alleged) failure by xav
Parent article: SELF: Anatomy of an (alleged) failure

What would be interesting would be a bytecode architecture, like some sort of LLVM IR, compiled via a JIT at run time.

This way the same "executable" would run on ARM, x86-32, x86-64...


to post comments

SELF: Anatomy of an (alleged) failure

Posted Jun 24, 2010 9:50 UTC (Thu) by tzafrir (subscriber, #11501) [Link] (1 responses)

Someone already has. It's called qemu.

SELF: Anatomy of an (alleged) failure

Posted Jun 26, 2010 0:11 UTC (Sat) by waucka (guest, #63097) [Link]

If you want to do JIT, you should do it on an intermediate representation (IR) designed for the purpose. Deliberately using x86 (or any native code, really) for that purpose is ridiculous. Besides, we wouldn't necessarily have to do JIT all the time. With a good IR, we could have live CDs and USB sticks use JIT and convert to native code at install-time.

SELF: Anatomy of an (alleged) failure

Posted Jun 24, 2010 14:09 UTC (Thu) by pcampe (guest, #28223) [Link] (1 responses)

>What would be interesting would be a bytecode architecture [...]

We have something definitely better: source code.

Allowing for the distribution of a (more or less) universally-runnable, auto-sustained and self-contained component will ultimately result in making easier the distribution of closed source program, which is something we should contrast.

SELF: Anatomy of an (alleged) failure

Posted Jun 24, 2010 16:20 UTC (Thu) by Spudd86 (subscriber, #51683) [Link]

yes, but unless you run a source distro like Gentoo you may not have the dev files for everything on your system and lots of users are fairly averse to compiling themselves, plus a source distro can hit problems that DO NOT EVER hit binary distros (including people with misbehaving build systems, automagic deps (weather it ends up depending on another package being installed changes if the other package is installed a build time or not, with no way to turn this behavior off))

Also people are going to want to use pre-compiled code, and most people don't really want to learn how to package their stuff for every distro ever, let alone actually compile it 20 or 30 times.

SELF: Anatomy of an (alleged) failure

Posted Jun 24, 2010 16:13 UTC (Thu) by Spudd86 (subscriber, #51683) [Link] (1 responses)

If you go look at some of the older LLVM papers they pretty much describe doing this... (I don't know if anyone implemented it, but given that they DO have a JIT compiler for LLVM IR already I think you could probably already do this in a limited form see http://llvm.org/cmds/lli.html the current llvm command that will run a LLVM IR bytecode object file with the LLVM JIT)

The papers talk about profiling and optimizing the IR and writing that back to the binary, so you get a binary optimized for your workload.

This still has the issues of library incompatibilities across architectures (even within the same distro) since the library may not have all the same options compiled in, or many export a slightly different set of symbols or all kinds of other things...

SELF: Anatomy of an (alleged) failure

Posted Jun 27, 2010 16:03 UTC (Sun) by nix (subscriber, #2304) [Link]

IIRC this is currently being done by ClamAV (using LLVM, natch).

SELF: Anatomy of an (alleged) failure

Posted Jun 24, 2010 21:20 UTC (Thu) by dw (subscriber, #12017) [Link] (1 responses)

This has been tried many times, including (but not limited to) TDF (http://en.wikipedia.org/wiki/TenDRA_Distribution_Format) and ANDF (http://en.wikipedia.org/wiki/Architecture_Neutral_Distrib...).

I believe ANDF was the basis for some failed UNIX standard in the early 90s, but that's long before my time.

There's at least one more recent attempt along the same lines (forgotten its name).

SELF: Anatomy of an (alleged) failure

Posted Jun 28, 2010 16:13 UTC (Mon) by salimma (subscriber, #34460) [Link]

GNUstep? also, the ROX (RISC OS on X) Desktop.

SELF: Anatomy of an (alleged) failure

Posted Jul 1, 2010 7:45 UTC (Thu) by eduperez (guest, #11232) [Link]

> What would be interesting would be a bytecode architecture, like some sort of LLVM IR, compiled via a JIT at run time.
> This way the same "executable" would run on ARM, x86-32, x86-64...

You man, like... Java?

SELF: Anatomy of an (alleged) failure

Posted May 4, 2012 19:10 UTC (Fri) by ShannonG (guest, #84474) [Link]

This is why the kernel-mailing is hostile.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds