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
9.79k stars 583 forks source link

Add mutex profiling support #660

Closed lizthegrey closed 2 years ago

lizthegrey commented 2 years ago

https://github.com/pyroscope-io/pyroscope/blob/9e6022b95e935e81ba6a3e6c028495d271a510bf/pkg/scrape/config/config.go#L40

needs an entry for mutex profiling.

kolesnikovae commented 2 years ago

Default configuration only includes Go cpu and mem profiles but eventually we will extend the list. Although this part is not yet fully supported (and documented), it is possible to scrape arbitrary profiles – including mutex, goroutines, and block:

scrape-configs:
- job-name: my-job
   enabled-profiles: [cpu, mem, mutex]
   profiles:
     mutex:
       path: /debug/pprof/mutex
       sample-types:
         mutex:
           units: objects
           aggregation: average
           cumulative: true

We will add support for all of them soon!

eh-am commented 2 years ago

@kolesnikovae Just out of curiosity, how far are we from supporting those?

kolesnikovae commented 2 years ago

@eh-am basically, we need a couple of little changes:

eh-am commented 2 years ago

Implemented in https://github.com/pyroscope-io/pyroscope/pull/1178