* reimplementation of smp_call_function example from OLS
@ 2005-09-15 20:02 William Cohen
0 siblings, 0 replies; only message in thread
From: William Cohen @ 2005-09-15 20:02 UTC (permalink / raw)
To: SystemTAP
[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]
Playing around with the instrumentation I attempted to reimplement the
example given in the OLS 2005 presenation so that it works with the
current translator. The attached scf.stp appears to work. Below is the
output.
Things that strike me about this example:
1) Outputting data could be simpler
2) Sorting the data would be useful. I should take a look at Tom's
kmalloc-top example that he checked in for sorting.
3) It appears that some backtraces are truncated.
-Will
stap scf.stp
start of data collection
end of data collection
traces[2234,hald,
0xc0114d67 : smp_call_function+0x10/0xfa
0xc016a6af : invalidate_bh_lrus+0x1b/0x22
0xc01697ca : invalidate_bdev+0x8/0x17
0xc0180649 : __invalidate_device+0x30/0x36
0xc016fb46 : check_disk_change+0x2b/0x66
0xc0256908 : get_disk+0x1d/0x7d
0xc028511e : cdrom_open+0x62/0xdb
0xc024da4e : kobj_lookup+0x152/0x196
0xc0281f1b : idecd_open+0x45/0x8f
0xc016fc81 : do_open+0x8f/0x343
0xc016ffad : blkdev_open+0x1a/0x4a
0xc01672c2 : dentry_open+0xcf/0x1e9
0xc01671ed : filp_open+0x40/0x46
0xc015161f : cache_alloc_debugcheck_after+0x31/0x129
0xc
] = 105
traces[2234,hald,
0xc0114d67 : smp_call_function+0x10/0xfa
0xc016a6af : invalidate_bh_lrus+0x1b/0x22
0xc01697ca : invalidate_bdev+0x8/0x17
0xc016f2b5 : kill_bdev+0xd/0x20
0xc017012c : blkdev_put+0x14f/0x164
0xc0168ddd : __fput+0xb1/0x18f
0xc016764e : filp_close+0x3e/0x62
0xc01039d1 : syscall_call+0x7/0xb
] = 104
traces[2234,hald,
0xc0114d67 : smp_call_function+0x10/0xfa
0xc0104416 : common_interrupt+0x1a/0x20
0xc016a6af : invalidate_bh_lrus+0x1b/0x22
0xc01697ca : invalidate_bdev+0x8/0x17
0xc016f2b5 : kill_bdev+0xd/0x20
0xc017012c : blkdev_put+0x14f/0x164
0xc0168ddd : __fput+0xb1/0x18f
0xc016764e : filp_close+0x3e/0x62
0xc01039d1 : syscall_call+0x7/0xb
] = 1
[-- Attachment #2: scf.stp --]
[-- Type: text/plain, Size: 519 bytes --]
# scf.stp
# A reimplementation of user script:smp_call_function example given at OLS 2005
# in the current language.
#
# Will Cohen
global traces
probe kernel.function("smp_call_function")
{
traces[pid(), pexecname(), backtrace()] += 1;
}
probe end {
log("end of data collection");
foreach( [pid, name, stack] in traces){
log( "traces[" . string(pid) . "," . name . "," );
print_stack(stack)
log( "] = " . string(traces[pid, name, stack]) );
}
}
probe begin { log("start of data collection"); }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-15 20:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-15 20:02 reimplementation of smp_call_function example from OLS William Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).