rename mjitCodeSize to mjitMemoryUsed
authorMike Shaver <shaver@mozilla.org>
Wed, 05 Jan 2011 18:07:39 -0800
changeset 59854 3841147809206fd53e9470e10e3510406e2133ab
parent 59853 6df0d209b91c5d83fb999ea5d289f645845364d0
child 59855 eee5ef232ff5e2dc145f30010f92200a20c6790c
push id4
push usershaver@mozilla.com
push dateThu, 06 Jan 2011 02:08:03 +0000
milestone2.0b9pre
rename mjitCodeSize to mjitMemoryUsed
js/src/jscntxt.h
js/src/methodjit/Compiler.cpp
js/src/methodjit/MethodJIT.cpp
js/src/shell/js.cpp
js/src/xpconnect/src/xpcjsruntime.cpp
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -1446,17 +1446,17 @@ struct JSRuntime {
 #endif
 
     JSWrapObjectCallback wrapObjectCallback;
     JSPreWrapCallback    preWrapObjectCallback;
 
     JSC::ExecutableAllocator *regExpAllocator;
 
 #ifdef JS_METHODJIT
-    uint32               mjitCodeSize;
+    uint32               mjitMemoryUsed;
 #endif
 
     JSRuntime();
     ~JSRuntime();
 
     bool init(uint32 maxbytes);
 
     void setGCTriggerFactor(uint32 factor);
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -786,17 +786,17 @@ mjit::Compiler::finishThisUp(JITScript *
 
     JS_ASSERT(size_t(cursor - (uint8*)jit) == totalBytes);
 
     jit->nmap = nmap;
     jit->nNmapPairs = nNmapLive;
     *jitp = jit;
 
     /* We tolerate a race in the stats. */
-    cx->runtime->mjitCodeSize += totalSize + totalBytes;
+    cx->runtime->mjitMemoryUsed += totalSize + totalBytes;
 
     return Compile_Okay;
 }
 
 #ifdef DEBUG
 #define SPEW_OPCODE()                                                         \
     JS_BEGIN_MACRO                                                            \
         if (IsJaegerSpewChannelActive(JSpew_JSOps)) {                         \
--- a/js/src/methodjit/MethodJIT.cpp
+++ b/js/src/methodjit/MethodJIT.cpp
@@ -857,26 +857,26 @@ void
 mjit::ReleaseScriptCode(JSContext *cx, JSScript *script)
 {
     // NB: The recompiler may call ReleaseScriptCode, in which case it
     // will get called again when the script is destroyed, so we
     // must protect against calling ReleaseScriptCode twice.
     JITScript *jscr;
 
     if ((jscr = script->jitNormal)) {
-        cx->runtime->mjitCodeSize -= jscr->nonCodeSize() + jscr->codeSize();
+        cx->runtime->mjitMemoryUsed -= jscr->nonCodeSize() + jscr->codeSize();
 
         jscr->~JITScript();
         cx->free(jscr);
         script->jitNormal = NULL;
         script->jitArityCheckNormal = NULL;
     }
 
     if ((jscr = script->jitCtor)) {
-        cx->runtime->mjitCodeSize -= jscr->nonCodeSize() + jscr->codeSize();
+        cx->runtime->mjitMemoryUsed -= jscr->nonCodeSize() + jscr->codeSize();
 
         jscr->~JITScript();
         cx->free(jscr);
         script->jitCtor = NULL;
         script->jitArityCheckCtor = NULL;
     }
 }
 
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -4206,17 +4206,17 @@ Deserialize(JSContext *cx, uintN argc, j
     }
     JS_SET_RVAL(cx, vp, v);
     return true;
 }
 
 JSBool
 MJitStats(JSContext *cx, uintN argc, jsval *vp)
 {
-    JS_SET_RVAL(cx, vp, INT_TO_JSVAL(cx->runtime->mjitCodeSize));
+    JS_SET_RVAL(cx, vp, INT_TO_JSVAL(cx->runtime->mjitMemoryUsed));
     return true;
 }
 
 /* We use a mix of JS_FS and JS_FN to test both kinds of natives. */
 static JSFunctionSpec shell_functions[] = {
     JS_FN("version",        Version,        0,0),
     JS_FN("revertVersion",  RevertVersion,  0,0),
     JS_FN("options",        Options,        0,0),
--- a/js/src/xpconnect/src/xpcjsruntime.cpp
+++ b/js/src/xpconnect/src/xpcjsruntime.cpp
@@ -1200,17 +1200,17 @@ NS_MEMORY_REPORTER_IMPLEMENT(XPConnectJS
 /* FIXME: use API provided by bug 623271 */
 #include "jscntxt.h"
 
 static PRInt64
 GetJSMethodJitCodeMemoryInUse(void *data)
 {
     JSRuntime *rt = nsXPConnect::GetRuntimeInstance()->GetJSRuntime();
 #ifdef JS_METHODJIT
-    return rt->mjitCodeSize;
+    return rt->mjitMemoryUsed;
 #else
     return 0;
 #endif
 }
 
 NS_MEMORY_REPORTER_IMPLEMENT(XPConnectJSMethodJitCode,
                              "xpconnect/js/mjit-code",
                              "Memory in use by method-jit for compiled code",