grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
10.13k stars 614 forks source link

ReentrantLock and Synchronized in Pyroscope-Java: Block vs Mutex Classification #3576

Open wang-qijia opened 2 months ago

wang-qijia commented 2 months ago

After integrating pyroscope-java into the Java service, I found that the analysis data for ReentrantLock and synchronized appear in the block and mutex types respectively. Based on mutex classification, shouldn't they both be categorized under the mutex analysis type? Perhaps I misunderstand something. Please help clarify.

If the blocking is caused by the mutex lock synchronized, will it be included in the block type? Please help explain the relationship between block and mutex.