RFR: 6810: Create treemap viewer for JOverflow [v10]

Kangcheng Xu kxu at openjdk.java.net
Thu Jun 25 18:56:54 UTC 2020


> This PR implements [JMC-6810: Create treemap viewer for JOverflow](https://bugs.openjdk.java.net/browse/JMC-6810). It
> adds a treemap displaying memory usage by classes. It makes easier to spot what is consuming most of the memory. Like
> JOverflow instance viewer, the treemap viewer utilizes the filtering feature provided by JOverflow.
> ![screen-shot](https://i.imgur.com/hTeNLtw.png)
> The treemap is not included in the building by default, therefore you'll need to manually enable the
> `org.openjdk.jmc.feature.joverflow.ext.treemap` feature explicitly. Once enabled, the treemap view part can be opened
> in *Window* -> *Show View* -> *Other* -> *JOverflow* -> *JOverflow Treemap*.
> ---
> 
> The treemap view part consists of three components: the toolbar actions, the breadcrumb, and the treemap. All three
> components are automatically updated when the JOverflow filter changes, or when a new JOverflow editor page becomes
> active.
>  
> ### Toolbar actions:
> 
> ![toobar-actions-screen-shot](https://i.imgur.com/kxbed1a.png)
> 
> Buttons are enabled and disabled automatically according to the state of the treemap.
> 
> - Zoom-in button: zoom-in to the selected node of the treemap
> - Zoom-out button: zoom-out to the parent node of the currently expanded node of the treemap
> - Zoom-off button: display the root node (ie. "[ROOT]" node)
> 
> ### Breadcrumb
> 
> ![breadcrumb-screen-shot](https://i.imgur.com/kpvWOcp.png)
> 
> The breadcrumb indicates the location of the currently expanded treemap node relative to the root. Breadcrumb entries
> are updated upon treemap expands/collapse. User interactions on the breadcrumb also updates the treemap.
> - Left mouse click: navigate to desired zooming level.
> 
> ### Treemap
> 
> ![treemap-screen-shot](https://i.imgur.com/W1JOPDV.png)
> 
> The treemap implements the squarified treemap algorithm. Memory usage is aggregated by class and package names. The
> larger the area, the more memory consumed by this class/package. Treemap nodes on different levels are labelled with
> different background colours. User interactions on the treemap also updates the breadcrumb.
> - Left mouse click: select and highlight the clicked node, allowing zooming-in with the toolbar button.
> - Middle mouse click: display the root node (ie. "[ROOT]" node)
> - Right mouse click: zoom-out to the parent node of the currently expanded node
> - Left mouse double click: zoom-in to the clicked node (or to its parent node if the clicked node is a leaf)
> - Mouse hover: displays the tooltip with the full qualified package/class name and the memory usage in a human-readable
>   format.
> 
> ---
> 
> Let me know what you think about the design and functionality. :)

Kangcheng Xu has updated the pull request incrementally with one additional commit since the last revision:

  remove package-private comments

-------------

Changes:
  - all: https://git.openjdk.java.net/jmc/pull/77/files
  - new: https://git.openjdk.java.net/jmc/pull/77/files/5f481538..aaaab0bb

Webrevs:
 - full: https://webrevs.openjdk.java.net/jmc/77/webrev.09
 - incr: https://webrevs.openjdk.java.net/jmc/77/webrev.08-09

  Stats: 12 lines in 8 files changed: 0 ins; 0 del; 12 mod
  Patch: https://git.openjdk.java.net/jmc/pull/77.diff
  Fetch: git fetch https://git.openjdk.java.net/jmc pull/77/head:pull/77

PR: https://git.openjdk.java.net/jmc/pull/77


More information about the jmc-dev mailing list