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

Remove Interpreter TOS optimization

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 10
    • 9
    • hotspot
    • None

      The template interpreter TOS optimization creates a bytecode dispatch table for each of the 9 TosStates. Each bytecode template generates a different entry point for 6 of these states.

      For safepointing, the jvm *copies* a safepoint table to each of these 9 tables, ie one per TosState. This has unknown cost of getting to a safepoint (should be measured).

      Since the TOS optimization only prevents code from being written to the stack vs. holding in a register for certain common bytecode patterns, it is unclear with modern architectures, how useful this optimization is. And how useful this optimization is with TieredCompilation, where C1 quickly compiles hot methods.

      We should measure this optimization with -Xint, and without to see what value this optimization has on our current platforms.

      The benefits to remove this code is that we have less static code in the interpreter, the interpreter templates would be easier to debug(but not often debugged anymore), reduced time to safepoint if the table copies aren't being made, and lastly, makes new bytecode development and additional code for valhalla simpler (please fill in Fred).

            mockner Max Ockner (Inactive)
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: