Example session

This example session illustrates a selection of the commands available and their use.

In the example session, some lines have been removed for clarity (and terseness). Some comments (contained inside braces) are included to explain various aspects with some comments on individual lines looking like:

{ comment }

User input is prefaced by a ">".

{First, invoke DTFJView using the jdmpview launcher, passing in the name of a dump.}

> jdmpview -Xgcpolicy:metronome-core core.20081020.145957.32289.0001.dmp
DTFJView version 1.0.22, using DTFJ API version 1.3
Loading image from DTFJ...
For a list of commands, type "help"; for how to use "help", type "help help"


{the output produced by help is illustrated below}

>help

        info
         thread   displays information about Java and native threads
         system   displays information about the system the core dump is from
         class    prints inheritance chain and other data for a given class
         proc     displays threads, command line arguments, environment variables, 
                                                            and shared modules of current process
         jitm     displays JIT'ed methods and their addresses
         ls       outputs a list of available monitors and locked objects
         sym      outputs a list of available modules
         mmap     outputs a list of all memory segments in the address space
         heap     displays information about Java heaps
        hexdump   outputs a section of memory in a hexdump-like format
        +         displays the next section of memory in hexdump-like format
        -         displays the previous section of memory in hexdump-like format
        find      searches memory for a given string
        deadlock  displays information about deadlocks if there are any
        set
         logging  configures several logging-related parameters, starts/stops logging
        show
         logging  displays the current values of logging settings
        quit      exits the core file viewing tool
        whatis    gives information about what is stored at the given memory address
        cd        changes the current working directory, used for log files
        pwd       displays the current working directory
        findnext  finds the next instance of the last string passed to "find"
        findptr   searches memory for the given pointer
        help      displays list of commands or help for a specific command
        x/        works like "x/" in gdb (including use of defaults): passes number of items to display
                       and unit size ('b' for byte, 'h' for halfword, 'w' for word, 'g' for giant word)
                       to sub-command (ie. x/12bd)
         j        displays information about a particular object or all objects of a class
         d        displays the integer at the specified address
         x        displays the hex value of the bytes at the specified address
         k        displays the specified memory section as if it were a stack frame




{In jdmpview setting an output file could be done from the invocation, in DTFJView it must be 
                                                               done using the "set logging" command. }

> set logging file log.txt

        log file set to "log.txt"

> set logging on

        logging turned on; outputting to "/home/test/log.txt"

> show logging

        set_logging = on
        set_logging_file = "log.txt"
        set_logging_overwrite = off
        set_logging_redirect = off

        current_logging_file = "/home/test/log.txt"




>info thread   << Displays info on current thread. Use "info thread *" for information on all threads.


        native threads for address space # 0
         process id: 28836

          thread id: 28836
           registers:
            cs       = 0x00000073   ds       = 0x0000007b   eax      = 0x00000000   ebp      = 0xbfe32064
            ebx      = 0xb7e9e484   ecx      = 0x00000000   edi      = 0xbfe3245c   edx      = 0x00000002
            efl      = 0x00010296   eip      = 0xb7e89120   es       = 0xc010007b   esi      = 0xbfe32471
            esp      = 0xbfe31c2c   fs       = 0x00000000   gs       = 0x00000033   ss       = 0x0000007b
           stack sections:
            0xbfe1f000 to 0xbfe34000 (length 0x15000)
           stack frames:
            bp: 0xbfe32064   proc name: /home/test/sdk/jre/bin/java::_fini

	==== lines removed for terseness====            
	==== lines removed for terseness====            

            bp: 0x00000000   proc name: <unknown location>
           properties:

           associated Java thread: <no associated Java thread>



>info system

System: Linux
System Memory: 2323206144 bytes
Virtual Machine(s):
Runtime #1:
Java(TM) SE Runtime Environment(build jvmxi3260rt-20081016_24574)
IBM J9 VM(J2RE 1.6.0 IBM J9 2.5 Linux x86-32 jvmxi3260rt-20081016_24574 (JIT enabled, AOT enabled)
J9VM - 20081016_024574_lHdRSr
JIT - r10_20081015_2000
GC - 20081016_AA)


