EasyManua.ls Logo

COBHAM GRMON3 - Page 70

COBHAM GRMON3
239 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
GRMON3-UM
June 2019, Version 3.1.0
70 www.cobham.com/gaisler
(st) will be polled. When counter st is found to be enabled the polling operating will begin. This functionality
can be used to, for instance, let software signal when measurements should take place.
Polling ends when at least one of the following is true: User pressed CTRL+C (SIGINT) or counter st becomes
disabled. When polling stops, the debug driver will disable the selected counter(s) and also disable the automatic
clear feature.
The second command, l4stat runpoll, is used to couple the poll operation with the run command. When l4stat
runpoll st sp int has been issued, counters st - sp will be polled after the run command is given. The interval
argument in this case does not specify the poll interval seconds but rather in terms of iterations when GRMON
polls the Debug Support Unit to monitor execution. A suitable value for the int argument in this case depends on
the speed of the host computer, debug link and target system.
Example 6.2 is a transcript from a GRMON session where a vxWorks image is loaded and statistics are collected
while it runs.
Example 6.2.
grmon3> l4stat 1 set 0 0 icmiss 0
cnt0: Configuring icache miss on cpu/AHB 0
grmon3> l4stat 1 set 1 0 dcmiss 0
cnt1: Configuring dcache miss on cpu/AHB 0
grmon3> l4stat 1 set 2 0 load 0
cnt2: Configuring load instructions on cpu/AHB 0
grmon3> l4stat 1 set 3 0 store 0
cnt3: Configuring store instructions on cpu/AHB
grmon3> l4stat 1 status
CPU DESCRIPTION VALUE
0: cpu0 icache miss 0000000000 (disabled)
1: cpu0 dcache miss 0000000000 (disabled)
2: cpu0 load instructions 0000000000 (disabled)
3: cpu0 store instructions 0000000000 (disabled)
grmon3> l4stat 1 runpoll 0 3 5000
Setting up callbacks so that polling will be performed during 'run'
grmon3> load vxWorks
00003000 .text 1.5MB / 1.5MB [===============>] 100%
0018F7A8 .init$00 12B [===============>] 100%
0018F7B4 .init$99 8B [===============>] 100%
0018F7BC .fini$00 12B [===============>] 100%
0018F7C8 .fini$99 8B [===============>] 100%
0018F7E0 .data 177.5kB / 177.5kB [===============>] 100%
Total size: 1.72MB (2.03Mbit/s)
Entry point 0x3000
Image vxWorks loaded
grmon3> run
TIME COUNTER CURRENT READ CURRENT RATE TOTAL READ TOTAL RATE
5.88 0 1973061 335783 1973061 335783
5.88 1 7174279 1220946 7174279 1220946
5.88 2 22943354 3904587 22943354 3904587
5.88 3 491916 83716 491916 83716
11.16 0 0 0 1973061 176718
11.16 1 11014132 2082460 18188411 1629056
11.16 2 33072417 6253057 56015771 5017087
11.16 3 15751 2978 507667 45470
... output removed ...
51.35 0 0 0 1973061 38425
51.35 1 12113004 2079486 101754132 1981657
51.35 2 36365101 6242936 306891414 5976697
51.35 3 17273 2965 627067 12212
And alternative to coupling polling to the run command is to break execution, issue detach and then use the l4stat
poll command. There are a few items that may be worth considering when using poll and runpoll.
All counters are not read in the same clock cycle. Depending on the debug link used there may be a significant
delay between the read of the first and the last counter.
Measurements are timed on the host computer and reads experience jitter from several sources.
A counter may overflow after 232 target clock cycles. The poll period (interval) should take this into account
so that counters are read (and thereby cleared) before an overflow can occur.

Table of Contents