Thursday, December 26, 2013

Java VisualVM - Working with Local Applications

When you start Java VisualVM, a node for each local Java application is displayed under the Local node in the Applications window. You can expand an application node to see the profiler snapshots, thread dumps and heap dumps of the application. Right-clicking an application node or sub-node invokes a popup menu enabling you to choose various actions.
Note: The list of local applications always includes Java VisualVM.
screenshot of VisualVM Applications window showing popup menu options
A local application node generally has the following items available in the popup menu.
  • Open. Opens the tab for the application in the main window where you can view application data.
  • Thread Dump. Takes a thread dump for the application.
  • Heap Dump. Takes a heap dump for the application.
  • Profile. Opens the Profiler sub-tab for the application where you can choose to profile the application. (Note that even though Java VisualVM appears in the application tree, Java VisualVM cannot profile itself).
  • Profiler Snapshot. Creates a snapshot of the results from the profiling session. The snapshot opens in the main window and a node for the snapshot appears under the application node. This command is only available when Java VisualVM is profiling the application.
  • Application Snapshot. Creates an application snapshot containing all application dumps and snapshots. A node for the application snapshot appears under the Snapshots node.
  • Enable Heap Dump on OOME. Select this if you want Java VisualVM to automatically take a heap dump when the application encounters an OutOfMemoryException.
You can perform the following tasks directly from the popup menu.
View Application Data
Java VisualVM displays data about each running local application in a dedicated tab in the main window. Each application tab has sub-tabs where information about that application is displayed.
To open the application tab, right-click the application node in the Applications window and choose Open. (Alternatively, double-click the application node.) When you click Open, the Overview tab of the application tab opens in the main window.
The application tab for a local application has the following sub-tabs:
Additional tabs and sub-tabs may be visible depending on the installed plugins.
Take a Thread Dump
You can use Java VisualVM to take a thread dump to capture information about the active application threads at the time you take the thread dump. When you take a thread dump, the thread dump opens in a sub-tab of the application in the main window. A node for the thread dump appears under the application node in the Applications window.
You can take a thread dump in the following ways:
  • Right-click the application node in the Applications window and choose Thread Dump.
  • Click the Thread Dump button in the Threads tab of the application tab.
When you take a thread dump, the thread dump opens in a sub-tab of the application in the main window. A node for the thread dump appears under the application node.
For more about working with application threads, see the following document:
Take a Heap Dump
You can take a heap dump of a local application to capture a snapshot of the objects on the heap.
You can take a heap dump in the following ways:
  • Right-click the application node in the Applications window and choose Heap Dump.
  • Click the Heap Dump button in the Monitor tab of the application tab.
When you take a heap dump, the heap dump opens in a sub-tab of the application in the main window. A node for the heap dump appears under the application node.
For more about working with the heap, see the following document:
Profile an Application
Java VisualVM includes a profiler that enables you to analyze the performance and memory usage of a local application. You can profile an application without restarting it. To start a profiling session, right-click the application node and choosing Profile from the popup menu to open the profiling tab.
Note: Java VisualVM cannot be used to Profile itself.
For more see the following document:
Take Snapshots
Java VisualVM enables you to take snapshots that capture application data at the time the snapshot is taken. You can save snapshots to your local system and then examine them later or send them to others.
Java VisualVM enables you to take the following types of snapshots:
  • Profiler snapshots. A profiler snapshot captures the profiling data at the moment the snapshot is takes. The snapshot is either a memory snapshot or a CPU snapshot. You can take a profiler snapshot only when you are profiling an application.
  • Application snapshots. An application snapshot is an archive that contains all the heap dumps, thread dumps and snapshots that are listed below the application node.
For more see the following document:


oakleyses said...

louis vuitton handbags, oakley sunglasses, louboutin, longchamp outlet, nike shoes, louis vuitton outlet stores, chanel handbags, burberry outlet, prada outlet, jordan shoes, tiffany and co, michael kors outlet, tory burch outlet, louis vuitton outlet, longchamp handbags, nike free, true religion jeans, michael kors outlet, kate spade outlet, polo ralph lauren outlet, tiffany and co, prada handbags, polo ralph lauren outlet, michael kors outlet, michael kors outlet, longchamp handbags, oakley sunglasses, ray ban sunglasses, kate spade handbags, burberry outlet, louis vuitton outlet, louboutin outlet, louboutin, coach factory outlet, air max, air max, coach outlet, gucci outlet, christian louboutin shoes, michael kors outlet, coach purses, ray ban sunglasses, michael kors outlet, louis vuitton, coach outlet store online, true religion jeans, oakley sunglasses cheap

oakleyses said...

ralph lauren, lululemon, air max, hollister, north face, nike air max, polo lacoste, vanessa bruno, timberland, vans pas cher, louboutin, louis vuitton, oakley pas cher, air max pas cher, nike roshe run, air max, true religion outlet, barbour, sac longchamp, air force, hollister, sac louis vuitton, nike free, polo ralph lauren, nike trainers, louis vuitton uk, nike roshe, sac hermes, longchamp, michael kors, sac burberry, sac guess, mulberry, new balance pas cher, converse pas cher, sac louis vuitton, hogan outlet, nike tn, north face, true religion outlet, ray ban pas cher, michael kors, air jordan, nike blazer, nike free pas cher, michael kors pas cher, abercrombie and fitch, ray ban sunglasses

oakleyses said...

mac cosmetics, mont blanc, marc jacobs, canada goose outlet, nike huarache, vans shoes, soccer jerseys, hollister, giuseppe zanotti, beats by dre, abercrombie and fitch, longchamp, insanity workout, celine handbags, bottega veneta, ghd, nfl jerseys, north face outlet, chi flat iron, ugg boots, birkin bag, ugg australia, canada goose, herve leger, ugg pas cher, rolex watches, valentino shoes, canada goose uk, canada goose, ferragamo shoes, canada goose, ugg boots, uggs outlet, north face jackets, soccer shoes, asics running shoes, new balance shoes, p90x, lululemon outlet, canada goose jackets, mcm handbags, instyler, babyliss pro, ugg, wedding dresses, jimmy choo outlet, reebok outlet, nike roshe run

oakleyses said...

parajumpers, karen millen, air max, converse, pandora charms, moncler, louboutin, moncler, links of london, lancel, juicy couture outlet, oakley, hollister, pandora charms, supra shoes, thomas sabo, canada goose, gucci, wedding dresses, timberland boots, swarovski crystal, air max, coach outlet store online, moncler, ray ban, canada goose, moncler, ugg, louis vuitton, swarovski, hollister, montre homme, moncler, hollister clothing store, ralph lauren, rolex watches, moncler outlet, moncler, iphone 6 cases, baseball bats, juicy couture outlet, toms shoes, vans, pandora jewelry, ugg, converse shoes

Anna said...

Great and Useful Article.

Online Java Training

Online Java Course

Java EE course

Java Course in Chennai

Java Training in Chennai

Java Training Institutes in Chennai

Java Interview Questions

Java Interview Questions