> info class  << Information on all classes

	Runtime #1:
	       instances      total size  class name
	               0               0  java/util/regex/Pattern$Slice
	               0               0  java/lang/Byte
	               0               0  java/lang/CharacterDataLatin1
	               2              96  sun/nio/cs/StreamEncoder$ConverterSE
	            1015           36540  java/util/TreeMap$Entry

	==== lines removed for terseness====            
	==== lines removed for terseness====            

 	               2              48  [java/io/File
	               5             104  [java/io/ObjectStreamField
	               0               0  java/lang/StackTraceElement

	 Total number of objects: 9240
	 Total size of objects: 562618



> info class java/util/Random  << Information on a specific class

	Runtime #1:
name = java/util/Random

        ID = 0x81c9fb0    superID = 0x80ea450
        classLoader = 0x82307e8    modifers: public synchronized

        number of instances:     1
        total size of instances: 32 bytes

Inheritance chain....

        java/lang/Object
           java/util/Random

Fields......

          static fields for "java/util/Random"
           static final long serialVersionUID = 3905348978240129619 (0x363296344bf00a53)
           private static final long multiplier = 25214903917 (0x5deece66d)
           private static final long addend = 11 (0xb)
	
	==== lines removed for terseness====            

          non-static fields for "java/util/Random"
           private long seed
           private double nextNextGaussian
           private boolean haveNextNextGaussian


Methods......

Bytecode range(s): 81fb41c -- 81fb430:  public void <init>()

	==== lines removed for terseness====            

Bytecode range(s): 81fb624 -- 81fb688:  public synchronized double nextGaussian()
Bytecode range(s): 81fb69c -- 81fb6a4:  static void <clinit>()


> info proc

        address space # 0

         Thread information for current process:
          Thread id: 28836

         Command line arguments used for current process:
          /home/test/sdk/jre/bin/java -Xmx100m -Xms100m -Xtrace: DeadlockCreator

         Environment variables for current process:
          IBM_JAVA_COMMAND_LINE=/home/test/sdk/jre/bin/java -Xmx100m -Xms100m -Xtrace: DeadlockCreator
          LIBPATH=.:/home/test/sdk/jre/bin:/home/test/sdk/jre/bin/j9vm:/usr/bin/gcc:
          HISTSIZE=1000
       
	==== lines removed for terseness====            

         	PATH=.:/home/test/sdk/bin:/home/test/sdk/jre/bin/j9vm:/home/test/sdk/jre/bin:
                /usr/bin/gcc:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/test/bin
          TERM=xterm



> info jitm

        start=0xb11e241c  end=0xb11e288f   DeadlockCreator::main([Ljava/lang/String;)V
        start=0xb11e28bc  end=0xb11e64ca   DeadlockThreadA::syncMethod(LDeadlockThreadA;)V
        start=0xb11e64fc  end=0xb11ea0fa   DeadlockThreadB::syncMethod(LDeadlockThreadB;)V
        start=0xb11dd55c  end=0xb11dd570   java/lang/Object::<init>()V
     
  	==== lines removed for terseness====            
	==== lines removed for terseness====            

        start=0xb11e0f54  end=0xb11e103e   java/util/zip/ZipEntry::initFields(J)V
        start=0xb11e0854  end=0xb11e0956   java/util/zip/Inflater::inflateBytes([BII)I
        start=0xb11e13d4  end=0xb11e14bf   java/util/zip/Inflater::reset(J)V

> info ls
(un-named monitor @0x835ae50 for object @0x835ae50)
	owner thread's id = <data unavailable>
	object = 0x835ae50

(un-named monitor @0x835b138 for object @0x835b138)
	owner thread's id = <data unavailable>
	object = 0x835b138

Thread global
Raw monitor: id = <unavailable>

NLS hash table
Raw monitor: id = <unavailable>

portLibrary_j9sig_sync_monitor
Raw monitor: id = <unavailable>

portLibrary_j9sig_asynch_reporter_shutdown_monitor
Raw monitor: id = <unavailable>


	==== lines removed for terseness====            
	==== lines removed for terseness====            

Thread public flags mutex
Raw monitor: id = <unavailable>

Thread public flags mutex
Raw monitor: id = <unavailable>

JIT-QueueSlotMonitor-21
Raw monitor: id = <unavailable>

Locked objects...
	java/lang/Class@0x835ae50 is locked by a thread with id <data unavailable>
	java/lang/Class@0x835b138 is locked by a thread with id <data unavailable>


> info sym

        modules for address space # 0
         process id: 28836



> info mmap
Address: 0x1000   size: 0x1000 (4096)
Address: 0x8048000   size: 0xd000 (53248)
Address: 0x8055000   size: 0x2000 (8192)
Address: 0x8057000   size: 0x411000 (4263936)

	==== lines removed for terseness====            
	==== lines removed for terseness====            

Address: 0xffffe460   size: 0x18 (24)
Address: 0xffffe478   size: 0x24 (36)
Address: 0xffffe5a8   size: 0x78 (120)


> info heap object <<Displays information on the object heap, "info heap *" displays 
                                                                            information on all heaps.

        Runtime #1
         Heap #1:  Default
          Size of heap: 104857600 bytes
          Occupancy :   562618 bytes  (0.53%)
          Section #1:  Contiguous heap extent at 0xb1439000 (0x6400000 bytes)
           Size:        104857600 bytes
           Shared:      false
           Executable:  false
           Read Only:   false

> hexdump 0xb1439000 200

b1439000: 70da0e08 0e800064 00000000 00000000  |p......d........|
b1439010: d0c20e08 05800464 00000000 80000000  |.......d........|
b1439020: 00000100 02000300 04000500 06000700  |................|
b1439030: 08000900 0a000b00 0c000d00 0e000f00  |................|
b1439040: 10001100 12001300 14001500 16001700  |................|
b1439050: 18001900 1a001b00 1c001d00 1e001f00  |................|
b1439060: 20002100 22002300 24002500 26002700  | .!.".#.$.%.&.'.|
b1439070: 28002900 2a002b00 2c002d00 2e002f00  |(.).*.+.'.-.../.|
b1439080: 30003100 32003300 34003500 36003700  |0.1.2.3.4.5.6.7.|
b1439090: 38003900 3a003b00 3c003d00 3e003f00  |8.9.:.;.<.=.>.?.|
b14390a0: 40004100 42004300 44004500 46004700  |@.A.B.C.D.E.F.G.|
b14390b0: 48004900 4a004b00 4c004d00 4e004f00  |H.I.J.K.L.M.N.O.|
b14390c0: 50005100 52005300                    |P.Q.R.S.

> +

b14390c8: 54005500 56005700 58005900 5a005b00  |T.U.V.W.X.Y.Z.[.|
b14390d8: 5c005d00 5e005f00 60006100 62006300  |\.].^._.`.a.b.c.|
b14390e8: 64006500 66006700 68006900 6a006b00  |d.e.f.g.h.i.j.k.|
b14390f8: 6c006d00 6e006f00 70007100 72007300  |l.m.n.o.p.q.r.s.|
b1439108: 74007500 76007700 78007900 7a007b00  |t.u.v.w.x.y.z.{.|
b1439118: 7c007d00 7e007f00 e0df0e08 01804864  ||.}.~.........Hd|
b1439128: 00000000 00000000 90e00e08 01804c64  |..............Ld|
b1439138: 00000000 00000000 78f30e08 0e805064  |........x.....Pd|
b1439148: 00000000 b89b43b1 b89b43b1 00000000  |......C...C.....|
b1439158: 78f30e08 0e805664 00000000 109c43b1  |x.....Vd......C.|
b1439168: 109c43b1 00000000 78f30e08 0e805c64  |..C.....x.....\d|
b1439178: 00000000 709c43b1 709c43b1 00000000  |....p.C.p.C.....|
b1439188: 78f30e08 0e806264                    |x.....bd

> -

b1439000: 70da0e08 0e800064 00000000 00000000  |p......d........|
b1439010: d0c20e08 05800464 00000000 80000000  |.......d........|
b1439020: 00000100 02000300 04000500 06000700  |................|
b1439030: 08000900 0a000b00 0c000d00 0e000f00  |................|
b1439040: 10001100 12001300 14001500 16001700  |................|
b1439050: 18001900 1a001b00 1c001d00 1e001f00  |................|
b1439060: 20002100 22002300 24002500 26002700  | .!.".#.$.%.&.'.|
b1439070: 28002900 2a002b00 2c002d00 2e002f00  |(.).*.+.'.-.../.|
b1439080: 30003100 32003300 34003500 36003700  |0.1.2.3.4.5.6.7.|
b1439090: 38003900 3a003b00 3c003d00 3e003f00  |8.9.:.;.<.=.>.?.|
b14390a0: 40004100 42004300 44004500 46004700  |@.A.B.C.D.E.F.G.|
b14390b0: 48004900 4a004b00 4c004d00 4e004f00  |H.I.J.K.L.M.N.O.|
b14390c0: 50005100 52005300                    |P.Q.R.S.


> whatis 0xb143a000

	Runtime #1:
         heap #1 - name: object heap

0xb143a000 is within the heap segment: b1439000 -- b7839000
0xb143a000 is within an object on the heap.
        Offset 8 within [char instance @ 0xb1439ff8


{ find command parameters are: <pattern>,<start_address>,<end_address>,<memory_boundary>,
                                                          <bytes_to_print>,<matches_to_display> }

> find a,0b1439000,0xb1440000,10,20,5
#0: 0xb1439c00
#1: 0xb1439c46
#2: 0xb143a1be
#3: 0xb143a1c8
#4: 0xb143a1e6

b143a1e6: 61007000 70006500 6e006900 6e006700  |a.p.p.e.n.i.n.g.|
b143a1f6: 45007800                             |E.x.

> findnext <<Repeats find command, starting from last match.
#0: 0xb143a72c
#1: 0xb143b3f2
#2: 0xb143b47e
#3: 0xb143b492
#4: 0xb143b51e

b143b51e: 61002e00 73007000 65006300 69006600  |a...s.p.e.c.i.f.|
b143b52e: 69006300                             |i.c.

> findnext
#0: 0xb143b532
#1: 0xb143b5e6
#2: 0xb143b5fa
#3: 0xb143b71c
#4: 0xb143bac8

b143bac8: 61007000 00000000 10cd0e08 0e80b46e  |a.p............n|
b143bad8: 00000000                             |....


{ x/j can be passed an object address or a class name }
> x/j 0xb1439000

	Runtime #1:
         heap #1 - name: object heap

          java/lang/String$CaseInsensitiveComparator @ 0xb1439000

{If passed an object address the (non-static) fields and values of the object will be printed }

> x/j java/lang/Float

	Runtime #1:
         heap #1 - name: object heap

          static fields for "java/lang/Float"
           public static final float POSITIVE_INFINITY = Infinity (0x7f800000)
           public static final float NEGATIVE_INFINITY = -Infinity (0xffffffffff800000)
           public static final float NaN = NaN (0x7fc00000)
           public static final float MAX_VALUE = 3.4028235E38 (0x7f7fffff)
           public static final float MIN_VALUE = 1.4E-45 (0x1)
           public static final int SIZE = 32 (0x20)
           public static final Class TYPE = <object> @ 0x80ec368
           private static final long serialVersionUID = -2671257302660747028 (0xdaedc9a2db3cf0ec)

          <no object of class "java/lang/Float" exists>

{If passed a class name the static fields and their values are printed, followed by all objects of 
                                                                                         that class }


> x/d 0xb1439000

        0xb1439000: 135191152 <<Integer at specified address


> x/x 0xb1439000

        0xb1439000: 080eda70 <<Hex value ofthe bytes at specified address


{ "cd" and "pwd" are self explanatory. }
> pwd
        /home/test

> cd deadlock/
> pwd

        /home/test/deadlock

> quit


© Copyright IBM Corporation 2005, 2010. All Rights Reserved.
© Copyright Sun Microsystems, Inc. 1997, 2007, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
This information center is powered by Eclipse technology. (http://www.eclipse.org/)