# Path to GC Roots

Find out who is keeping alive a single object.
Copyright (c) 2008, 2020 SAP AG and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html

# Motivation

Having found an expensive object it is then important to find all the reasons it is kept alive.

# Arguments

Argument
Description
object
One object for which the paths to GC roots should be found.
-excludes
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 `class name pattern`[:`field name`[,`field name`]*]. Subclasses of the class are also included. If no field names are specified for the class then all fields are excluded.
-numberofpaths
The number of different paths to be displayed.

# Result

With the arrows in each icon points up and to the left, showing that the field in bold of the object of a line actually refers to the preceding object in the tree view which is up and to the left.