| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"> |
| <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| |
| <meta name="generator" content="DITA-OT" /><meta name="DC.type" content="reference" /> |
| <meta name="DC.title" content="Merge Shortest Paths" /> |
| <meta name="abstract" content="Find out who is keeping alive a set of objects." /> |
| <meta name="description" content="Find out who is keeping alive a set of objects." /> |
| <meta name="copyright" content="Copyright (c) 2020, 2023 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/ " type="primary" /> |
| <meta name="DC.rights.owner" content="Copyright (c) 2020, 2023 IBM Corporation. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/ " type="primary" /> |
| <meta name="DC.format" content="XHTML" /> |
| <meta name="DC.identifier" content="ref_inspections_path_to_gc_roots" /> |
| <meta name="DC.language" content="en-us" /> |
| <link rel="stylesheet" type="text/css" href="../../styles/commonltr.css" /> |
| <title>Merge Shortest Paths</title> |
| </head> |
| <body id="ref_inspections_path_to_gc_roots"> |
| |
| <h1 class="title topictitle1" id="ariaid-title1">Merge Shortest Paths</h1> |
| |
| |
| |
| |
| <div class="body refbody"><p class="shortdesc">Find out who is keeping alive a set of objects. |
| </p> |
| |
| <div class="section"><h2 class="title sectiontitle">Motivation</h2> |
| |
| <p class="p">Having found an expensive object it is then important to find all |
| the reasons it is kept alive. |
| </p> |
| |
| </div> |
| |
| <div class="section"><h2 class="title sectiontitle">Explanation</h2> |
| |
| <p class="p"> |
| Unlike the |
| <a class="xref" href="path_to_gc_roots.html" title="Find out who is keeping alive a single object.">Path to GC roots</a> |
| query, this query |
| can operate on multiple objects. |
| However, it only |
| finds the shortest path to GC roots; there may |
| be other paths, but |
| this query does not show them. |
| As it operates on multiple objects |
| there are multiple paths, |
| and the query has the option to merge |
| objects on a path by |
| class. |
| Seeing a common path can be useful in |
| understanding why a |
| set of objects is being kept alive. |
| </p> |
| |
| </div> |
| |
| <div class="section"><h2 class="title sectiontitle">Arguments</h2> |
| |
| <table cellpadding="4" cellspacing="0" summary="" border="1" class="simpletable"><col style="width:50%" /><col style="width:50%" /><thead><tr class="sthead"> |
| <th style="vertical-align:bottom;text-align:left;" id="d10637e63" class="stentry">Argument</th> |
| |
| <th style="vertical-align:bottom;text-align:left;" id="d10637e66" class="stentry">Description</th> |
| |
| </tr> |
| </thead><tbody><tr class="strow"> |
| <td style="vertical-align:top;" headers="d10637e63" class="stentry">objects</td> |
| |
| <td style="vertical-align:top;" headers="d10637e66" class="stentry">Objects for which paths to garbage collection roots should |
| be |
| found. |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d10637e63" class="stentry"> |
| <span class="keyword parmname">-excludes</span> |
| </td> |
| |
| <td style="vertical-align:top;" headers="d10637e66" class="stentry"> |
| Fields of certain classes which should be ignored when finding |
| paths. For example this allows paths through Weak or Soft |
| Reference referents to be ignored. |
| This is of the format |
| <var class="keyword varname">class name pattern</var> |
| [: |
| <var class="keyword varname">field name</var> |
| [, |
| <var class="keyword varname">field name</var> |
| ]*]. |
| Subclasses of the class are also included. |
| If no field names |
| are specified for the class then all fields are |
| excluded. |
| </td> |
| |
| </tr> |
| <tr class="strow"> |
| <td style="vertical-align:top;" headers="d10637e63" class="stentry"> |
| <span class="keyword parmname">-groupby</span> |
| </td> |
| |
| <td style="vertical-align:top;" headers="d10637e66" class="stentry"> |
| Whether to show: |
| <ul class="ul"> |
| <li class="li"> |
| <span class="keyword parmname">Merge Paths from GC Roots</span> |
| merged paths from garbage collection roots to the objects |
| </li> |
| |
| <li class="li"> |
| <span class="keyword parmname">Merge Paths from GC Roots on Class</span> |
| merged paths from garbage collection roots to the objects |
| grouped by class, so all objects of the same class are shown as |
| one |
| </li> |
| |
| <li class="li"> |
| <span class="keyword parmname">Merge to GC Roots on Class</span> |
| merged paths from the objects to garbage collection roots |
| grouped |
| by class, so all objects of the same class are shown as |
| one |
| </li> |
| |
| </ul> |
| |
| </td> |
| |
| </tr> |
| </tbody></table> |
| |
| </div> |
| |
| <div class="section" id="ref_inspections_path_to_gc_roots__result"><h2 class="title sectiontitle">Result</h2> |
| |
| <p class="p"> |
| The tree shows objects or sets of objects grouped by class on a path |
| to or from GC roots. |
| The |
| <span class="keyword wintitle">Referenced Objects</span> |
| column shows how many |
| of the objects supplied to this query are on a path through this |
| row. |
| </p> |
| |
| <p class="p">The context menu allows the objects on this segment of the path, |
| or the referenced objects through this path to be separately |
| examined with other queries. |
| </p> |
| |
| <span class="keyword wintitle">Merge shortest paths from GC roots</span> |
| <img class="image" src="../../mimes/merge_shortest_paths1.png" height="393" width="768" alt="Result of a merge shortest paths query, showing a tree view starting from GC roots." /> |
| <div class="note"><span class="notetitle">Note:</span> |
| With |
| <span class="keyword parmname">Merge Paths from GC Roots</span> |
| and |
| <span class="keyword parmname">Merge from GC Roots on Class</span> |
| the arrows in each |
| <a class="xref" href="../iconassist.html"> |
| <img class="image" src="../../mimes/i-horefbelow.png" alt="Icon of a piece of paper with an arrow at the bottom right pointing down and to the right." /> |
| icon |
| </a> |
| points down and to the right, showing |
| that the objects or objects of |
| a line refer via the field in |
| <strong class="ph b">bold</strong> |
| to the following object or objects in |
| the tree view which is down and |
| to the right. |
| The |
| <span class="keyword parmname">Merge from GC Roots on Class</span> |
| does |
| not show field names as different objects may refer to |
| the |
| following objects by different fields. |
| </div> |
| |
| <span class="keyword wintitle">Merge shortest paths from GC roots on class</span> |
| <img class="image" src="../../mimes/merge_shortest_paths2.png" height="418" width="675" alt="Result of a merge shortest paths query, showing a tree view starting from GC roots, but merged on classes." /> |
| <div class="note"><span class="notetitle">Note:</span> See the menu option to switch between the different <span class="keyword parmname">groupby</span> |
| options.</div> |
| |
| <span class="keyword wintitle">Merge shortest paths to GC roots on class</span> |
| <img class="image" src="../../mimes/merge_shortest_paths3.png" height="393" width="579" alt="Result of a merge shortest paths query, showing a tree view starting from the objects, merged on classes, going to GC roots." /> |
| <div class="note"><span class="notetitle">Note:</span> |
| With |
| <span class="keyword parmname">Merge to GC Roots on Class</span> |
| the arrows in each |
| <a class="xref" href="../iconassist.html"> |
| <img class="image" src="../../mimes/i-horefabove.png" alt="Icon of a piece of paper with an arrow at the top left pointing up and to the left." /> |
| icon |
| </a> |
| points up and to the left, showing |
| that the object or objects of a |
| line actually refer |
| to the preceding objects in |
| the tree view which is |
| up and to the left. |
| </div> |
| |
| </div> |
| |
| </div> |
| |
| </body> |
| </html> |