microsoft / microsoft/perfview

Inconsistent CPU usage, why?

Open
#2,184 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.7k
Forks
775
Avg merge
5d 11h
Merged PRs (30d)
9

Description

I have a trace, on Thread Time (with StartStopActivities), the method called HighCPUArraySort registered about 16 seconds (16471.5 inc) CPU time:

Image

But on CPU stack, it shows only have about 8.5s (8515.0 inc) CPU time:

Image

Why is it significantly smaller number on CPU view than it is on the activity view?

Trace session (etl) attached:
728d7e2465f04ab2992cb9177322507f.etl.zip

Can anyone help take a look? Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the attached ETL trace in PerfView and compare the Thread Time and CPU Stack views for HighCPUArraySort. Check how each view accounts for the reported CPU time; done means explaining the discrepancy or identifying a reproducible defect, with any relevant trace observations documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.