add a new "Run Loop" timing stats for ALSA and JACK backends

This commit is contained in:
Paul Davis 2021-06-13 10:28:23 -06:00
parent a89ad7a265
commit a5f7c793e3
3 changed files with 8 additions and 4 deletions

View File

@ -851,11 +851,12 @@ public:
enum TimingTypes {
DeviceWait = 0,
PreProcess = 1,
ProcessCallback = 2,
PostProcess = 3,
PreProcess,
ProcessCallback,
PostProcess,
RunLoop,
/* end */
NTT = 4
NTT
};
PBD::TimingStats dsp_stats[NTT];

View File

@ -1855,6 +1855,7 @@ AlsaAudioBackend::main_process_thread ()
dsp_stats[DeviceWait].start();
nr = _pcmi->pcm_wait ();
dsp_stats[DeviceWait].update();
dsp_stats[RunLoop].start ();
/* update DLL */
dsp_stats[PreProcess].start();
@ -2021,6 +2022,7 @@ AlsaAudioBackend::main_process_thread ()
++last_n_periods;
dsp_stats[PostProcess].update ();
dsp_stats[RunLoop].update ();
}
if (xrun && (_pcmi->capt_xrun () > 0 || _pcmi->play_xrun () > 0)) {

View File

@ -977,6 +977,7 @@ JACKAudioBackend::process_thread ()
AudioEngine::thread_init_callback (this);
while (1) {
TimerRAII ltr (dsp_stats[RunLoop]);
GET_PRIVATE_JACK_POINTER_RET(_priv_jack,0);
dsp_stats[AudioBackend::DeviceWait].start ();