Changes

Jump to: navigation, search

DTrace 0.1 Release

1,140 bytes added, 14:58, 18 October 2008
My Test Case - Above code on a website redirection
==Purpose==
This is the 0.1 Release for [http://zenit.senecac.on.ca/wiki/index.php/Add_DTrace_Probes_and_scripts_for_Mozilla_Code_base this project], developed by Hellwolf36 (Chris Cameirao)
The purpose of 0.1 is to show that I am aware of how a D-Trace probe works, by using a D script to pick up on function call counts (for now) and see what it can gather. This functionality can only be tested on Mac OS X 10.5 Leopard or Open Solaris.
 
Being able to write a D-Trace script helps when I start writing probes for 0.2.
==Step 1: Build Pre-requisites==
D-Trace scripts are .d files that allow the user to interact with the existing probes and do innovative things. If a programmer tends to add new probes to the Mozilla code base, they can use a script to pick up on it to make sure it was implemented and interacted properly.
With your terminal that isn't handling Mozilla Minefield, go to your mozilla home directory , create a file called js_callcount.d and paste this code into it.
<pre>#pragma D option quiet
==My Test Case - Above code on a website redirection==
1) Test Case:<ol><li> Ran Minefield on first terminal.Created a profile called DTrace and used it2) <li> Ran my D-Script on my second terminal.3) <li> On Minefield - typed [http://www.wikipedia.org/wiki/Santino_Marella http://www.wikipedia.org/wiki/Santino_Marella] and hit Enter.4) <li> Clicked on the first instance of RAW (should be in basic description field on top of wiki).5) <li> Ctrl+C'd out of my D-Script on second terminal.6) <li> Closed Minefield and Ctrl+C'd out of my first terminal.</ol>
My results were:
</pre>
 
The probe mainly picked up on Javascript (function probe) and XML (interpreter probe) calls. But this is pretty staggering considering my test case was pretty basic, especially the number of times the XML commands were called (most likely utility functions for the Javascript). Feel free to try out your own test cases, but involving more complex things.
 
Why did I go wrestling themed? Well, I watch WWE Raw/Smackdown quite often, and Santino Marella is a RAW Wrestler. He is a villian using an Italian Stereotype gimmick. I find him quite entertaining to watch because of his microphone skills. Plus, I compiled this script on Thursday (where his WWE.com show - Santino's Casa is uploaded every Thursday) and finished watching it before I compiled this script.
1
edit

Navigation menu