mono icon indicating copy to clipboard operation
mono copied to clipboard

Investigate heavy stack from ConcurrentQueueSegment

Open fanyang-mono opened this issue 5 years ago • 4 comments

Steps to Reproduce

Make the following change to mono/netcore/build.sh Screen Shot 2020-01-07 at 11 20 17 AM

Then run the following script by following the instructions in it. profileMonoScript.sh.zip

Current Behavior

Heavy stack from ConcurrentQueueSegment, according to the following flamegraph (the highlighted area) Screen Shot 2020-01-07 at 10 29 24 AM

January 8 LLVM AOT flamegraph with ConcurrentQueueSegment<T>.TryDequeue highlighted: Screen Shot 2020-01-17 at 12 10 26

Expected Behavior

ConcurrentQueueSegment which does only few Volatile.Reads should take a small portion of time of the whole program.

On which platforms did you notice this

[ ] macOS [x] Linux [ ] Windows

Version Used:

mono master: 61eb2be2e10c228c5915d90a90b52e7d410c0f25 from Dec 30th, 2019

fanyang-mono avatar Jan 07 '20 16:01 fanyang-mono

I'm not seeing this on the Jan 8 flame graph. Can you make sure I'm not missing something? @fanyang-mono

CoffeeFlux avatar Jan 10 '20 20:01 CoffeeFlux

This was fixed by Zoltan's change as well

marek-safar avatar Jan 10 '20 20:01 marek-safar

Fixed by #18377

fanyang-mono avatar Jan 10 '20 20:01 fanyang-mono

I made a mistake. This issue still exists. :(

fanyang-mono avatar Jan 17 '20 16:01 fanyang-mono