Add shark support to md5.js directly, no longer around the recorder.
authorAndreas Gal <gal@mozilla.com>
Thu, 24 Jul 2008 11:08:37 -0700
changeset 17819 d4612c4b9cc2a504016021b7635d36acbb7640ba
parent 17818 d9a55e3014f88e9f9242010c933ffc93c0994e70
child 17820 6747a00cdc2c2d82c1fe8c459222afdad7625920
push id1452
push usershaver@mozilla.com
push dateFri, 22 Aug 2008 00:08:22 +0000
treeherderautoland@d13bb0868596 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a1pre
Add shark support to md5.js directly, no longer around the recorder.
js/src/jstracer.cpp
js/src/md5.js
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -1164,27 +1164,21 @@ nanojit::Assembler::asm_bailout(LIns *gu
 }
 
 void
 js_DeleteRecorder(JSContext* cx)
 {
     JSTraceMonitor* tm = &JS_TRACE_MONITOR(cx);
     delete tm->recorder;
     tm->recorder = NULL;
-#ifdef MOZ_SHARK
-    JS_StopChudRemote();
-#endif    
 }
 
 bool
 js_StartRecorder(JSContext* cx, GuardRecord* anchor, Fragment* f, uint8* typeMap)
 {
-#ifdef MOZ_SHARK
-    JS_StartChudRemote();
-#endif    
     /* start recording if no exception during construction */
     JS_TRACE_MONITOR(cx).recorder = new (&gc) TraceRecorder(cx, anchor, f, typeMap);
     if (cx->throwing) {
         js_AbortRecording(cx, NULL, "setting up recorder failed");
         return false;
     }
     return true;
 }
--- a/js/src/md5.js
+++ b/js/src/md5.js
@@ -278,9 +278,12 @@ And, Montague, come you this afternoon,\
 To know our further pleasure in this case,\n\
 To old Free-town, our common judgment-place.\n\
 Once more, on pain of death, all men depart."
 
 for (var i = 0; i <4; i++) {
     plainText += plainText;
 }
 
+connectShark();
+startShark();
 var md5Output = hex_md5(plainText);
+stopShark();