| Building TPTP java_profiler/StatelessHeapSnapshotManager_C.cpp [message #83611] |
Fri, 15 September 2006 08:32 |
Darryl Miles Messages: 118 Registered: July 2009 |
Senior Member |
|
|
I am looking over all the native code in TPTP looking to adapt the 32bit
linux version for 64bit linux. Given that other architectures that TPTP
runs on are 64bit I figure most of the hard work has already been done
with porting to 64bit platform (in relation to writing portable code
pointer/long type size changes) and its just a matter of someone
building the native parts and resolving the issues.
I am trying to build the old agent controller as per the instruction in
platform/org.eclipse.tptp.platform.agentcontroller/src-nativ e/collection/README.txt.
Issue 1)
There appears to be some magic number added to the data to describe the
native host platform. However I would guess that 32bit and 64bit linux
should have different magic values, the following piece of code adds
that number but there is no allocation for __x86_64__ (the commented out
defined(__x86_64__) was added by me to asses how much work as needed to
make it compile.
So if I hunch is correct can someone tell me what value I should be
using for 64bit Linux here.
collectors/native/java_profiler/StatelessHeapSnapshotManager _C.cpp:274
#if defined(_WIN32)
traceWriteInt32LittleEndian(11);
#elif defined(_AIX)
traceWriteInt32LittleEndian(22);
#elif defined(MVS)
traceWriteInt32LittleEndian(33);
#elif defined(__linux__) && (defined(__i386__) /*|| defined(__x86_64__)*/)
traceWriteInt32LittleEndian(44);
#elif defined(__linux__) && defined(__s390__)
traceWriteInt32LittleEndian(55);
#elif defined(_SOLARIS)
traceWriteInt32LittleEndian(66);
#elif defined(_HPUX)
traceWriteInt32LittleEndian(77);
#elif defined(__OS400__)
traceWriteInt32LittleEndian(88);
#elif defined(__linux__) && defined(__powerpc64__) || defined(_WIN64)
/*ts. bug 120479*/
/* traceWriteInt32LittleEndian(99); */
#else
#error "unknown platform"
#endif
Issue 2)
The code then goes on to write out classID information which I guess is
64bit on 64bit platforms, but the current code path truncates it into a
32bit piece of data. I guess the OS400 platform is 64bit so can anyone
confirm if I can use this method for 64bit Linux as well ?
collectors/native/java_profiler/StatelessHeapSnapshotManager _C.cpp:381
#if defined(__OS400__)
traceWriteOID(classID);
#else
traceWriteInt32((int)classID);
#endif
Issue 3)
Where is the code that reads the data, does that code need adjusting to
decode the data correctly ?
Darryl
|
|
|
Powered by
FUDForum. Page generated in 0.02679 seconds