> As I observe, your script is basically doing all work inside the  
> probe. Since you already have a fairly busy system with LOT of IO,  
> your script creates a significant overhead.

That may be, but the overhead of the probe is probably far greater than
the work done in the probe. You might try just enabling the probes  
without
any data gathering as a test (you'll need some trivial operation to  
suppress
the default action).

> Can you try to limit the script to just collect the data and post- 
> process it either in END probe or via another script ?

Post-processing the data will certainly consume more system resources as
there will be much more data moving through the system. One of the key
innovations of DTrace is the ability to prune and aggregate data in situ
(rather than processing it a posteriori).

> I am not sure whether writing a translator would give you better  
> performance than so many casts, but you can try.


First, casts are for the compiler's type checking and don't actually
generate any code; this is true in D as it is on C. There are a bunch of
loads in this D script, but a translator isn't going to do anything  
about
that.

Adam

--
Adam Leventhal, Fishworks                        http://blogs.sun.com/ahl

_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to