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 6775221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:52:52+00:00 2026-05-26T15:52:52+00:00

I’ve been experimenting with jmap -histo and jmap -dump today When run in this

  • 0

I’ve been experimenting with jmap -histo and jmap -dump today

When run in this sequence

jmap -dump:format=b,file=heap.1 [pid]
jmap -dump:live,format=b,file=heap.2 [pid]
jmap -dump:format=b,file=heap.3 [pid]

heap.3 resembles heap.2 more than heap.1. In particular, the “dead” objects that I’m interested in in heap.1 are absent from heap.3.

Seeing this, I started looking for documentation that would tell me what I should expect. The closest I managed to get was this discussion, where the comments from briand and alanb imply that in practice I can expect this GC to occur when I use the live option; but the answers are five years old, and posts to a forum seem a bit informal for a specification.

Where can I find the current behavior documented?

  • 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-26T15:52:52+00:00Added an answer on May 26, 2026 at 3:52 pm

    In order to determine liveness, Java has to run full GC, so yes, it does.


    To put the question to sleep… here is the answer, if anyone needs to dig deeper. Feel free.

    part of /hotspot/agent/src/share/vm/services/attachListener.cpp taken from

    openjdk http://download.java.net/openjdk/jdk7/
    and you must accept http://www.gnu.org/licenses/gpl-2.0.html

    // Implementation of "inspectheap" command
    //
    // Input arguments :-
    //   arg0: "-live" or "-all"
    static jint heap_inspection(AttachOperation* op, outputStream* out) {
      bool live_objects_only = true;   // default is true to retain the behavior before this change is made
      const char* arg0 = op->arg(0);
      if (arg0 != NULL && (strlen(arg0) > 0)) {
        if (strcmp(arg0, "-all") != 0 && strcmp(arg0, "-live") != 0) {
          out->print_cr("Invalid argument to inspectheap operation: %s", arg0);
          return JNI_ERR;
        }
        live_objects_only = strcmp(arg0, "-live") == 0;
      }
      VM_GC_HeapInspection heapop(out, live_objects_only /* request full gc */, true /* need_prologue */);
      VMThread::execute(&heapop);
      return JNI_OK;
    }
    

    in vmGCOperations.hpp it’s the definition

    `VM_GC_HeapInspection(outputStream* out, bool request_full_gc,
                       bool need_prologue) :`
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.