-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial changes for Open XL z/os support #7320
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,8 @@ | |
|
||
#include "omrcomp.h" | ||
|
||
struct OMRPortLibrary; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A blank line after this one would be welcome. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
||
/** | ||
* Get the zOS SYSNAME sysparm. | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1663,7 +1663,7 @@ omrshmem_openSharedMemory (OMRPortLibrary *portLibrary, intptr_t fd, const char | |
goto failDontUnlink; | ||
} | ||
} else { | ||
#if defined(__GNUC__) || defined(AIXPPC) | ||
#if (defined(__GNUC__) || defined(AIXPPC)) && !defined(J9ZOS390) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest reordering the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you detail that a bit, looking at the logic again, since I have excluded via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see now that none of the branches would apply for z/OS: is that the right behavior? #if defined(OMRZOS390)
// existing lines 1686-1709
#elif defined(__GNUC__) || defined(AIXPPC)
// existing lines 1667-1683
#endif /* defined(OMRZOS390) */ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup, and that does look cleaner.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems the build is failing after reorganizing this and
The full command follows the above format, and Looks like from what I can see it was not set for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, thats what I was mentioning in my prior comment. As such, in the current state of the PR I am still utilizing |
||
#if defined(OSX) | ||
/*Use ._key for OSX*/ | ||
if (buf.shm_perm._key != controlinfo->common.ftok_key) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1060,7 +1060,7 @@ omrshsem_openSemaphore(struct OMRPortLibrary *portLibrary, intptr_t fd, char *ba | |
goto failDontUnlink; | ||
} | ||
} else { | ||
#if defined(__GNUC__) || defined(AIXPPC) || defined(OMRZTPF) | ||
#if (defined(__GNUC__) || defined(AIXPPC) || defined(J9ZTPF)) && !defined(J9ZOS390) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment regarding |
||
#if defined(OSX) | ||
/*Use _key for OSX*/ | ||
if (buf.sem_perm._key != controlinfo->ftok_key) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ | |
* The RSM Internal Table (RIT) reached from the `ritp' address field in PVT. The | ||
* field of interest here is the total amount of online storage. | ||
*/ | ||
typedef _Packed struct J9RIT { | ||
typedef struct __attribute__((packed)) J9RIT { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, do xlc and OpenXL attach the same meaning to this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They do have the same meaning as per discussing internally with Sean from the cpp team. I did inquire if we have any published/public documentation for this, but I dont think they have a dedicated page regarding this particular suggestion/tweak. To quote part of our discussions:
typedef struct S _Packed {
char c;
int i;
} S;
S s1;
struct S s2;
|
||
uint8_t ritFiller1[296]; /**< 0:296 Fields irrelevant to our current purpose. */ | ||
uint64_t rittos; /**< 296:8 The total amount of online storage at IPL */ | ||
/**< Ignore rest of the fields in RIT. */ | ||
|
@@ -58,7 +58,7 @@ typedef _Packed struct J9RIT { | |
* The Page Vector Table (PVT). Reached from the virtual address found at offset 356 of | ||
* CVT. | ||
*/ | ||
typedef _Packed struct J9PVT { | ||
typedef struct __attribute__((packed)) J9PVT { | ||
uint8_t pvtFiller1[4]; /**< 0:4 PVT Control Block Identifier 'PVT' */ | ||
J9RIT *__ptr32 pvtritp; /**< 4:4 Address of the start of RSM Internal Table (RIT) */ | ||
/**< Ignore rest of the fields in PVT. */ | ||
|
@@ -73,7 +73,7 @@ typedef _Packed struct J9PVT { | |
* CCVCPUCT - No of online CPUs | ||
* CCVUTILP - System CPU utilization | ||
*/ | ||
typedef _Packed struct J9CCT { | ||
typedef struct __attribute__((packed)) J9CCT { | ||
uint8_t cctFiller1[72]; /**< 0:72 Ignore fields not relevant to current implementation */ | ||
uint32_t ccvrbswt; /**< 72:4 Recent base system wait time */ | ||
uint8_t cctFiller2[4]; /**< 76:4 Ignore fields not relevant to current implementation */ | ||
|
@@ -91,7 +91,7 @@ typedef _Packed struct J9CCT { | |
* Fields of interest: | ||
* RMCTCCT - CPU Management Control Table | ||
*/ | ||
typedef _Packed struct J9RMCT { | ||
typedef struct __attribute__((packed)) J9RMCT { | ||
uint8_t rmctname[4]; /**< 0:4 Block Identification */ | ||
J9CCT *__ptr32 rmctcct; /**< 4:4 CPU Management Control Table */ | ||
/**< Ignore rest of the RMCT */ | ||
|
@@ -106,7 +106,7 @@ typedef _Packed struct J9RMCT { | |
* ASMNVSC - Count of non-VIO allocated slots | ||
* ASMERRS - Count of bad slots | ||
*/ | ||
typedef _Packed struct J9ASMVT { | ||
typedef struct __attribute__((packed)) J9ASMVT { | ||
uint8_t asmvtFiller1[112]; /**< 0:112 Ignore fields not relevant to current implementation */ | ||
uint32_t asmslots; /**< 112:4 Count of total local slots in all open local page data sets */ | ||
uint32_t asmvsc; /**< 116:4 Count of total local slots allocated to VIO private area pages */ | ||
|
@@ -122,7 +122,7 @@ typedef _Packed struct J9ASMVT { | |
* RCEPOOL - No of frames currently available to system | ||
* RCEAFC - Total no of frames currently on all available frame queues | ||
*/ | ||
typedef _Packed struct J9RCE { | ||
typedef struct __attribute__((packed)) J9RCE { | ||
uint8_t rceid[4]; /**< 0:4 RCE control block Id */ | ||
int32_t rcepool; /**< 4:4 No of frames currently available to system */ | ||
uint8_t rceFiller1[128]; /**< 8:128 Ignore fields not relevant to current implementation */ | ||
|
@@ -140,7 +140,7 @@ typedef _Packed struct J9RCE { | |
* CVTASMVT - Pointer to auxiliary storage management vector table (ASMVT) | ||
* CVTRCEP - Address of the RSM Control & Enumeration Area | ||
*/ | ||
typedef _Packed struct J9CVT { | ||
typedef struct __attribute__((packed)) J9CVT { | ||
uint8_t cvtFiller1[356]; /**< 0:356 Ignore fields not relevant to current implementation */ | ||
J9PVT *__ptr32 cvtpvtp; /**< 356:4 Address of Page Vector Table (PVT). */ | ||
uint8_t cvtFiller2[244]; /**< 360:244 Ignore fields not relevant to current implementation */ | ||
|
@@ -160,7 +160,7 @@ typedef _Packed struct J9CVT { | |
* Fields of interest: | ||
* FLCCVT - Address of CVT after IPL | ||
*/ | ||
typedef _Packed struct J9PSA { | ||
typedef struct __attribute__((packed)) J9PSA { | ||
uint8_t psaFiller1[16]; /**< 0:16 Ignore 16 bytes before CVT pointer */ | ||
J9CVT *__ptr32 flccvt; /**< 16:4 Address of CVT after IPL */ | ||
/**< Ignore rest of the PSA */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is within an
extern "C"
block, so none of the uses of__THROW
below seem appropriate.The macro definition, and its uses here and in
omrsig.cpp
should just be removed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is extern "C" only if
__cplusplus
is defined right?And if that is the case, the it is safe to remove the define instances below entirely?
L35:
#define __THROW
Snippet L35:37
And what does that mean for these below where __THROW is being used, does the "__THROW" part need to be removed specifically from every line? https://github.com/eclipse/omr/blob/c256823419b4579cf64f94072337fa108f1761f9/include_core/omrsig.h#L104-L115
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definitions of
__THROW
should be removed as well as all uses.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks Ill remove these, and from
omrsig.cpp
as well, will need somebody to help me run/issue a jenkins build for macos/windows as well, to verify that it doesnt impact and is all good.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get these errors when removing the specifications:
This being shown for all 5 functions defined in omrsig.cpp with
__THROW
(probably more errors if not just zos, as some might be not defined on zos)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are declared within an
extern "C" { }
block; C functions don't (can't) havethrow()
specifications.If you preprocess
omrsig.cpp
, do you see an ealier declaration of these functions?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definition of the signal handler in
omrsig.cpp
should be qualified withextern "C"
. One might expect that it would be sufficient that the declaration appears within theextern "C"
block beginning on line 45, but apparently not: That is something we should bring to the attention of the compiler team.The suppression of warnings on Windows suggest to me that the declaration of
signal
is wrong there as well.