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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:08:11+00:00 2026-05-24T20:08:11+00:00

In Java profiling, it seems like all (free) roads nowadays lead to the VisualVM

  • 0

In Java profiling, it seems like all (free) roads nowadays lead to the VisualVM profiler included with JDK6. It looks like a fine program, and everyone touts how you can “attach it to a running process” as a major feature. The problem is, that seems to be the only way to use it on a local process. I want to be able to start my program in the profiler, and track its entire execution.

I have tried using the -Xrunjdwp option described in how to profile application startup with visualvm, but between the two transport methods (shared memory and server), neither is useful for me. VisualVM doesn’t seem to have any integration with the former, and VisualVM refuses to connect to localhost or 127.0.0.1, so the latter is no good either. I also tried inserting a simple read of System.in into my program to insert a pause in execution, but in that case VisualVM blocks until the read completes, and doesn’t allow you to start profiling until after execution is under way. I have also tried looking into the Eclipse plugin but the website is full of dead links and the launcher just crashes with a NullPointerException when I try to use it (this may no longer be accurate).

Coming from C, this doesn’t seem like a particularly difficult task to me. Am I just missing something or is this really an impossible request? I’m open to any kinds of suggestions, including using a different (also free) profiler, and I’m not averse to the command line.

  • 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-24T20:08:12+00:00Added an answer on May 24, 2026 at 8:08 pm

    Consider using HPROF and opening the data file with a tool like HPjmeter – or just reading the resulting text file in your favorite editor.

    Command used: javac -J-agentlib:hprof=heap=sites Hello.java
    
    SITES BEGIN (ordered by live bytes) Fri Oct 22 11:52:24 2004
              percent          live          alloc'ed  stack class  rank   self  accum     bytes objs     bytes  objs trace name
        1 44.73% 44.73%   1161280 14516  1161280 14516 302032 java.util.zip.ZipEntry
        2  8.95% 53.67%    232256 14516   232256 14516 302033 com.sun.tools.javac.util.List
        3  5.06% 58.74%    131504    2    131504     2 301029 com.sun.tools.javac.util.Name[]
        4  5.05% 63.79%    131088    1    131088     1 301030 byte[]
        5  5.05% 68.84%    131072    1    131072     1 301710 byte[]
    

    HPROF is capable of presenting CPU usage, heap allocation statistics,
    and monitor contention profiles. In addition, it can also report
    complete heap dumps and states of all the monitors and threads in the
    Java virtual machine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently began profiling an osgi java application that I am writing using VisualVM.
Is there any Java profiler that allows profiling short-lived applications? The profilers I found
I just installed Java 1.6_07 so I could try profiling with VisualVM. It tells
Is there any recommended Java application profiling tutorial? I am now using JProfiler and
while profiling a java application that calculates hierarchical clustering of thousands of elements I
Is there a Java package providing funcionality like the .Net System.Data namespace ? Specificaly
I'm trying to code an application which runs un different java platforms like J2SE,
My RMI enabled application seems to be leaking sockets. I have a Java application
I'm profiling a java application, and the largest number of the allocated objects have
I'd like to ask how I can profile REMOTELY a java application. For debugging

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.