DMPCNTANAL(1)

NAME
dmpcntanal - analyze dmpcnt data

SYNOPSIS
dmpcntanal [OPTION]... FILE
dmpcntanal --help

DESCRIPTION
Reads a list of CPU performance counter raw data, usually generated via a rw11::pc_lsta command, and generates human-readable reports.

OPTIONS

--cstate
    show the CPU state columns, which give in percent the fraction of clock cycles spend in different CPU states:

    cp  console port handling, mostly rbus processing.
    km>0
        kernel mode at priority > 0, interrupt handling or interrupt lock-out
    km=0
        kernel mode at priority == 0
    wait
        idling in a WAIT instruction
    sm  supervisor mode
    sum user mode

--cevents
    show the CPU events columns

    Min/s
        instruction rate in MHz
    vfetc
        vector-fetch rate, the sum of traps, exceptions, and interrupts.
    irupt
        interrupt rate
    i/b instruction per branch

--clk
    clock rate on MHz, counting only cycles when CPU running. In normal operation this is equivalent to the system clock rate.

--cpi
    show the CPU cycle/instruction column.

--cpb
    show the CPU cycle/branch column.

--cache
    show all cache columns.

    r/i number of read requests per instruction.
    w/i number of write requests per instruction.
    rhit
        read hit rate in %.
    whit
        write hit rate in %.
    rwt average number of wait cycles per memory read (in miss case).
    wwt average number of wait cycles per memory write (from backpressure).
    wt/i
        average number of memory wait cycles per instruction.

--chit
    show cache columns rhit, whit and wt/i, subset of --cache.

--ibus
    show all ibus columns.

    rdkH
        ibus read rate in kHz.
    wrkH
        ibus write rate in kHz.
    wt/r
        average number of ibus wait cycles (read and write combined).

--rbus
    show all rbus columns.

    rdkH
        ibus read rate in kHz.
    wrkH
        ibus write rate in kHz.
    wt/r
        average number of ibus wait cycles (read and write combined).

--raw=clist
    show raw data of the counters given in the comma-separated list of counter names clist.

--dat=clist
    show data rate of the counters given in the comma-separated list of counter names clist.

--fmt=hdr,[fmt],[mul],num[,den]
    add custom column with a scaled counter rate or a scaled counter ratio specified with

    hdr text for header. The length if the header must be equal or less than the width of the format.
    fmt format in the form like w.p with a single-digit field width w and single-digit precision p. If p is 0 no decimal point is printed. If omitted 4.1 is assumed.
    mul multiplier, given as integer of floating-point number. If omitted 1. is assumed.
    num name of numerator counter
    den name of denominator counter. If specified the ratio num/den is printed, if omitted the rate num is printed.

--sum=nam[,from[,to]]
    allows to determine averages for a given time interval with

    nam name printed in the 1st column, up to 6 characters allowed.
    from
        start time of averaging, if omitted start at begin.
    to  end time of averaging, if omitted sum to the end.

--tot
    add line with average values for the whole dataset, short for -sum=total.

--cpu
    short for -cstate -cevent -chit. If no option which generates an output column is given and a -cpu style output is generated.

--all
    short for -cstate -cevent -cache -ibus -rbus.

--hpl=n
    print header after n lines.

--help
    print full help text and exit.

COLUMN DEFINITIONS
All standard columns generated via options like -cstate can also be created via the -fmt option with the following parameters
        name    format  mul     numerator     denominator

        cp      4.1     100.    cpu_cpbusy    cpu_tot
        km>0    4.1     100.    cpu_km_prix   cpu_tot
        km=0    4.1     100.    cpu_km_pri0   cpu_tot
        wait    4.1     100.    cpu_km_wait   cpu_tot
        sm      4.1     100.    cpu_sm        cpu_tot
        um      4.1     100.    cpu_um        cpu_tot
        Min/s   5.2     1.e-6   cpu_idec
        vfetch  5.0     1.      cpu_vfetch
        irupt   5.0     1.      cpu_irupt
        i/b     4.1     1.      cpu_idec      cpu_pcload

        r/i     4.2     1.      ca_rd         cpu_idec
        w/i     4.2     1.      ca_wr         cpu_idec
        rhit    4.1     100.    ca_rdhit      ca_rd
        whit    4.1     100.    ca_wrhit      ca_wr
        rwt     4.1     1.      ca_rdwait     ca_rdmem
        wwt     4.1     1.      ca_wrwait     ca_wrmem
        wt/i    4.1     1.      ca_totwt      cpu_idec
        rdkH    4.2     1.e-3   ib_rd
        wrkH    4.2     1.e-3   ib_wr
        wt/r    4.1     1.      ib_busy       ib_tot
        rdkH    4.2     1.e-3   rb_rd
        wrkH    4.2     1.e-3   rb_wr
        wt/r    4.1     1.      rb_busy       rb_tot

EXAMPLES

dmpcntanal -cstate -cevent -tot pc_dmpcnt_xxx.dat
    reads the file pc_dmpcnt_xxx.dat and generates a report with the -cstate and -cevent columns sets. The input file is typically generated by a ti_w11 Tcl command like
          rw11::pc_clear
          rw11::pc_start
          rw11::pc_lsta pc_dmpcnt_xxx.dat
    The output might look like
          time  ------ cpu state in % -------  ----- cpu events -----
           sec    cp km>0 km=0 wait   sm   um  Min/s vfetc irupt  i/b
         ...
          38.0   0.7 10.4 19.2  4.0  0.0 65.7   8.95  1319   712  4.2
          39.0   0.4  5.1  9.9  1.4  0.0 83.1   9.76  1021   373  4.0
          40.0   0.7  9.4 18.6  3.6  0.0 67.8   8.60  1135   616  4.5
          41.0   0.4  4.6  9.5  1.1  0.0 84.4   9.81  1190   313  4.1
          42.0   0.6  7.1 18.0  3.4  0.0 70.8   9.33  1153   611  3.9
          43.0   0.5  7.6 15.0  4.1  0.0 72.7   9.15  1278   540  4.1
          44.0   0.6  9.2 15.8  3.0  0.0 71.4   8.87  1267   509  4.4
          45.0   0.6  7.4 16.7  3.2  0.0 72.1   8.96  1276   552  4.2
         ...
          time  ------ cpu state in % -------  ----- cpu events -----
           sec    cp km>0 km=0 wait   sm   um  Min/s vfetc irupt  i/b
         total   0.5  7.0 17.0 19.7  0.0 55.8   7.28  1453   471  3.9

SEE ALSO
ti_w11(1)

AUTHOR
Walter F.J. Mueller <W.F.J.Mueller@gsi.de>