static string BacktraceStringifier(Backtrace bt, int max_width) { StringBuilder sb = new StringBuilder(); sb.Append("type="); sb.Append(Util.Ellipsize(max_width - 5, bt.Type.Name)); foreach (Frame frame in bt.Frames) { if (!frame.MethodName.StartsWith("(wrapper")) { sb.Append('\n'); sb.Append(Util.Ellipsize(max_width, frame.MethodName)); } } return(sb.ToString()); }
private void ReadSummary_Backtraces(BinaryReader reader) { reader.BaseStream.Seek(backtrace_index_offset, SeekOrigin.Begin); for (int i = 0; i < backtraces.Length; ++i) { Backtrace backtrace; backtrace = new Backtrace((uint)i, this); backtraces [i] = backtrace; uint type_code; type_code = reader.ReadUInt32(); backtrace.Type = types [type_code]; backtrace.LastGeneration = reader.ReadInt32(); backtrace.LastObjectStats.Read(reader); backtrace_pos [i] = reader.ReadInt64(); } }
private void ReadLogFileChunk_Backtrace(BinaryReader reader) { uint code; code = reader.ReadUInt32(); uint type_code; type_code = reader.ReadUInt32(); int n_frames; n_frames = reader.ReadInt16(); if (i_backtrace >= n_backtraces) { for (int i = 0; i < n_frames; ++i) { reader.ReadUInt32(); // skip method code reader.ReadUInt32(); // skip native offset } return; } Backtrace backtrace; backtrace = new Backtrace(code, this); backtraces [i_backtrace] = backtrace; backtrace_codes [i_backtrace] = code; backtrace_type_codes [i_backtrace] = type_code; Frame [] frames = new Frame [n_frames]; backtrace.Frames = frames; for (int i = 0; i < n_frames; ++i) { frames [i].MethodCode = reader.ReadUInt32(); frames [i].IlOffset = reader.ReadUInt32(); } ++i_backtrace; }
private void ReadSummary_Backtraces(BinaryReader reader) { reader.BaseStream.Seek (backtrace_index_offset, SeekOrigin.Begin); for (int i = 0; i < backtraces.Length; ++i) { Backtrace backtrace; backtrace = new Backtrace ((uint) i, this); backtraces [i] = backtrace; uint type_code; type_code = reader.ReadUInt32 (); backtrace.Type = types [type_code]; backtrace.LastGeneration = reader.ReadInt32 (); backtrace.LastObjectStats.Read (reader); backtrace_pos [i] = reader.ReadInt64 (); } }
private void ReadLogFileChunk_Backtrace(BinaryReader reader) { uint code; code = reader.ReadUInt32 (); uint type_code; type_code = reader.ReadUInt32 (); int n_frames; n_frames = reader.ReadInt16 (); if (i_backtrace >= n_backtraces) { for (int i = 0; i < n_frames; ++i) { reader.ReadUInt32 (); // skip method code reader.ReadUInt32 (); // skip native offset } return; } Backtrace backtrace; backtrace = new Backtrace (code, this); backtraces [i_backtrace] = backtrace; backtrace_codes [i_backtrace] = code; backtrace_type_codes [i_backtrace] = type_code; Frame [] frames = new Frame [n_frames]; backtrace.Frames = frames; for (int i = 0; i < n_frames; ++i) { frames [i].MethodCode = reader.ReadUInt32 (); frames [i].IlOffset = reader.ReadUInt32 (); } ++i_backtrace; }
static string BacktraceStringifier(Backtrace bt, int max_width) { StringBuilder sb = new StringBuilder (); sb.Append ("type="); sb.Append (Util.Ellipsize (max_width-5, bt.Type.Name)); foreach (Frame frame in bt.Frames) { if (! frame.MethodName.StartsWith ("(wrapper")) { sb.Append ('\n'); sb.Append (Util.Ellipsize (max_width, frame.MethodName)); } } return sb.ToString (); }