That is pretty cool, indeed.
Cheers, Doru
On 11 May 2010, at 23:45, Adrian Lienhard wrote:
Yes, you can output a conventional execution trace using the methodenter and methodreturn probes. You can also trace the instantiation of classes. Or trace the call of primitives, or just the primitives that fail back to the Smalltalk code. You can also trace the scheduling of processes. Then you can add more information, like when a GC event happens, or which part of a file is being read or written, or what network operations happen.
Since one writes D scripts there is quite some freedom concerning what data to gather and how to write it out. The example I showed in my blog post uses built-in aggregation functions, so in this case no trace is generated.
Just to give a simple example, the attached script callgraph.d generates a dot file (graph.in) with the resulting Graphviz output (graph.pdf). It shows a call graph of the top 100 called methods.
<callgraph.d><graph.in> <callgraph.pdf>
Cheers, Adrian
BTW, I just noticed that some methodreturn events are probably wrong (if you look closely you will notice that there are a few weird call relationships).
http://www.adrian-lienhard.ch/
On May 11, 2010, at 16:09 , Tudor Girba wrote:
Hi,
I am not sure I understand what kind of information one could get from DTrace. Is it a trace? If so, it would be great to populate Dynamix from it and then build analyses on top.
Cheers, Doru
On 11 May 2010, at 16:06, Alexandre Bergel wrote:
Hi Mariano,
I read Adrian's blog, this sounds very appealing. I will give a try to generate a mondrian visualization. That could be cool.
I think DTrace should be part of Moose. Maybe we can add a section on dynamic analysis that would contain DTrace and Spy?
Cheers, Alexandre
On 11 May 2010, at 10:00, Mariano Martinez Peck wrote:
Hi folks. Today Adrian released an integration between the Squeak/ Pharo VM and DTrace. I read his post and the code and seems VERY interested. I know very very little about Moose, but I guess if moose wants to move on, it should start to analyze more the runtime world. For such purpose, it will requiere PROBABLY (almost sure) a particular VM. For example, what I plan to do now (playing with DistributionMap and used/unused objects) will requiere my own VM. In this case of Adrian too. So....
The Adrian's post can be found here: http://www.adrian-lienhard.ch/blog Please take a look. Not necessary to the implementation details but to the features it can you you.
Finally, read the last sentence: "DTrace by itself does not provide visualizations but since its output can be formatted as required (using printf) and piped into a file, one can feed the data to a visualization tool (e.g., print output in MSE format, import it into Moose, and create interactive visualizations with Mondrian)."
Cheers
Mariano _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Presenting is storytelling."
-- www.tudorgirba.com
"If you interrupt the barber while he is cutting your hair, you will end up with a messy haircut."