Browse Source

Log ScopedActionLock action names

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.5.5
falkTX 1 year ago
parent
commit
b0242e2553
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 25 additions and 2 deletions
  1. +4
    -2
      source/backend/engine/CarlaEngineInternal.cpp
  2. +21
    -0
      source/backend/engine/CarlaEngineInternal.hpp

+ 4
- 2
source/backend/engine/CarlaEngineInternal.cpp View File

@@ -782,7 +782,8 @@ ScopedActionLock::ScopedActionLock(CarlaEngine* const engine,
#ifndef CARLA_OS_WASM
#if defined(DEBUG) || defined(BUILD_BRIDGE)
// block wait for unlock on processing side
carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i) - blocking START", pluginId);
carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i|%i:%s) - blocking START",
pluginId, action, EnginePostAction2Str(action));
#endif

if (! pData->nextAction.postDone)
@@ -808,7 +809,8 @@ ScopedActionLock::ScopedActionLock(CarlaEngine* const engine,
}

#if defined(DEBUG) || defined(BUILD_BRIDGE)
carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i) - blocking DONE", pluginId);
carla_stdout(ACTION_MSG_PREFIX "ScopedPluginAction(%i|%i:%s) - blocking DONE",
pluginId, action, EnginePostAction2Str(action));
#endif
#endif



+ 21
- 0
source/backend/engine/CarlaEngineInternal.hpp View File

@@ -203,6 +203,27 @@ enum EnginePostAction {
#endif
};

static inline
const char* EnginePostAction2Str(const EnginePostAction action)
{
switch (action)
{
case kEnginePostActionNull:
return "kEnginePostActionNull";
case kEnginePostActionZeroCount:
return "kEnginePostActionZeroCount";
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH
case kEnginePostActionRemovePlugin:
return "kEnginePostActionRemovePlugin";
case kEnginePostActionSwitchPlugins:
return "kEnginePostActionSwitchPlugins";
#endif
}

carla_stderr("CarlaBackend::EnginePostAction2Str(%i) - invalid action", action);
return nullptr;
}

struct EngineNextAction {
EnginePostAction opcode;
uint pluginId;


Loading…
Cancel
Save