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

Refactor Hotspot container detection code

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 21
    • hotspot
    • b25
    • generic
    • linux

      Currently most of the metrics retrieval logic in Hotspot are implemented around the GET_CONTAINER_INFO macros and corresponding subsystem_file_line_contents() template.

      There are a couple of issues with this approach:
      - The macros aren't portable, as they use short-return for error cases
      - The macros only support string literals for some of its arguments. This prevents usage of the macros when the input isn't a string literal.
      - This combination of macro + template make the code harder to read and understand what's going on.

      On top of that they prevent further refactoring. For example, introducing generic helper functions for certain sanity checking like was done with JDK-8292083 is harder.

            sgehwolf Severin Gehwolf
            sgehwolf Severin Gehwolf
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: