public unsafe void WriteDataSet(IProfilingDataSet dataSet) { UnmanagedProfilingDataSet uDataSet = dataSet as UnmanagedProfilingDataSet; if (dataSet == null) { throw new InvalidOperationException("TempFileDatabase cannot write DataSets other than UnmanagedProfilingDataSet!"); } database.AddDataset((byte *)uDataSet.StartPtr.ToPointer(), uDataSet.Length, uDataSet.NativeStartPosition, uDataSet.NativeRootFuncInfoPosition, uDataSet.IsFirst); database.is64Bit = uDataSet.Is64Bit; }
/// <summary> /// Copies all data to a different writer. /// </summary> /// <param name="writer"></param> /// <param name="progressReport">Used to report the progress of writing all DataSets, returning false tells WriteTo to cancel the process.</param> public void WriteTo(IProfilingDataWriter writer, Predicate <double> progressReport) { writer.ProcessorFrequency = this.processorFrequency; writer.WriteMappings(this.nameMappings.Values); for (int i = 0; i < this.DataSetCount; i++) { using (UnmanagedProfilingDataSet dataSet = this.LoadDataSet(i)) writer.WriteDataSet(dataSet); if (!progressReport.Invoke((i + 1) / (double)this.DataSetCount)) { break; } } }
/// <summary> /// Copies all data to a different writer. /// </summary> /// <param name="writer"></param> /// <param name="progressReport">Used to report the progress of writing all DataSets, returning false tells WriteTo to cancel the process.</param> public void WriteTo(IProfilingDataWriter writer, Predicate <double> progressReport) { writer.ProcessorFrequency = processorFrequency; writer.WriteMappings(nameMappings.Values); writer.WritePerformanceCounterData(counters); writer.WriteEventData(events); for (int i = 0; i < DataSetCount; i++) { using (UnmanagedProfilingDataSet dataSet = LoadDataSet(i)) writer.WriteDataSet(dataSet); if (!progressReport.Invoke((i + 1) / (double)DataSetCount)) { break; } } }
internal UnmanagedCallTreeNode64(UnmanagedProfilingDataSet dataSet, FunctionInfo *data, CallTreeNode parent) { this.data = data; this.dataSet = dataSet; this.parent = parent; }
internal UnmanagedCallTreeNode64(UnmanagedProfilingDataSet dataSet, FunctionInfo* data, CallTreeNode parent) { this.data = data; this.dataSet = dataSet; this.parent = parent; }