Thursday, 16 August 2018

jmap: prints the list of shared objects loaded

Command ‘jmap {PROCESS_ID}’ prints list of shared objects loaded.

HelloWorld.java
public class HelloWorld {
 public static void main(String args[]) throws Exception {
  int count = 0;
  
  Thread t1 = new Thread() {
   public void run() {
    while(true){
     try{
      Thread.sleep(2000);
     }catch(Exception e){
      
     }
    }
   }
  };

  t1.start();
 }
}

Compile and run HelloWorld.java application.

Open command prompt and execute jcmd.

C:\>jcmd
21488 HelloWorld
22928 sun.tools.jcmd.JCmd
18612

As you see the output of jcmd command, HelloWorld application is running with process id 21488.

Execute the command jmap 21488 to print list of loaded shared objects.

C:\>jmap 21488
Attaching to process ID 21488, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.171-b11
0x000000001faa0000      20704K  C:\WINDOWS\System32\SHELL32.dll
0x0000000074f00000      8832K   C:\Program Files\Java\jdk1.8.0_171\jre\bin\server\jvm.dll
0x0000000076800000      840K    C:\Program Files\Java\jdk1.8.0_171\jre\bin\msvcr100.dll
0x0000000076ce0000      88K     C:\Program Files\Java\jdk1.8.0_171\jre\bin\zip.dll
0x0000000076d00000      164K    C:\Program Files\Java\jdk1.8.0_171\jre\bin\java.dll
0x0000000076d30000      60K     C:\Program Files\Java\jdk1.8.0_171\jre\bin\verify.dll
0x0000000076e70000      48K     C:\Program Files\McAfee\Endpoint Security\Threat Prevention\Ips\EpMPThe.dll
0x00007ff6d9720000      220K    C:\Program Files\Java\jdk1.8.0_171\bin\java.exe
0x00007ffccacf0000      700K    C:\Program Files\McAfee\Endpoint Security\Threat Prevention\Ips\EpMPApi.dll
0x00007ffce5620000      2468K   C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.16299.547_none_15cdd76c936033f5\COMCTL32.dll
0x00007ffce8790000      168K    C:\WINDOWS\SYSTEM32\WINMMBASE.dll
0x00007ffce87f0000      140K    C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007ffce8b40000      36K     C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007ffce8b80000      40K     C:\WINDOWS\SYSTEM32\VERSION.dll
0x00007ffcf1230000      108K    C:\WINDOWS\System32\profapi.dll
0x00007ffcf1250000      304K    C:\WINDOWS\System32\powrprof.dll
0x00007ffcf12a0000      72K     C:\WINDOWS\System32\MSASN1.dll
0x00007ffcf12c0000      68K     C:\WINDOWS\System32\kernel.appcore.dll
0x00007ffcf1390000      980K    C:\WINDOWS\System32\ucrtbase.dll
0x00007ffcf1490000      128K    C:\WINDOWS\System32\win32u.dll
0x00007ffcf14b0000      7452K   C:\WINDOWS\System32\windows.storage.dll
0x00007ffcf1c00000      296K    C:\WINDOWS\System32\cfgmgr32.dll
0x00007ffcf1c50000      456K    C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007ffcf1cd0000      620K    C:\WINDOWS\System32\msvcp_win.dll
0x00007ffcf1d70000      2456K   C:\WINDOWS\System32\KERNELBASE.dll
0x00007ffcf1fe0000      1848K   C:\WINDOWS\System32\CRYPT32.dll
0x00007ffcf21b0000      1612K   C:\WINDOWS\System32\gdi32full.dll
0x00007ffcf2350000      352K    C:\WINDOWS\System32\WINTRUST.dll
0x00007ffcf23b0000      324K    C:\WINDOWS\System32\shlwapi.dll
0x00007ffcf2410000      32K     C:\WINDOWS\System32\PSAPI.DLL
0x00007ffcf2c10000      3100K   C:\WINDOWS\System32\combase.dll
0x00007ffcf2f20000      644K    C:\WINDOWS\System32\ADVAPI32.dll
0x00007ffcf31b0000      664K    C:\WINDOWS\System32\shcore.dll
0x00007ffcf3260000      628K    C:\WINDOWS\System32\msvcrt.dll
0x00007ffcf3300000      364K    C:\WINDOWS\System32\sechost.dll
0x00007ffcf3360000      160K    C:\WINDOWS\System32\GDI32.dll
0x00007ffcf3500000      1596K   C:\WINDOWS\System32\USER32.dll
0x00007ffcf3690000      1148K   C:\WINDOWS\System32\RPCRT4.dll
0x00007ffcf3810000      180K    C:\WINDOWS\System32\IMM32.DLL
0x00007ffcf3950000      432K    C:\WINDOWS\System32\WS2_32.dll
0x00007ffcf39c0000      696K    C:\WINDOWS\System32\KERNEL32.DLL
0x00007ffcf4ee0000      1920K   C:\WINDOWS\SYSTEM32\ntdll.dll



Previous                                                 Next                                                 Home

No comments:

Post a Comment