Skip to contentSkip to conversation

mttcg: Move tb lock asserts under DEBUG_LOCKING

PATCH Richard Henderson 2 participants 2 messages Nov 15, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 2 lines · Pranith Kumar

Move the asserts in tb_lock/unlock() to DEBUG_LOCKING to avoid the assert checking overhead in normal builds.

I know DEBUG_LOCKING already exists in translate-all.c, but I think both this and the old ought to be using CONFIG_DEBUG_TCG, so that it is regularly enabled.

At which point you might as well use tcg_debug_assert instead of these wrappers around g_assert.

r~

#2 lore raw
Quoted 6 lines · Richard Henderson
Quoted 3 lines · Pranith Kumar

Move the asserts in tb_lock/unlock() to DEBUG_LOCKING to avoid the assert checking overhead in normal builds.

Quoted 7 lines

I know DEBUG_LOCKING already exists in translate-all.c, but I think both this and the old ought to be using CONFIG_DEBUG_TCG, so that it is regularly enabled.

At which point you might as well use tcg_debug_assert instead of these wrappers around g_assert.

Yes, that sounds more reasonable. I will work up a patch.

Thanks,

Signature · 1 line
Pranith