Bug 1126 - Remove static query requirement of MachineDescriptor, find matching StaticConfig at runtime.
Summary: Remove static query requirement of MachineDescriptor, find matching StaticCon...
Status: RESOLVED FIXED
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: All all
: --- enhancement
Assignee: Sven Gothel
URL:
Depends on: 1125
Blocks: 1014 1056 1122
  Show dependency treegraph
 
Reported: 2015-02-01 21:51 CET by Sven Gothel
Modified: 2015-02-02 00:30 CET (History)
0 users

See Also:
Type: ---
SCM Refs:
gluegen 7db9df61142694965b50f2e0553d4c9e5668439b jogl 30eee9ae10fd27917f969374f2bb432bdd2a9671
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2015-02-01 21:51:19 CET
Remove static query requirement of MachineDescriptor,
find matching StaticConfig at runtime.

Currently the StaticConfig is being queried
via the key[OSType, CPUType ..] 
as pre-determined by Java properties or the ELF parser. 
This adds complication to maintain different platforms
and the key query might not even be sufficient.

The MachineDescriptor's StaticConfig only purpose shall be
to speed-up native data size and offset/alignment retrieval.
This is done by using the StaticConfig index within 
all StaticConfig[]s as a lookup-index for the precomputed
struct's size and offset tables.

+++

Solution:

Rename: MachineDescriptor -> MachineDataInfo
Rename: MachineDescriptorRuntime -> MachineDataInfoRuntime

After having defined os.and.arch (OSType, CPUType and ABIType)
w/ the optional help of the now self containing ELF Reader (Bug 1125),
the native gluegen-rt library gets loaded enabling JNI methods.

It is satisfactory to retrieve MachineDataInfo
at runtime w/ JNI and find the matching/compatible StaticConfig.
Only in case none is found, the program needs to abort.
Otherwise the found MachineDataInfo.StaticConfig and MachineDataInfo
are stored for further use (see above).

This removes above complication and key to StaticConfig mapping.

New platforms simply need to add a new unique entry into the 
StaticConfig[] table.

This removes the
Comment 1 Sven Gothel 2015-02-01 23:32:30 CET
The PPC (Bug 1056) and MIPSLE (Bug 1014) issues shall be 
also solved by this change set.
Comment 2 Sven Gothel 2015-02-02 00:30:19 CET
Fixed as described:
  gluegen 7db9df61142694965b50f2e0553d4c9e5668439b
  jogl 30eee9ae10fd27917f969374f2bb432bdd2a9671