Skip to content
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

Reorder j9javaaccessflags.h and remove unused flags #17788

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

theresa-m
Copy link
Contributor

@theresa-m theresa-m commented Jul 13, 2023

  • Reorganized these values to be more readable
  • Deleted the unused values:
    #define J9AccMandated 0x8000
    #define J9AccClassReferenceShift 0x1C
    #define J9AccClassUnused400 0x400 <-- I don't think these placeholders are really helping anyone
    #define J9AccClassUnused200 0x200

Related to #17785

@theresa-m theresa-m force-pushed the refactoraccessflags branch 2 times, most recently from 45a4865 to 8b79242 Compare July 13, 2023 20:48
@theresa-m theresa-m changed the title Refactoraccessflags Reorder j9javaaccessflags.h and remove unused flags Jul 13, 2023
@theresa-m theresa-m force-pushed the refactoraccessflags branch 2 times, most recently from 8cbc6c9 to f69d42d Compare July 13, 2023 20:52
@theresa-m theresa-m requested a review from keithc-ca July 13, 2023 20:58
@theresa-m theresa-m force-pushed the refactoraccessflags branch 2 times, most recently from 9847cd3 to 1ca2932 Compare July 14, 2023 14:47
#define J9AccStrict 0x800
#define J9AccSuper 0x20
#define J9AccSynchronized 0x20
#define J9AccSynthetic 0x1000
Copy link
Contributor

Choose a reason for hiding this comment

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

If J9AccSynthetic is removed from ROMClass->extraModifiers, you may want to modify this comment as well:

* + AccSynthetic (matches Oracle modifier position)

Copy link
Contributor

Choose a reason for hiding this comment

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

This comment has not been addressed.
Also, the indentation on line 1176 is wrong.

Copy link
Contributor

@keithc-ca keithc-ca Aug 3, 2023

Choose a reason for hiding this comment

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

Please correct the indentation of line 1176 of ROMClassBuilder.cpp (there should be one more space before +).

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd still like to see this fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey sorry I missed this, it should be fixed now.

@theresa-m theresa-m requested a review from keithc-ca July 20, 2023 18:25
@theresa-m
Copy link
Contributor Author

@keithc-ca do you have any more review comments for this?

@keithc-ca
Copy link
Contributor

@keithc-ca do you have any more review comments for this?

I was waiting for the changes you discussed in #17788 (comment) to appear here.

@theresa-m theresa-m force-pushed the refactoraccessflags branch from 1ca2932 to 59e474a Compare August 2, 2023 14:31
@theresa-m
Copy link
Contributor Author

Sorry - forgot to push. They should be there now.

@hangshao0
Copy link
Contributor

Can you include the change for this comment #17788 (comment) as well ?

@theresa-m theresa-m force-pushed the refactoraccessflags branch from 59e474a to fbc30d3 Compare August 2, 2023 15:44
#define J9AccStrict 0x800
#define J9AccSuper 0x20
#define J9AccSynchronized 0x20
#define J9AccSynthetic 0x1000
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment has not been addressed.
Also, the indentation on line 1176 is wrong.

@@ -76,7 +76,6 @@ TraceException=Trc_BCU_createRomClassEndian_CopyMethodsError Noenv Overhead=1 Le
TraceException=Trc_BCU_createRomClassEndian_CopyCPShapeError Noenv Overhead=1 Level=3 Template="BCU j9bcutil_createROMClassEndian: error occurred during copyCPShapeAndPreinitDataToROM. error=%d"
TraceException=Trc_BCU_createRomClassEndian_AnnotationError2 Noenv Overhead=1 Level=3 Template="BCU j9bcutil_createROMClassEndian: error occurred during buildAnnotationInfo. error=%d"
TraceException=Trc_BCU_createRomClassEndian_DebugInfoError2 Noenv Overhead=1 Level=3 Template="BCU j9bcutil_createROMClassEndian: error occurred during buildDebugInfo. error=%d"
TraceEvent=Trc_BCU_createRomClassEndian_Synthetic Noenv Overhead=1 Level=3 Template="BCU j9bcutil_createROMClassEndian: Setting J9AccSynthetic flag on ROMClass %p"
Copy link
Contributor

Choose a reason for hiding this comment

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

You can mark this tracepoint as Obsolete. We cannot remove trace point. Each trace point has an index with it. Removing this will change the index number of all the tracepoints below.

Copy link
Contributor

Choose a reason for hiding this comment

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

@theresa-m theresa-m force-pushed the refactoraccessflags branch from 4a4e118 to ce16de1 Compare August 3, 2023 15:03
- Reorganized these values to be more readable
- Deleted the unused values:
define J9AccMandated 0x8000
define J9AccClassReferenceShift 0x1C
define J9AccClassUnused400 0x400 <-- I don't think these placeholders are really helping anyone
define J9AccClassUnused200 0x200

Signed-off-by: Theresa Mammarella <[email protected]>
@theresa-m theresa-m force-pushed the refactoraccessflags branch 2 times, most recently from 7d5302d to 58be28c Compare August 16, 2023 14:00
@theresa-m theresa-m force-pushed the refactoraccessflags branch 2 times, most recently from 3250657 to 7e0b427 Compare August 16, 2023 17:29
#define J9AccForwarderMethod 0x00002000 /* method */
#define J9AccEnum 0x00004000 /* class field */
#define J9AccEmptyMethod 0x00004000 /* method */
/* ACC_MODULE reserves 0x8000 for classes*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Please insert a space before */.

Copy link
Contributor

Choose a reason for hiding this comment

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

As well as the missing space, perhaps 0x8000 should be 0x00008000 for consistency.

@keithc-ca
Copy link
Contributor

I also draw your attention to my comment (https://github.com/eclipse-openj9/openj9/pull/17788/files#r1296068401) requesting a small fix to ROMClassBuilder.cpp.

#define J9AccForwarderMethod 0x00002000 /* method */
#define J9AccEnum 0x00004000 /* class field */
#define J9AccEmptyMethod 0x00004000 /* method */
/* ACC_MODULE reserves 0x8000 for classes*/
Copy link
Contributor

Choose a reason for hiding this comment

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

As well as the missing space, perhaps 0x8000 should be 0x00008000 for consistency.

#define J9AccStrict 0x800
#define J9AccSuper 0x20
#define J9AccSynchronized 0x20
#define J9AccSynthetic 0x1000
Copy link
Contributor

Choose a reason for hiding this comment

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

@theresa-m theresa-m force-pushed the refactoraccessflags branch from 7e0b427 to e38881b Compare August 16, 2023 19:05
Signed-off-by: Theresa Mammarella <[email protected]>
@theresa-m theresa-m force-pushed the refactoraccessflags branch from e38881b to a0f0aed Compare August 16, 2023 19:08
@theresa-m
Copy link
Contributor Author

Thanks @keithc-ca, I have made changes from your latest comments.

@keithc-ca
Copy link
Contributor

Jenkins test sanity alinux64 jdk21

@keithc-ca keithc-ca merged commit 06a3948 into eclipse-openj9:master Aug 16, 2023
@theresa-m theresa-m deleted the refactoraccessflags branch September 13, 2023 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants