Skip to content

Commit

Permalink
Merge pull request #15561 from tajila/criu4
Browse files Browse the repository at this point in the history
Add DDR support for known method attributes
  • Loading branch information
keithc-ca committed Aug 8, 2022
2 parents fd3d5d0 + 38702dd commit 6334b31
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Expand Up @@ -34,6 +34,9 @@

CLimits.USHRT_MAX = 0xFFFF

J9CfrClassFile.CFR_METHOD_EXT_HAS_SCOPED_ANNOTATION = 0
J9CfrClassFile.CFR_METHOD_EXT_NOT_CHECKPOINT_SAFE_ANNOTATION = 0

J9ConstantPool.J9CPTYPE_CONSTANT_DYNAMIC = -1
J9ConstantPool.J9CPTYPE_INTERFACE_INSTANCE_METHOD = -1
J9ConstantPool.J9CPTYPE_INTERFACE_STATIC_METHOD = -1
Expand Down
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2001, 2021 IBM Corp. and others
* Copyright (c) 2001, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -122,6 +122,9 @@ public static void j9bcutil_dumpRomMethod(PrintStream out, J9ROMMethodPointer ro
out.append(String.format(" Access Flags (%s): ", Long.toHexString(romMethod.modifiers().longValue())));
dumpModifiers(out, romMethod.modifiers().longValue(), MODIFIERSOURCE_METHOD, INCLUDE_INTERNAL_MODIFIERS);
out.append(nl);
out.append(" Internal Attribute Flags:");
dumpMethodJ9Modifiers(out, romMethod.modifiers(), J9ROMMethodHelper.getExtendedModifiersDataFromROMMethod(romMethod));
out.append(nl);
out.append(" Max Stack: " + romMethod.maxStack().longValue() + nl);

if (J9ROMMethodHelper.hasExceptionInfo(romMethod)) {
Expand Down Expand Up @@ -728,6 +731,21 @@ private static void dumpClassJ9ExtraModifiers(PrintStream out, long accessFlags)
out.append("(sealed) ");
}

private static void dumpMethodJ9Modifiers(PrintStream out, UDATA modifiers, UDATA extraModifiers) {
if (modifiers.allBitsIn(J9JavaAccessFlags.J9AccMethodCallerSensitive)) {
out.append(" @CallerSensitive");
}
if (modifiers.allBitsIn(J9JavaAccessFlags.J9AccMethodFrameIteratorSkip)) {
out.append(" @FrameIteratorSkip");
}
if (extraModifiers.allBitsIn(J9CfrClassFile.CFR_METHOD_EXT_NOT_CHECKPOINT_SAFE_ANNOTATION)) {
out.append(" @NotCheckpointSafe");
}
if (extraModifiers.allBitsIn(J9CfrClassFile.CFR_METHOD_EXT_HAS_SCOPED_ANNOTATION)) {
out.append(" @Scoped");
}
}

private static void dumpEnclosingMethod(PrintStream out, J9ROMClassPointer romClass, long flags) throws CorruptDataException {
J9EnclosingObjectPointer enclosingMethodForROMClass = OptInfo.getEnclosingMethodForROMClass(romClass);
if (!enclosingMethodForROMClass.isNull()) {
Expand Down

0 comments on commit 6334b31

Please sign in to comment.