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

memory barrier instructions emitted for "volatile" keyword way too heavy on IA32

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.0
    • hotspot
    • x86
    • generic

      On Sparc you apparently emit the appropriate memory barrier or "fence"
      instructions to prevent the processor from reordering load and store
      operations. On IA32, however, I think your memory barriers are way too
      heavy. You can get away with much cheaper memory barriers. You are
      basically making the volatile keyword a _very_ expensive construct with
      Hotspot (it is still pretty expensive but it shouldn't be that expensive).

      Give me a week or two and I can send you a micro-benchmark where I think I can
      explain what I mean.

            Unassigned Unassigned
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: