On Tue, 2008-08-05 at 12:26 +0200, Andreas Färber wrote: > > IMO, the correct way of doing this would be to implement it in a > > profiler module, and it's amazingly easy doing so. > [...] > I don't wish to replace or belittle your profiler work. I think the > two have different scopes and different use cases and can live side by > side, even benefitting from increased review.
Don't worry, I did not take your post that way. I *know* dtrace is a different thing, even if I have never used it. I was trying to say the following: [1] If you want dtrace hooks for every enter-exit method, the easiest way to implement them is inside a profiler module that uses the existing enter-exit profiling hooks. This has its downsides: you must start the runtime enabling this "dtrace profiler module", and at this point the overhead is not zero. However it seems so easy to do that it could be useful anyway if you need the feature "now" instead of in a few weeks or months. [2] Anyway, if you want to extend the JIT to insert enter and exit "empty dtrace hooks" to every method, it's very likely that you should reuse (and extend) the existing prologue-epilogue instrumentation code instead of trying to reinvent it. [3] As nice as dtrace can be, we don't have it on Linux, and our main focus is Linux. Here, the easiest way you have to log all enter-exit events efficiently is the "c" option of the logging profiler, so I explained how to use it for that purpose in case somebody needed it now. Of course the logging profiler is not dtrace :-) And of course there's place for both in the world... My points [1] and [2] are suggestions on how to get those dtrace hooks into Mono, point [3] is about how to get something similar without using dtrace. Anyway, I get your point that dtrace hooks are conditional, and the conditions can be given dynamically as D scripts. This is something we miss in Mono-land, and can cut the event bandwidth significantly. So, to answer my question, maybe dtrace would be slower than the logging profiler in logging individual enter-exit events, but typically when using dtrace you will never ask the system to log *all* of them, you will select them with a D script, so the resulting event bandwidth will be much slower and the performance acceptable. Did I get it right? Thanks! Massi _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
