コード例 #1
0
 private bool Equals(StackViewerModel other)
 {
     return(string.Equals(this.Filename, other.Filename) &&
            string.Equals(this.Pid, other.Pid) &&
            string.Equals(this.StackType, other.StackType) &&
            string.Equals(this.Start, other.Start) &&
            string.Equals(this.End, other.End) &&
            string.Equals(this.GroupPats, other.GroupPats) &&
            string.Equals(this.IncPats, other.IncPats) &&
            string.Equals(this.ExcPats, other.ExcPats) &&
            string.Equals(this.FoldPats, other.FoldPats) &&
            string.Equals(this.FoldPct, other.FoldPct) &&
            string.Equals(this.DrillIntoKey, other.DrillIntoKey));
 }
コード例 #2
0
        public async ValueTask <ICallTreeData> GetCallTreeAsync(StackViewerModel model, GenericStackSource stackSource = null)
        {
            await this.EnsureInitialized();

            lock (this.callTreeDataCache)
            {
                if (!this.callTreeDataCache.TryGetValue(model, out var value))
                {
                    value = new CallTreeData(stackSource ?? this.deserializer.GetStackSource((ProcessIndex)int.Parse(model.Pid), int.Parse(model.StackType)), model, this.symbolReader);
                    this.callTreeDataCache.Add(model, value);
                }

                return(value);
            }
        }
コード例 #3
0
        public async ValueTask <ICallTreeData> GetCallTreeAsync(StackViewerModel model, StackSource stackSource = null)
        {
            await this.EnsureInitialized();

            lock (this.callTreeDataCache)
            {
                if (!this.callTreeDataCache.TryGetValue(model, out var value))
                {
                    double start = string.IsNullOrEmpty(model.Start) ? 0.0 : double.Parse(model.Start);
                    double end   = string.IsNullOrEmpty(model.End) ? 0.0 : double.Parse(model.End);

                    value = new CallTreeData(stackSource ?? this.deserializer.GetStackSource((ProcessIndex)int.Parse(model.Pid), int.Parse(model.StackType), start, end), model);
                    this.callTreeDataCache.Add(model, value);
                }

                return(value);
            }
        }
コード例 #4
0
        public async ValueTask <ICallTreeData> GetCallTreeAsync(StackViewerModel model, StackSource stackSource = null)
        {
            await this.EnsureInitialized();

            lock (this.callTreeDataCache)
            {
                if (!this.callTreeDataCache.TryGetValue(model, out var value))
                {
                    double start = string.IsNullOrEmpty(model.Start) ? 0.0 : double.Parse(model.Start);
                    double end   = string.IsNullOrEmpty(model.End) ? 0.0 : double.Parse(model.End);

                    var key = new StackSourceCacheKey((ProcessIndex)int.Parse(model.Pid), int.Parse(model.StackType), start, end, model.DrillIntoKey);
                    if (!this.stackSourceCache.TryGetValue(key, out var ss))
                    {
                        ss = stackSource ?? this.deserializer.GetStackSource((ProcessIndex)int.Parse(model.Pid), int.Parse(model.StackType), start, end);
                        this.stackSourceCache.Add(key, ss);
                    }
                    else
                    {
                        var drillIntoStackSource = new CopyStackSource(GetTraceEventStackSource(ss));

                        ss.ForEach(delegate(StackSourceSample sample)
                        {
                            drillIntoStackSource.AddSample(sample);
                        });

                        ss = drillIntoStackSource;
                    }

                    value = new CallTreeData(stackSource ?? ss, model);
                    this.callTreeDataCache.Add(model, value);
                }

                return(value);
            }
        }
コード例 #5
0
ファイル: CallTreeData.cs プロジェクト: zcg19/perfview
 public CallTreeData(GenericStackSource stackSource, StackViewerModel model, SymbolReader symbolReader)
 {
     this.stackSource  = stackSource;
     this.model        = model;
     this.symbolReader = symbolReader;
 }
コード例 #6
0
ファイル: CallTreeData.cs プロジェクト: raffaeler/perfview-1
 public CallTreeData(StackSource stackSource, StackViewerModel model)
 {
     this.stackSource = stackSource;
     this.model       = model;
 }
コード例 #7
0
 public StackViewerController(IDeserializedDataCache dataCache, StackViewerModel model)
 {
     this.dataCache = dataCache;
     this.model     = model;
 }