DISTRHO / DPF

DISTRHO Plugin Framework
ISC License
655 stars 95 forks source link

Any good idea to profile `Plugin::run()`? #430

Closed AnClark closed 10 months ago

AnClark commented 1 year ago

Hi falkTX!

I want to improve performance of my plugin, so I planned to profile Plugin::run() with Calllgrind.

However, Callgrind did not report anything about the function, just showing the execution of DISTRHO::Plugin and DISTRHO::UI's constructors.


How to reproduce:

  1. Build standalone version of my project Minaton-XT
  2. Run standalone with Valgrind:
    cd build/bin
    valgrind --tool=callgrind --verbose ./minaton
  3. Use qpwgraph to connect JACK wire, and play some notes with MIDI keyboard.
  4. Exit standalone, then use Speedscope to open Callgrind dump.

Do you have any better idea to profile Plugin::run() properly?

BTW: Attachment is the JSON file exported by Speedscope. You can load it by the site.

callgrind.speedscope.json.tar.gz

AnClark commented 10 months ago

I've found a solution: using Linux tool perf with plugin built with Debug or RelWithDebInfo profile.