Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8277216

Examine InstanceKlass::_misc_flags for concurrency issues

    XMLWordPrintable

Details

    • b03

    Description

      The _misc flags are set via OR operations which aren't safe to do concurrently. We should make setting these flags safe. Besides linked-to bug, there aren't any known bugs with them right now.

      Atomically set all of them? Most are set during classfile parsing or loading.

          _misc_rewritten -> set during linking with exclusive access
          _misc_has_nonstatic_fields -> classfile parsing
          _misc_should_verify_class -> classfile parsing
          _misc_unused -> not used
          _misc_is_contended -> classfile parsing
          _misc_has_nonstatic_concrete_methods -> classfile parsing
          _misc_declares_nonstatic_concrete_methods -> classfile parsing
          _misc_has_been_redefined -> set in a redefinition safepoint
          _misc_shared_loading_failed -> set during class loading (exclusive access to InstanceKlass?)
          _misc_is_scratch_class -> set during the redefinition safepoint
          _misc_is_shared_boot_class -> assign_class_loader_type() calls at a safepoint for CDS
          _misc_is_shared_platform_class "
          _misc_is_shared_app_class "
          _misc_has_resolved_methods -> This is unsafe and called during linkResolver
          _misc_has_contended_annotations -> classfile parsing

      Maybe has_resolved_methods should be moved to AccessFlags for atomic setting.

      Attachments

        Issue Links

          Activity

            People

              coleenp Coleen Phillimore
              coleenp Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: