Skip to content

cdbstack - last sample is dropped #1011

@wmascia

Description

@wmascia

The last sample in the file doesn't get added. So I added the following on line 119 of DebuggerStackSource.cs just after the end of the for(;;) loop. Just a copy/paste from the code above (including the sample.Metric = 1 per Issue 1009 - No metrics in cdbstacks).

            if (stack.Count != 0)
            {

                StackSourceCallStackIndex parent = StackSourceCallStackIndex.Invalid;
                for (int i = stack.Count - 1; i >= 0; --i)
                {
                    parent = Interner.CallStackIntern(stack[i].frame, parent);
                }

                stack.Clear();

                sample.Metric = 1;
                sample.StackIndex = parent;
                sample.TimeRelativeMSec = time;
                time++;
                AddSample(sample);
            }

UPDATE: added the src file name

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions