Skip to content

Comments

Consolidate AOT Relocation Records#10545

Merged
mstoodle merged 8 commits intoeclipse-openj9:masterfrom
dsouzai:aotConsolidateRecords
Oct 10, 2020
Merged

Consolidate AOT Relocation Records#10545
mstoodle merged 8 commits intoeclipse-openj9:masterfrom
dsouzai:aotConsolidateRecords

Conversation

@dsouzai
Copy link
Contributor

@dsouzai dsouzai commented Sep 9, 2020

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>
@dsouzai
Copy link
Contributor Author

dsouzai commented Sep 14, 2020

@mstoodle could you please review?

@dsouzai
Copy link
Contributor Author

dsouzai commented Sep 21, 2020

@mstoodle friendly review request reminder.

2 similar comments
@dsouzai
Copy link
Contributor Author

dsouzai commented Sep 28, 2020

@mstoodle friendly review request reminder.

@dsouzai
Copy link
Contributor Author

dsouzai commented Oct 5, 2020

@mstoodle friendly review request reminder.

}

void
TR_RelocationRecordValidateMethodFromSingleImpl::setCpIndexOrVftSlot(TR_RelocationTarget *reloTarget, int32_t cpIndexOrVftSlot)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@dsouzai dsouzai force-pushed the aotConsolidateRecords branch from 0c5433d to 3a06643 Compare October 6, 2020 16:24
@dsouzai
Copy link
Contributor Author

dsouzai commented Oct 6, 2020

@dsouzai
Copy link
Contributor Author

dsouzai commented Oct 8, 2020

@mstoodle do the updated changes look ok to you?

@mstoodle
Copy link
Contributor

mstoodle commented Oct 9, 2020

jenkins test sanity all jdk8,jdk11

Copy link
Contributor

@mstoodle mstoodle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me now. Thanks @dsouzai

@mstoodle mstoodle merged commit ad71f4f into eclipse-openj9:master Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants