public static void WriteObjectAlloc(int id, int size, string type) { if (!Connected) return; long time = Stopwatch.GetTimestamp(); var alloc = new Protocol.Memory_objectAllocation(); alloc.id = id; alloc.size = size; alloc.stackid = 0; // TODO: get stack information alloc.time = ToMicroSeconds(time - sStartupTime); alloc.type = type; WriteValue(".memory.newObject", alloc); }
public static void WriteObjectAlloc(int id, int size, string type) { if (!Connected) return; if (!CategoryEnabledAllocTraces) return; var alloc = new Protocol.Memory_objectAllocation(); alloc.id = id; alloc.size = size; alloc.stackid = (sMethodMap!=null) ? sMethodMap.GetCallStackId() : 0; alloc.time = sLog.GetTime(); alloc.type = type; WriteValue(".memory.newObject", alloc); }