Timing Parameters

The emc_log timing parameters are described in the following diagram:

In the above figure, four clients are specified, and a period of 3 is specified. The start delay is 1 s.

To sample a group

  • The following command samples the mpcore group for 30 seconds:
    emc_log -chip <TBD_chip_id> -group mpcore -length 30

To sample an individual client

  • The following command samples the nvdisplayr client for 30 seconds:
    emc_log -chip <TBD_chip_id> -client nvdisplayr -length 30

To sample multiple clients

  • The following command samples the clients nvdisplayr and nvdisplayr1 for 30 seconds:
    emc_log -chip <TBD_chip_id> -client nvdisplayr -client nvdisplayr1 -length 30
  • The following code shows the emc_log commands and output.
    # emc_log -chip <TBD_chip_id> -help 
    [77/1864]
    emc_log version 2.0.0
    CHIPID: TEGRA_CHIPID_TEGRA<TBD_t-arch>
    Usage: emc_log [-option]
    Options:
      -help                    : Print this help screen
      -chip <chipid>           : Specify the chip id, the supported chips are: 0x40, 0x13, 0x21 and 0x18. The option is required for chip 0x18
      -group <groupName>       : Collect stats for all clients in <groupName>
      -client <clientName>     : Collect stats for <clientName>
      -window <int>            : Sample every <int> ms, default = 1000 ms
       -startdelay <int>       : Delay sampling for <int> seconds (default = 1s)
      -length <int>            : Sample for at least <int> seconds (default = 10s)
      -period <int>            : Set the period for rescheduling
      -mode <none/address/client>  : Set the mode for rescheduling
      -address_low <int>       : Set the low address for address filtering
      -address_length <int>    : Set the total range of address for address filtering
      -address_window_size <int>   : Set the size of window for address filtering (address mode only)
      -o <filename>        : If specified, output data to this file. Otherwise, output data to stdout
      -verbose                 : Print details from log buffer
      -total                   : Collect the total stats for all clients specified
      -debug                   : Print commands sent to sysfs
      -slack_hi                : Set the SLACK_LIMIT_HI
      -slack_lo                : Set the SLACK_LIMIT_LO
      -stats <bw/expired/histo>: Select the statistics to be collected
    More than one client / group can be specified at a time.
    If more clients are specified than the hardware can sample
    simultaneously, clients will be sampled in a round-robin order.
            Group               Client                        ID
            ptc                 ptcr                           0
            afi                 afir                          14
            hda                 hdar                          21
            hc                  host1xdmar                    22
            nvenc               nvencsrd                      28
            sata                satar                         31
            mpcore              mpcorer                       39
            nvenc               nvencswr                      43
            afi                 afiw                          49
            hda                 hdaw                          53
            mpcore              mpcorew                       57
            sata                sataw                         61
            isp2                ispra                         68
            isp2                ispwa                         70
            isp2                ispwb                         71
            xusb_host           xusb_hostr                    74
            xusb_host           xusb_hostw                    75
            xusb_dev            xusb_devr                     76
            xusb_dev            xusb_devw                     77
            tsec                tsecsrd                       84
            tsec                tsecswr                       85
            gpu                 gpusrd                        88
            gpu                 gpuswr                        89
            sdmmc1a             sdmmcra                       96
            sdmmc2a             sdmmcraa                      97
            sdmmc3a             sdmmcr                        98
            sdmmc4a             sdmmcrab                      99
            sdmmc1a             sdmmcwa                      100
            sdmmc2a             sdmmcwaa                     101
            sdmmc3a             sdmmcw                       102
            sdmmc4a             sdmmcwab                     103
            vic                 vicsrd                       108
            vic                 vicswr                       109
            vi                  viw                          114
            nvdec               nvdecsrd                     120
            nvdec               nvdecswr                     121
            ape                 aper                         122
            ape                 apew                         123
            nvjpg               nvjpgsrd                     126
            nvjpg               nvjpgswr                     127
            se                  sesrd                        128
            se                  seswr                        129
            etr                 etrr                         132
            etr                 etrw                         133
            tsecb               tsecsrdb                     134
            tsecb               tsecswrb                     135
            gpu                 gpusrd2                      136
            gpu                 gpuswr2                      137
            axis                axisr                        140
            axis                axisw                        141
            eqos                eqosr                        142
            eqos                eqosw                        143
            ufshc               ufshcr                       144
            ufshc               ufshcw                       145
            nvdisplay           nvdisplayr                   146
            bpmp                bpmpr                        147
            bpmp                bpmpw                        148
            bpmp                bpmpdmar                     149
            bpmp                bpmpdmaw                     150
            aon                 aonr                         151
            aon                 aonw                         152
            aon                 aondmar                      153
            aon                 aondmaw                      154
            sce                 scer                         155
            sce                 scew                         156
            sce                 scedmar                      157
            sce                 scedmaw                      158
            ape                 apedmar                      159
            ape                 apedmaw                      160
            nvdisplay           nvdisplayr1                  161
            vic                 vicsrd1                      162
            nvdec               nvdecsrd1                    163
            emc                 dram_stat_begin              165
            dram                activate_cnt                 165
            dram                read_cnt                     166
            dram                read8_cnt                    167
            dram                write_cnt                    168
            dram                write8_cnt                   169
            dram                ref_cnt                      170
            dram          extclks_cke_eq0_no_banks_active    171
            dram          clkstop_cke_eq0_no_banks_active    172
            dram          extclks_cke_eq1_no_banks_active    173
            dram          clkstop_cke_eq1_no_banks_active    174
            dram          extclks_cke_eq0_some_banks_active  175
            dram          clkstop_cke_eq0_some_banks_active  176
            dram          extclks_cke_eq1_some_banks_active  177
            dram          clkstop_cke_eq1_some_banks_active  178
            dram                sr_cke_eq0_clks              179
            dram                dsr                          180
                                readtally                    253
                                writetally                   254
                                aggregate                    255
    ==============================================================
    emc_log -chip <TBD_chip_id> -group mpcore
    /emc_log version 2.0.0
    CHIPID: TEGRA_CHIPID_TEGRA<TBD_t-arch>
    Delay sampling for 1 seconds...
    Start sampling for 10 seconds...
    debug_fs = /sys/kernel/debug
    Duration(ms)    Client ID    Bandwidth(KBps)
    1000     39        181273.093750
    1000     57        164767.687500
    1000     39        181272.203125
    1000     57        164773.265625
    1000     39        181252.015625
    1000     57        164762.453125
    1000     39        181229.359375
    1000     57        164745.640625
    1000     39        181245.625000
    1000     57        164762.562500
    1000     39        181219.078125
    1000     57        164737.031250
    1000     39        181261.812500
    1000     57        164781.703125
    1000     39        181275.265625
    1000     57        164793.890625
    1000     39        181292.203125
    1000     57        164804.015625
    ==============================================================
    emc_log -chip <TBD_chip_id>  -group nvdisplay
    emc_log version 2.0.0
    CHIPID: TEGRA_CHIPID_TEGRA<TBD_t-arch>
    Delay sampling for 1 seconds...
    Start sampling for 10 seconds...
    debug_fs = /sys/kernel/debug
    Duration(ms)    Client ID    Bandwidth(KBps)
    1000     146        0.000000
    1000     161        0.000000
    1000     146        0.000000
    1000     161        0.000000
    1000     146        0.000000
    1000     161        0.000000
    1000     146        0.000000
    1000     161        0.000000
    1000     146        0.000000
    1000     161        0.000000
    1000     146        0.000000
    1000     161        0.000000
    1000     146        0.000000
    1000     161        0.000000
    1000     146        0.000000
    1000     161        0.000000
    1000     146        0.000000
    1000     161        0.000000
    ==============================================================
    emc_log -chip <TBD_chip_id>  -client nvdisplayr
    emc_log version 2.0.0
    CHIPID: TEGRA_CHIPID_TEGRA<TBD_t-arch>
    Delay sampling for 1 seconds...
    Start sampling for 10 seconds...
    debug_fs = /sys/kernel/debug
    Duration(ms)    Client ID    Bandwidth(KBps)
    1000     146        0.000000
    1000     146        0.000000
    1000     146        0.000000
    1000     146        0.000000
    1000     146        0.000000
    1000     146        0.000000
    1000     146        0.000000
    1000     146        0.000000
    1000     146        0.000000