Sunday, 25 July 2010

Dtrace progress 20100725

Have been busy implementing the io::start and io::done probes. The mechanism
is different to the way Solaris/Apple do it - because we dont want
to annotate kernel (GPL) source code.


In getting this to work, I found a problem with the disassembler code.
The issue is handling a multi-byte NOP instruction (as emitted by GCC
to align jump targets to quad boundaries). Fortunately, Apple (or maybe Sun)
had already fixed the issue, so I grabbed an update to dis_tables.c.


In doing so, it exposed many more probe (fbt) points than previously seen.
I was previously seeing about 48,000 fbt probes on my Ubuntu 10.04 kernel.
After the above change, the number jumped to 250,000 - I assume because
now we more successfully find the multiple exit points in a function
rather than aborting when we hit one of these instructions.


Anyway, heres a simple example of the io::: provider working for
just one type of probe.


/home/fox/src/dtrace@vmub10-64: dtrace -l | grep -w io
4 io start
5 io done
6 io done
7 io done
8 io done
9 io done
10 io done
11 io done
12 io done
13 io done
14 io done
15 io done
/home/fox/src/dtrace@vmub10-64: dtrace -n io:::
dtrace: description 'io:::' matched 12 probes
CPU ID FUNCTION:NAME
0 6 done:
0 15 done:
0 6 done:
0 15 done:
0 6 done:
0 7 done:
0 6 done:
0 7 done:
0 6 done:
0 7 done:
0 6 done:
0 7 done:
0 6 done:
0 7 done:
...


Post created by CRiSP v10.0.2a-b5877


No comments:

Post a Comment