NativeJavaGcjPackages
|
Size: 1548
Comment: new page
|
← Revision 11 as of 2008-08-06 16:38:46 ⇥
Size: 2298
Comment: converted to 1.6 markup
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| * '''Launchpad Entry''': https://launchpad.net/distros/ubuntu/+spec/foo | * '''Launchpad Entry''': https://launchpad.net/distros/ubuntu/+spec/native-java-gcj |
| Line 5: | Line 5: |
| * '''Contributors''': * '''Packages affected''': all packages containing java code |
* '''Contributors''': MatthiasKlose * '''Interested''': ZakElep * '''Packages affected''': all packages containing java code (40 in main) |
| Line 10: | Line 11: |
| For each package containing java code, provide a corresponding -gcj package with java compiled to native code. | For some packages containing java code, provide a corresponding -gcj package with java compiled to native code. It's not a win to compile everything to native code, which just costs memory for seldom used code. Looking at the edgy time horizon, the spec is optional for edgy. |
| Line 18: | Line 21: |
| * Each jar file in a package installed into /usr/share/java has a corresponding file /usr/lib/gcj-4.0/ holding the corresponding so file containing the natively compiled java code. * The jar file is built using the default java compiler using the arguments -O2 -fjni -findirect-dispatch. * To workaround limits on the number of class files and size of the byte-code, the compilation should be done using the aot-compile-deb binary found in the java-gcj-compat package (maybe move that to the gij packaged). * The debugging symbols are provided in a corresponding gcjdbg package. |
Each jar file in a package installed into /usr/share/java has a corresponding file /usr/lib/gcj-4.0/ holding the corresponding so file containing the natively compiled java code. The jar file is built using the default java compiler using the arguments -O2 -fjni -findirect-dispatch. gij is capable of working in both an interpreted mode and a compiled mode. In order to work with compiled packages, we will provide an extra package for each Java application and library that ends in -gcj which contains the compiled binaries. To workaround limits on the number of class files and size of the byte-code, the compilation is done using the aot-compile-deb script. The debugging symbols are provided in a corresponding -gcjdbg package. |
| Line 25: | Line 31: |
| * Provide an example implementation for one package: * add the two packages to the control file * call aot-compile-deb from the deb file (maybe add a debhelper to do that) * add gcj-dbtool calls to the postinst and preinst files (maybe add a debhelper to do that) * strip the symbols and put the symbols into the -gcjdbg package. * Update all other java packages (about 150 in main and universe) |
1. Update aot-compile-deb to compile the class/jar files in the temporary installation directories and install the results in the -gcj package(s). 2. Write a helper script for aot-compile-deb and gcj-dbtool calls. This helper script may be debhelper-based, cdbs based, or completely independant of both. 3. We will provide an example implementation for one package. Steps to follow: * add the two packages to the control file. * call aot-compile-deb from `debian/rules` * add gcj-dbtool calls to the postinst and preinst files. * strip the symbols and put the symbols into the -gcjdbg package. 4. Coordinate community/developer support around updating all other Java packages (about 150 in main and universe, 40 just in main) ---- CategorySpec |
Launchpad Entry: https://launchpad.net/distros/ubuntu/+spec/native-java-gcj
Created: 20051105 by MatthiasKlose
Contributors: MatthiasKlose
Interested: ZakElep
Packages affected: all packages containing java code (40 in main)
Summary
For some packages containing java code, provide a corresponding -gcj package with java compiled to native code. It's not a win to compile everything to native code, which just costs memory for seldom used code.
Looking at the edgy time horizon, the spec is optional for edgy.
Rationale
Faster execution compared to the gij-interpreted java code. Tradeoff is higher memory consumption.
Design
Each jar file in a package installed into /usr/share/java has a corresponding file /usr/lib/gcj-4.0/ holding the corresponding so file containing the natively compiled java code. The jar file is built using the default java compiler using the arguments -O2 -fjni -findirect-dispatch.
gij is capable of working in both an interpreted mode and a compiled mode. In order to work with compiled packages, we will provide an extra package for each Java application and library that ends in -gcj which contains the compiled binaries.
To workaround limits on the number of class files and size of the byte-code, the compilation is done using the aot-compile-deb script.
The debugging symbols are provided in a corresponding -gcjdbg package.
Implementation
1. Update aot-compile-deb to compile the class/jar files in the temporary installation directories and install the results in the -gcj package(s).
2. Write a helper script for aot-compile-deb and gcj-dbtool calls. This helper script may be debhelper-based, cdbs based, or completely independant of both.
3. We will provide an example implementation for one package.
Steps to follow:
- add the two packages to the control file.
call aot-compile-deb from debian/rules
- add gcj-dbtool calls to the postinst and preinst files.
- strip the symbols and put the symbols into the -gcjdbg package.
4. Coordinate community/developer support around updating all other Java packages (about 150 in main and universe, 40 just in main)
NativeJavaGcjPackages (last edited 2008-08-06 16:38:46 by localhost)