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

Refactor Hotspot container detection code

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 21
    • hotspot
    • generic
    • linux

    Description

      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-8293200 is harder.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: