5686 (automagic printing of global arrays)
Stan Cox
scox@redhat.com
Wed Aug 20 15:05:00 GMT 2008
This is the patch I have for displaying global arrays that are written but not read. I still need to add support for arrays with multiple indices and displaying scalars. (Only tested with artificial testcases thus far:)
% cat tst.stp
global alpha, beta
probe begin {
alpha["one"] = 10
alpha["two"] = 20
beta["one"] = 1
beta["two"] = 2
}
probe timer.ms(2000) {
exit ()
}
probe end {
foreach ([i] in beta)
printf("%#x ", beta[i])
exit()
}
% stap tst.stp
alpha[one]=0xa
alpha[two]=0x14
0x1 0x2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ,gitdiff
Type: application/octet-stream
Size: 5277 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20080820/0354af5d/attachment.obj>
More information about the Systemtap
mailing list