Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 508789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:56:37+00:00 2026-05-13T06:56:37+00:00

How do I compare memory heap dumps in Netbeans? What I have done is

  • 0

How do I compare memory heap dumps in Netbeans?

What I have done is to configure my project to use profiling, then added several profiling points at chosen lines of code (similar to setting breakpoints). These profiling points trigger a "snapshot", which creates a memory dump.

As my application is running, the profiling tab lists each of the profiling points, and marks the number of hits it has encounteed, providing a link to open a report for that profiling point. In addition, the profiler control panel adds the new snapshots to a list.

If I open these reports and follow the links, or open the snapshots from the control panel, in both cases, Netbeans opens a snapshot tab with Summary, Classes, Instances and OQL subscreens.

If I select one of them from the Profiler control panel, and press save, the file gets saved in HPROF format.

If I select the menu Profile --> Compare Memory Snapshots, it only allows me to select NPS format files, of which I cannot obtain any.

I believe Compare Memory Snapshots sounds like it should be able to compare heap dumps, but I cannot figure out how to do it.

Questions

  • Where is Netbeans putting the NPS files (if it is indeed creating them)? If not how do I get Netbeans to create NPS files triggered from profiling points?

  • Is there a way to get Netbeans to compare HPROF files, since that is the memory heap dump after all?

  • Or am I simply completely overlooking something altogether?

Thanks!


Background

Using Netbeans 6.7.1.

I am doing memory profiling for a really large & complex application that has a memory leak problem. I have managed to solve large chunks of the leaks using a combination of Netbeans’ profiler & JHAT (command line util that comes with JDK). It’s the remaining stragglers that I need a more powerful heap analysis capabilities for – the
hypothesis-first approach that worked previously is becoming decreasingly effective.

This question’s really specific, for more background see a question I have asked previously.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:56:38+00:00Added an answer on May 13, 2026 at 6:56 am

    Unfortunately, I was not asking for recommendations on other tools which can do this.

    I have since found that Netbeans does indeed support comparison of memory heap dumps, but only indirectly. Edit the profiling points such that the "Snapshot" is selected over "heap". This means that Netbeans will produce a .nps file instead of a .hprof file.

    The .nps file is Netbean’s own proprietary file format, whereas .hprof is the "universal" heap dump format, understood by almost all profiling tools, including JHAT, MAT & Netbeans.

    However, the limitation with Netbeans is that it can look at .hprof files, and analyse them, but it cannot compare them to another .hprof file. It can, though, compare one .nps file to another .nps file. However the level of analysis available is limited with .nps files, so that’s the trade-off.


    So, to answer my own questions:

    Where is Netbeans putting the NPS files (if it is indeed creating them)? If not how do I get Netbeans to create NPS files triggered from profiling points?

    • It is one or the other, you can only choose one per profiling point.

    Is there a way to get Netbeans to compare HPROF files, since that is the memory heap dump after all?

    • No. You cannot compare to HPROF’s. The only way to compare the memory at two different points in time appears to be to compare two NPS’es.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .net application where i want to use In-Memory data structure. Please
Is it possible to compare whole memory regions in a single processor cycle? More
How does the memory usage of php/apache and asp.net/iis compare as the number of
From a long time ago I have a memory which has stuck with me
I am trying to improve my understanding of memory barriers. Suppose we have a
I have been told to never use == for strings but for everything else
I am trying to compare the addresses of two variables in memory: chunk_t *old_chunk,
I would like to compare the maximum amount of heap a set of processes
I've been creating a temporary object stack- mainly for the use of heap-based STL
I tried to compare the constants and variables used in memory, but found a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.