Experiences Getting SystemTap work on OLPC Machine
William Cohen
wcohen at redhat.com
Thu May 10 17:57:48 EDT 2007
William Cohen wrote:
<snip>
> Setup of SystemTap on OLPC Machine
>
> To run systemtap kernel modules on olpc machine the hacked
> systemtap-runtime
> module needs to be installed on the olpc machine:
>
> rpm -Uvh systemtap-runtime-0.5.12-1olpc.i386.rpm
>
> The instrumentation needs to be run as root with:
>
> staprun idle1.ko
>
> This particular script attempts to determine the amount of the time
> spent in the power saving halted mode. It will run until control-c is
> typed on the command line. When control-c is pressed, the script
> prints out information about how long it ran, the number of entries
> and exits from halt state, and some statistics about the time spent in
> halted state. Below is the output of idle1.stp running on a idle
> machine running the 314 build and the q2b76 rom:
>
> Starting halt watch
> Ran for 60544934 us
> entered default_halt 9609
> exited default_halt 9609
> percent halted: 17
> count: 9609
> avg_time: 1081
> min_time: 3
> max_time: 3429
> usec distribution
> value |-------------------------------------------------- count
> 0 | 0
> 1 | 0
> 2 | 18
> 4 |@ 219
> 8 |@ 295
> 16 | 56
> 32 |@ 279
> 64 | 149
> 128 | 147
> 256 |@ 275
> 512 |@@@ 542
> 1024 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 7605
> 2048 | 24
> 4096 | 0
> 8192 | 0
>
> This data show that the script was run for about 1 minute
> (60,544,934us). There were about 9600 halt entries and exits. The
> time actually spent halted is surprisingly small, 17% for the unloaded
> machine. The average time spent halted is slightly over
> 1millisecond. One can see the distribution on the histogram.
I installed olpc406_c11.zip on the machine and reran the experiment with a
snapshot of systemtap. The processor is spending much more time halted. For an
idle machine b2 machine in init 5 95% of the time is spent with the processor
halted (vs 17% before). The average time in halt is much larger, 6216 micro
seconds versus 1061 micro seconds. Below is the output from the script.
# staprun idle1.ko
Starting halt watch
Ran for 511858365 us
entered default_halt 78239
exited default_halt 78239
percent halted: 95
count: 78239
avg_time: 6216
min_time: 13
max_time: 8998
usec distribution
value |-------------------------------------------------- count
2 | 0
4 | 0
8 | 7
16 | 109
32 | 84
64 | 196
128 | 464
256 |@ 1823
512 |@ 1165
1024 |@ 2238
2048 |@@@ 3930
4096 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 57120
8192 |@@@@@@@@@ 11103
16384 | 0
32768 | 0
-Will
More information about the Devel
mailing list