public void AddRangesFromString(string str) { StringReader sr = new StringReader(str); string line = null; char[] spacetab = new char[] { ' ', '\t' }; while ((line = sr.ReadLine()) != null) { line = line.Trim(); int ich = line.IndexOfAny(spacetab); if (ich < 0) { continue; } ulong start = ETLTrace.ParseHex(line, 0); ulong end = ETLTrace.ParseHex(line, ich); if (start >= end) { continue; } AddRange(start, end); } }
public ETWLineReader(ETLTrace trace) { this.trace = trace; this.t0 = trace.itparms.T0; this.t1 = trace.itparms.T1; int slot = (int)(t0 / 100000); long offset = trace.offsets[slot]; stm = trace.stm; stm.Position = offset; this.idThreadId = trace.atomsFields.Lookup("ThreadID"); this.idNewTID = trace.atomsFields.Lookup("New TID"); this.idOldTID = trace.atomsFields.Lookup("Old TID"); this.idBaseAddr = trace.atomsFields.Lookup("BaseAddr"); this.idEndAddr = trace.atomsFields.Lookup("EndAddr"); this.idVirtualAddr = trace.atomsFields.Lookup("VirtualAddr"); this.idProcessPid = trace.atomsFields.Lookup("Process Name ( PID)"); this.threadFilters = trace.itparms.GetThreadFilters(); this.processFilters = trace.itparms.GetProcessFilters(); this.byFilterText = new byte[0]; // trace.itparms.FilterText; idType = -1; b = new ByteWindow(); bRecord = new ByteWindow(); bAll = new ByteWindow(); ComputeMemoryRanges(); }
public MemProcessor(ETLTrace trace) { this.trace = trace; idAlloc = trace.atomsRecords.Lookup("VirtualAlloc"); idFree = trace.atomsRecords.Lookup("VirtualFree"); memInfos = new MemInfo[trace.atomsProcesses.Count]; Reset(); }
public TraceParameters(ETLTrace t) { eventfilter = new AtomFilter(t.RecordAtoms); stackfilter = new AtomFilter(t.RecordAtoms); processfilter = new IndexFilter(t.Processes.Count); threadfilter = new IndexFilter(t.Threads.Count); stackParameters = new StackParameters(); rollupParameters = new RollupParameters(); contextSwitchParameters = new ContextSwitchParameters(); contextSwitchParameters.TopThreadCount = t.Threads.Count; FilterText = ""; MemoryFilters = ""; T0 = 0; T1 = t.TMax; RollupTimeIntervals = 20; }