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

Add windows implementation for jcmd System.map and System.dump_map

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 24
    • 24
    • hotspot
    • b16
    • windows

    Description

      Provide a Windows implementation based on VirtualQuery.

      Porter hints:

      See what we do in linux (os/linux/memMapPrinter_linux.cpp and os/linux/procMapsParser.cpp). One would probably copy at least the former over to os/windows, then re-implement parts as needed. Instead of scanning /proc/self/smaps, one would call VirtualQuery, starting at 0, and then "feel" ones way upward through the address space.

      Use e.g. os::print_memory_mappings in os_windows.cpp for inspiration - not sure if that could be re-used, but that one could at least serve as a blueprint.

      Some parts of the Linux implementation cannot be translated, of course (e.g. the Linux-specific mapping info like page size or similar). But at least "reserved" and "committed" states printing should be doable.

      One also needs to activate some common code paths than handle System.map for all platforms, or at least for Windows+Linux. (There is a complementary "Implement System.map on MacOS" issue, but it had found no takers so far, so we closed it. It is also subjectively less important than Windows and Linux)

      Attachments

        Issue Links

          Activity

            People

              stooke Simon Tooke
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: