DMPCNTANAL(1) Retro Project Manual DMPCNTANAL(1) NNAAMMEE dmpcntanal - analyze dmpcnt data SSYYNNOOPPSSIISS ddmmppccnnttaannaall [_O_P_T_I_O_N]... _F_I_L_E ddmmppccnnttaannaall ----hheellpp DDEESSCCRRIIPPTTIIOONN Reads a list of CPU performance counter raw data, usually generated via a _r_w_1_1_:_:_p_c___l_s_t_a command, and generates human-readable reports. OOPPTTIIOONNSS ----ccssttaattee show the CPU state columns, which give in percent the fraction of clock cycles spend in different CPU states: _c_p console port handling, mostly rbus processing. _k_m_>_0 kernel mode at priority > 0, interrupt handling or inter- rupt lock-out _k_m_=_0 kernel mode at priority == 0 _w_a_i_t idling in a WAIT instruction _s_m supervisor mode _s_u_m user mode ----cceevveennttss show the CPU events columns _M_i_n_/_s instruction rate in MHz _v_f_e_t_c vector-fetch rate, the sum of traps, exceptions, and in- terrupts. _i_r_u_p_t interrupt rate _i_/_b instruction per branch ----ccllkk clock rate on MHz, counting only cycles when CPU running. In normal operation this is equivalent to the system clock rate. ----ccppii show the CPU cycle/instruction column. ----ccppbb show the CPU cycle/branch column. ----ccaacchhee show all cache columns. _r_/_i number of read requests per instruction. _w_/_i number of write requests per instruction. _r_h_i_t read hit rate in %. _w_h_i_t write hit rate in %. _r_w_t average number of wait cycles per memory read (in miss case). _w_w_t average number of wait cycles per memory write (from backpressure). _w_t_/_i average number of memory wait cycles per instruction. ----cchhiitt show cache columns _r_h_i_t, _w_h_i_t and _w_t_/_i, subset of ----ccaacchhee. ----iibbuuss show all ibus columns. _r_d_k_H ibus read rate in kHz. _w_r_k_H ibus write rate in kHz. _w_t_/_r average number of ibus wait cycles (read and write com- bined). ----rrbbuuss show all rbus columns. _r_d_k_H ibus read rate in kHz. _w_r_k_H ibus write rate in kHz. _w_t_/_r average number of ibus wait cycles (read and write com- bined). ----rraaww=_c_l_i_s_t show raw data of the counters given in the comma-separated list of counter names _c_l_i_s_t. ----ddaatt=_c_l_i_s_t show data rate of the counters given in the comma-separated list of counter names _c_l_i_s_t. ----ffmmtt=_h_d_r_,_[_f_m_t_]_,_[_m_u_l_]_,_n_u_m_[_,_d_e_n_] add custom column with a scaled counter rate or a scaled counter ratio specified with hhddrr text for header. The length if the header must be equal or less than the width of the format. ffmmtt format in the form like _w_._p with a single-digit field width _w and single-digit precision _p. If _p is _0 no deci- mal point is printed. If omitted _4_._1 is assumed. mmuull multiplier, given as integer of floating-point number. If omitted 1. is assumed. nnuumm name of numerator counter ddeenn name of denominator counter. If specified the ratio _n_u_m_/_d_e_n is printed, if omitted the rate _n_u_m is printed. ----ssuumm=_n_a_m_[_,_f_r_o_m_[_,_t_o_]_] allows to determine averages for a given time interval with nnaamm name printed in the 1st column, up to 6 characters al- lowed. ffrroomm start time of averaging, if omitted start at begin. ttoo end time of averaging, if omitted sum to the end. ----ttoott add line with average values for the whole dataset, short for --ssuumm==ttoottaall. ----ccppuu short for --ccssttaattee --cceevveenntt --cchhiitt. If no option which generates an output column is given and a --ccppuu style output is generated. ----aallll short for --ccssttaattee --cceevveenntt --ccaacchhee --iibbuuss --rrbbuuss. ----hhppll=_n print header after _n lines. ----hheellpp print full help text and exit. CCOOLLUUMMNN DDEEFFIINNIITTIIOONNSS All standard columns generated via options like --ccssttaattee can also be created via the --ffmmtt 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 EEXXAAMMPPLLEESS ddmmppccnnttaannaall --ccssttaattee --cceevveenntt --ttoott ppcc__ddmmppccnntt__xxxxxx..ddaatt reads the file _p_c___d_m_p_c_n_t___x_x_x_._d_a_t and generates a report with the --ccssttaattee and --cceevveenntt columns sets. The input file is typically generated by a ttii__ww1111 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 SSEEEE AALLSSOO ttii__ww1111(1) AAUUTTHHOORR Walter F.J. Mueller Retro Project 2018-10-21 DMPCNTANAL(1)