cpu usage extremely high for StackDepotPut
- Dominant language
- C
- Stars
- 12.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
My program is compiled with version llvm-3.4, and runs on centos 6.4. Here is the situation.
When I perf with `perf top -p pid`, it shows StackDepotPut use more than 70% of my cpu. Assembly code shows that `find(StackDesc *s, const uptr *stack, uptr size, u32 hash)` use most of my cpu. Though I adjust `malloc_context_size` to many values, cpu usage always becomes unacceptablely high. I suspect that cache-misses cause this, because cache-misses in find is very high, but I'm not sure and find no reason to cause high cache-misses.
Contributor guide
Research direction
Start by reproducing the report with perf top on the sanitizer runtime, focusing on StackDepotPut and find(StackDesc *s, const uptr *stack, uptr size, u32 hash). Compare behavior across the reported malloc_context_size values and inspect the cache-miss measurements; done means identifying the cause of the excessive CPU use and defining a verified correction or explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, centos, linux
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100