Hey all -

Trying to track down a problem, I found that I wanted to understand how 
long each kernel function call was taking once inside a systemcall.

so, for example, let's say, I wanted to look at fdsync() activity for a 
given process, it might do something like

fdsync() entry
    function a entry
       function b entry
         function c entry
         function c return
         function c entry
         function c return
       function b return
       function b entry
         function c entry
         function c return
    function a return
    <...>
fdsync() return

Now: I'm sure someone has already solved this, so before I go working it 
out myself, what I want is something that will tell me how long each 
function was actually running and/or how long it was on CPU. Having both 
would be of advantage, considering that there might well be some waiting 
for disks etc.

Of course, the tricky part here is that I want both the running time of 
that function, both with and without the running time of it's subsequent 
function calls...

So, some output from this mythical script might look like:

FUNCTION                   Entered(ms)Returned  Individual  Aggregate
fdsync() entry             0000000
    function a entry        0000400
       function b entry     0000500
         function c entry   0000600
         function c return              0000800         200        200
         function c entry   0001000
         function c return              0001200         200        200
       function b return                0001300         400        800
       function b entry     0001400
         function c entry   0001500
         function c return              0001600         100        100
       function b return                0001700         200        300
    function a return                   0001900         300       1500
    <...>
fdsync() return

Of course, if someone has something already written that's even close to 
this, it would be excellent... and being able to limit the depth or 
functions we track would also be cool... ;)

Thanks for any thoughts!

Nathan.

_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to