Eclipse Easter Egg: Heap Monitor

Here is a nice little Easter Egg. OK, not exactly, since you do have to download it by itself. But it is written by the Platform UI Team and if Eclipse weren’t so darn pluggable, it probably would be included. I mean, there’s a flight simulator in Microsoft Excel! But since Eclipse is so pluggable (hmmm I wonder if anyone is working on a flight simulator plug-in), you get to use the built-in Update Manager to get…

…the Eclipse Heap Monitor. (Well, that’s my name for it. The official name is the Heap Status plug-in.)

I’m a former IntelliJ user and this is one of those things that I miss. It gives me a nice indication of how much memory I’ve got to work with. Also, with big projects, you can see if maybe you need to increase your initial and maximum heap sizes. And if you like, you can always press the Trash button to collect the garbage.

Here’s the install instructions as well as the official description from the “(Platform) UI Component Development Resources” page:

The Heap Status plug-in shows the current Java heap usage in the status line (total heap and amount used). A button allows you to force a garbage collect. It includes a preference page (Window > Preferences > Workbench > Memory Indicator) which lets you turn it on and off. This plug-in works on Eclipse 2.1, 3.0, 3.0.1 and 3.1.

The Heap Status plug-in can be obtained via the Platform UI team’s update site.
Use Help > Software Updates > Find and Install > Search for new features to install > New Remote Site, and give the following as the URL.

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-ui-home/updates

When prompted, choose Yes to restart. If you don’t see the status indicator in the status line, or if the preference page is missing, restart eclipse with the -clean command line option.

Please report any problems to the Platform UI component in bugzilla.

8 Replies to “Eclipse Easter Egg: Heap Monitor”

  1. Funny, I was using 3.1M6 with -debug and I didn’t get the heap status. I had to download the plugin to get it.

    Very neat though!

  2. Its a cool plugin. We have been using for quite a while. Round about 200 users… a real good feedback mechanism.

  3. Its a cool plugin. We have been using for quite a while. Round about 200 users… a real good feedback mechanism.

  4. Place this content as a “.options” file where you installed Eclipse and you’ll get the same result:

    # The following .options file will enable the Heap Status indicator and also make
    # Eclipse print out a message whenever it does an idle garbage collect.
    # These .options values will print info to standard
    # output when gc occurs:

    org.eclipse.ui.ide/debug=true
    org.eclipse.ui.ide/debug/gc=true

    # And these options will turn on the heap usage view
    # in the status line:

    org.eclipse.ui/perf/showHeapStatus=true

    # By Fernando: you should specify the “-debug” option when initiating Eclipse for these options to take effect

  5. Just a little update…
    In Eclipse 3.2 with/without running it in debug mode, there’s the option
    in Window>Preferences>General
    check “Show Heap Status”

Comments are closed.