Consolidate AOT Relocation Records#10545
Conversation
Remove the duplicated code that writes the TR_ValidateStackWalkerMaySkipFramesRecord relocation header information, and consolidate it in one canonical location. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Remove the duplicated code that writes the TR_ValidateClassInfoIsInitialized relocation header information, and consolidate it in one canonical location. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Remove the duplicated code that writes the TR_ValidateMethodFromSingleImplementer relocation header information, and consolidate it in one canonical location. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
|
@mstoodle could you please review? |
|
@mstoodle friendly review request reminder. |
2 similar comments
|
@mstoodle friendly review request reminder. |
|
@mstoodle friendly review request reminder. |
| } | ||
|
|
||
| void | ||
| TR_RelocationRecordValidateMethodFromSingleImpl::setCpIndexOrVftSlot(TR_RelocationTarget *reloTarget, int32_t cpIndexOrVftSlot) |
There was a problem hiding this comment.
I would prefer individual setCpIndex() and setVftSlot() setters, which can store to a field called _cpIndexOrVftSlot. Is there any way these could validate that cpIndex() is only called when setCpIndex() was used, and vftSlot() / setVtfSlot(), respectively? But I guess that's not easy to do since the relo record is set via the svmRecord which also uses the setCpIndexOrVftSlot() approach. Plus the print() guy becomes more troublesome too.
Does it need to be this way?
There was a problem hiding this comment.
The cpIndexOrVftSlot comes from
TR_PersistentCHTable::findSingleImplementer(
TR_OpaqueClassBlock * thisClass,
int32_t cpIndexOrVftSlot,
TR_ResolvedMethod * callerMethod,
TR::Compilation * comp,
bool locked,
TR_YesNoMaybe useGetResolvedInterfaceMethod,
bool validate)
so it's not that the validation record is used for two different use cases, but rather, the query it is validating happens to either pass in a cpIndex or vftSlot.
Remove the duplicated code that writes the TR_ValidateMethodFromSingleInterfaceImplementer relocation header information, and consolidate it in one canonical location. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Remove the duplicated code that writes the TR_ValidateMethodFromSingleAbstractImplementer relocation header information, and consolidate it in one canonical location. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Remove the duplicated code that writes the TR_ValidateImproperInterfaceMethodFromCP relocation header information, and consolidate it in one canonical location. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Remove the duplicated code that writes the TR_SymbolFromManager relocation header information, and consolidate it in one canonical location. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Remove the duplicated code that writes the TR_ResolvedTrampolines relocation header information, and consolidate it in one canonical location. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
0c5433d to
3a06643
Compare
|
@mstoodle do the updated changes look ok to you? |
|
jenkins test sanity all jdk8,jdk11 |
#4803