| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
matching StaticConfig at runtime; Fix PPC (Bug 1056) and MIPSLE (Bug 1014) issues.
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.
++
Also fixes Bug 1056 (PPC), thanks to tmancill [@] debian [.] org,
and Bug 1014 (MIPSLE), thanks to Dejan Latinovic.
Parts of the patch for Bug 1014 from Dejan Latinovic are included.
also solved by this change set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ELF Reader 'jogamp.common.os.elf' currently uses
Platform's pre-determined OS_TYPE and CPUType.
It also uses the host platforms MachineDescription,
hence can not read ELF files from other machines.
This also forbids Platform to determine CPUType etc
w/o having a valid 'os.arch' property.
+++
ElfHeader should be split in
- ElfHeaderPart1 (CPUType independent)
- ElfHeaderPart2 (CPUType dependent)
Fix shall make the ELF Reader self containing
by only using ELF CPUType data, etc.
This requires customization of struct parsing,
where MachineDescription.Static index shall be
- defined in ElfHeaderPart1 using e_Ident's CPUType.
- used in ElfHeaderPart2 and all its struct types.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Android:
- Detect ABIType.EABI_GNU_ARMHF via 'armeabi-v7a-hard'
Platform.CPUType:
- contains is32Bit now
MachineDescription:
- Rename *x86_64_unix* -> *lp64_unix*, reflecting universal __LP64__ mode
- Remove is32Bit, which is determined by CPUType
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add AArch64 detection via
- Elf Parser
- Android properties
- Java properties
- Android: Validate CPUType.Family _and_ ABIType
- MachineDescription
- Remove redundant Type ID and its field
- Reuse X86_64_UNIX for AArch64 (static config)
New ARCH 'aarch64' for
ant: <os arch>
armv8a
aarch64
New CPUType.ARM64 (ARM):
java: os.arch
aarch64
arm64
New CPUType.ARMv8_A (ARM):
java: os.arch
armv8-a
arm64-v8a
New ABIType:
EABI_AARCH64
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'best' ABI
- Use 'os.arch' as a prelim CPUType for MachineDescription
- Always attempt to load a binary and parse it's elf header
- Linux: self-exe
- Android: gluegen-rt library
- Other: java lib
- Always use details (ABI) if ARM
- Android: Check CPU_TYPE and CPU_TYPE2
// FIXME / HACK:
// We use sCPUType for MachineDescriptionRuntime.getStatic()
// until we have determined the final CPU_TYPE, etc.
// MachineDescriptionRuntime gets notified via MachineDescriptionRuntime.notifyPropsInitialized() below.
//
// We could use Elf Ehdr's machine value to determine the bit-size
// used for it's offset table!
// However, 'os.arch' should be a good guess for this task.
Tested manually on
- Linux x86, x86_64, armhf (raspi)
- Android intel and arm
- Windows x86_64
- OSX x86_64
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
library loading
Some Platform field declarations and it's static initialization has been delegated
to it's new abstract super class PlatformPropsImpl to solve
static initialization interdependencies w/ the GlueGen native library loading
and it's derived information {@link #getMachineDescription()}, {@link #is32Bit()}, ..<br>
This mechanism is preferred in this case to avoid synchronization and locking
and allow better performance accessing the mentioned fields/methods.
|
|
|
|
| |
sizeof(long double) == 8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TempJarCache.bootstrapNativeLib(..) usage
- Moving to Platform solves former interdependencies between GlueGenJNILibLoader/Platform
- TempJarCache is being setup w/ bootstraping the gluegen-rt native lib jar file.
Interesting here is that when using Oracle's JRE w/ Applets/JNLP the
current dbg output is:
gluegen-rt: url-root http://risa/deployment/test/jau02s/jar/
gluegen-rt: nativeJarURL jar:http://risa/deployment/test/jau02s/jar/gluegen-rt-natives-linux-amd64.jar!/
gluegen-rt: nativeJar /home/sven/.java/deployment/cache/6.0/49/3c6d1e31-2c90f42e
IE the JRE implementation already deduces the online link to the Applet/JNLP cache.
This makes the implementation much simpler, ie. same for application and Applets/JNLP.
Have to verify w/ other Java impl. sure - and add same logic for the JOGL part.
|
|
|
|
|
|
|
|
| |
gluegen-rt native lib as well
- removed redundance
- move proper JNLPAppletLauncher custom libloader code into JNILibLoaderBase
- prepares for new JAR temp cache ..
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- build:
- exclude android packages if !isAndroid
- aapt:
- Use individual AndroidManifest xml files
- optional: incl. our JAR manifest file to support detailed version info
- use def. GluegenVersionActivity
- APK VersionName: Retrieve and show
- package/extension names:
- gluegen.jar/apk: com.jogamp.gluegen
- gluegen-rt.jar/apk: com.jogamp.common
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- android minor build fix
- started dex'ing (gluegen-rt.apk, more to come for full junit tests)
- android remote dalvikvm launch works (crosstest-java-android-armv7-rel.sh)
- android detection, incl version (reflection)
- Platform:
- Add JAVA_VM_NAME and JAVA_VM_RUNIME
- OSType maybe ANDROID, where the OS name (String) is Linux ! (ok ?)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fin
MachineDesction == MD
MD.StaticConfig:
- enum for all supported static configs (ID -> MD)
- verified at runtime: test runtime queried-MD versus static-MD,
hard fail if not compatible (size/alignment)
SizeThunk primitive sizes:
- Add notion of fixed native size (eg. int64_t) and otherwise (eg. long)
java struct 'wrappers' code generation:
- single class using size/offset arrays of all MachineDescription configurations
- at runtime the array idx is queried in static block
- type aligment for not fixed-native-size types (SizeThunk, undef long/int) via StructAccessor
junit test:
- add float test
- fix native code
- add java (create, write) -> native (verify) test
works (tested) on: linux 32/64 and windows 32/64
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Platform:
- enum CPUFamily is part of CPUType
- DALVIK -> ANDROID
- ARM: ARM + ARMv[567]
MachineDescription
- self contained
- static size/alignment Config (enum) for unix32, unix64, win32, win64 and armeabi
- add 'long double'
- Removed MachineDescription32Bit, MachineDescription64Bit
- createStatic(..) uses OS/CPU to fetch best match if not at runtime
FIXES: JavaEmitter's struct-emit: Proper 32/64 struct sizes
TODO: StructAccessor's mapping to <Type>Buffer w/ index os sizeof(<Type>)
doesn't work, since offset may not be multiple of sizeof(<Type>)!
i.e.
typedef struct {
int8_t bits1; // +1 - 0
// +3 (p32)
int32_t id; // +4 - 4
int8_t bits2; // +1 - 8
// +3 (p32) -
int64_t long0; // +8 - 12
so "longBuffer.get(<type-sized index>)" is invalid,
but "byteBuffer.getLong(<byte index>)" must be done.
The actual impl. doesn't matter, hence dropping the other nio type mappings is good.
|
|
|
|
|
|
|
|
|
|
| |
- SizeThunk
- rename: compute -> computeSize
- add: computeAlignment
- merge types: char -> int8, short -> int16
- 'int' and 'long' may differ
-
|
|
- Preparation.
Fix commit f733203dfbd034a6b1aa3eb2cd616437c982c435,
adding missing file src/java/jogamp/common/os/MachineDescriptionRuntime.java
|