internal void ReportCallCountSizes(Histogram callstackHistogram) { uint[] callCount = new uint[readNewLog.funcName.Length]; callstackHistogram.CalculateCallCounts(callCount); Console.WriteLine("{0},{1},{2} {3}", "# Calls", "Function Size", "Function Name", "Function Signature"); foreach (FunctionDescriptor fd in functionList) { Console.WriteLine("{0},{1},{2} {3}", callCount[fd.functionId], fd.funcSize, readNewLog.funcName[fd.functionId], readNewLog.funcSignature[fd.functionId]); } }
internal void UpdateObjects(Histogram relocatedHistogram, ulong oldId, ulong newId, uint length, int tickIndex, SampleObjectTable sampleObjectTable) { if (lastPos >= readNewLog.pos) return; lastPos = readNewLog.pos; lastTickIndex = tickIndex; intervalTable.Relocate(oldId, newId, length); if (oldId == newId) return; ulong nextId; ulong lastId = oldId + length; LiveObject o; for (GetNextObject(oldId, lastId, out o); o.id < lastId; GetNextObject(nextId, lastId, out o)) { nextId = o.id + o.size; ulong offset = o.id - oldId; if (sampleObjectTable != null) sampleObjectTable.Delete(o.id, o.id + o.size, tickIndex); Zero(o.id, o.size); InsertObject(newId + offset, o.typeSizeStacktraceIndex, o.allocTickIndex, tickIndex, false, sampleObjectTable); if (relocatedHistogram != null) relocatedHistogram.AddObject(o.typeSizeStacktraceIndex, 1); } }