Author: dsnell Date: 2006-08-02 22:38:24 -0400 (Wed, 02 Aug 2006) New Revision: 63275
Modified: branches/dmsnell/heap-buddy/analyzer/Backtrace.cs branches/dmsnell/heap-buddy/analyzer/MemGraph.cs branches/dmsnell/heap-buddy/analyzer/OutfileReader.cs branches/dmsnell/heap-buddy/profiler/outfile-writer.c Log: Modified: branches/dmsnell/heap-buddy/analyzer/Backtrace.cs =================================================================== --- branches/dmsnell/heap-buddy/analyzer/Backtrace.cs 2006-08-03 01:45:10 UTC (rev 63274) +++ branches/dmsnell/heap-buddy/analyzer/Backtrace.cs 2006-08-03 02:38:24 UTC (rev 63275) @@ -29,9 +29,6 @@ public Type Type; public int LastGeneration; - - public long TimeT; - public DateTime Timestamp; public ObjectStats LastObjectStats; Modified: branches/dmsnell/heap-buddy/analyzer/MemGraph.cs =================================================================== --- branches/dmsnell/heap-buddy/analyzer/MemGraph.cs 2006-08-03 01:45:10 UTC (rev 63274) +++ branches/dmsnell/heap-buddy/analyzer/MemGraph.cs 2006-08-03 02:38:24 UTC (rev 63275) @@ -6,66 +6,8 @@ public class Memgraph { - public class AllocData { - public uint bytes; - - public AllocData () { - bytes = 0; - } - } - public Memgraph (OutfileReader reader, string data) { - - DisplayRawData (reader, data); } - - public void DisplayRawData (OutfileReader reader, string data) - { - int count = 0; - Table table = new Table (); - table.AddHeaders ("Time", "Allocated Bytes"); - - Hashtable Data = new Hashtable (); - AllocData ad; - - foreach (Backtrace bt in reader.Backtraces) { - count++; - if (data != null || bt.Type.Name == data) { - if (Data.Contains (bt.TimeT)) - ad = (AllocData)Data[bt.TimeT]; - else { - ad = new AllocData (); - Data[bt.TimeT] = ad; - } - - ad.bytes += bt.LastObjectStats.AllocatedTotalBytes; - } - } - - uint maxbytes = 0; - uint minbytes = 100000000; - uint avgbytes = 0; - - foreach (DictionaryEntry de in Data) { - uint b = ((AllocData)de.Value).bytes; - - table.AddRow (de.Key, b); - - avgbytes += b; - - if (b < minbytes) - minbytes = b; - else if (b > maxbytes) - maxbytes = b; - } - - Console.WriteLine (table); - Console.WriteLine ("{0} allocations", count); - Console.WriteLine ("Maximum Allocation: {0}", Util.PrettySize (maxbytes)); - Console.WriteLine ("Minimum Allocation: {0}", Util.PrettySize (minbytes)); - Console.WriteLine ("Average Allocation: {0}", Util.PrettySize (avgbytes / Data.Count)); - } - } } Modified: branches/dmsnell/heap-buddy/analyzer/OutfileReader.cs =================================================================== --- branches/dmsnell/heap-buddy/analyzer/OutfileReader.cs 2006-08-03 01:45:10 UTC (rev 63274) +++ branches/dmsnell/heap-buddy/analyzer/OutfileReader.cs 2006-08-03 02:38:24 UTC (rev 63275) @@ -435,8 +435,6 @@ Backtrace backtrace; backtrace = new Backtrace (code, this); - - backtrace.TimeT = reader.ReadInt64 (); uint type_code; type_code = reader.ReadUInt32 (); @@ -454,8 +452,6 @@ backtraces [i_backtrace] = backtrace; - backtrace.Timestamp = Util.ConvertTimeT (backtrace.TimeT); - backtrace_codes [i_backtrace] = code; backtrace_type_codes [i_backtrace] = type_code; Modified: branches/dmsnell/heap-buddy/profiler/outfile-writer.c =================================================================== --- branches/dmsnell/heap-buddy/profiler/outfile-writer.c 2006-08-03 01:45:10 UTC (rev 63274) +++ branches/dmsnell/heap-buddy/profiler/outfile-writer.c 2006-08-03 02:38:24 UTC (rev 63275) @@ -206,15 +206,9 @@ g_hash_table_insert (ofw->seen_items, method, method); ++ofw->method_count; } - } - - /* Now we can spew out the accountant's context */ - time_t timestamp; - time (×tamp); - + } write_byte (ofw->out, TAG_CONTEXT); write_pointer (ofw->out, acct); - write_int64 (ofw->out, (gint64)timestamp); write_pointer (ofw->out, acct->klass); write_int16 (ofw->out, frame_count); for (i = 0; acct->backtrace [i] != NULL; ++i) { _______________________________________________ Mono-patches maillist - Mono-patches@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-patches