Quellcode durchsuchen

output binary cache memory

Simon Krajewski vor 1 Jahr
Ursprung
Commit
9d1f947b1e
3 geänderte Dateien mit 7 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/compiler/compilationCache.ml
  2. 3 0
      src/context/memory.ml
  3. 3 0
      std/haxe/display/Server.hx

+ 1 - 1
src/compiler/compilationCache.ml

@@ -108,7 +108,7 @@ class context_cache (index : int) (sign : Digest.t) = object(self)
 
 (* Pointers for memory inspection. *)
 	method get_pointers : unit array =
-		[|Obj.magic files;Obj.magic modules|]
+		[|Obj.magic files;Obj.magic modules;Obj.magic binary_cache|]
 end
 
 let create_directory path mtime = {

+ 3 - 0
src/context/memory.ml

@@ -169,6 +169,9 @@ let get_memory_json (cs : CompilationCache.t) mreq =
 				"size",jint (mem_size cache_mem.(1));
 				"list",jarray l;
 			];
+			"binaryCache",jobject [
+				"size",jint (mem_size cache_mem.(2));
+			];
 		]
 	| MModule(sign,path) ->
 		let cc = cs#get_context sign in

+ 3 - 0
std/haxe/display/Server.hx

@@ -139,6 +139,9 @@ typedef HaxeContextMemoryResult = {
 	final syntaxCache:{
 		final size:Int;
 	};
+	final binaryCache:{
+		final size:Int;
+	};
 	final ?leaks:Array<{
 		final path:String;
 		final leaks:Array<{