[MDEV-29613] Improve WITH_DBUG_TRACE=OFF Created: 2022-09-23  Updated: 2022-11-20  Resolved: 2022-09-23

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Tests
Fix Version/s: 10.4.27, 10.5.18, 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2

Type: Task Priority: Minor
Reporter: Vladislav Vaintroub Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-29616 cmake -DWITH_DBUG_TRACE=OFF does not ... Closed
Relates
relates to MDEV-21361 +d,-d may break consistent state of D... Open
relates to MDEV-23371 main.range_innodb failed in buildbot,... Closed

 Description   

The initial implementation of the CMake parameter WITH_DBUG_TRACE allows some of the DBUG trace output to be disabled while leaving other important DBUG functionality intact - things like DBUG_ASSERT, DBUG_EXECUTE_IF.

This patch however was incomplete - it disabled DBUG_ENTER and DBUG_RETURN however left DBUG_PRINT in place.

It turns out that only a small number of InnoDB redo log related tests were making use of DEBUG_DBUG='+d,ib_log' to check that some log records were written or parsed. We can live very well without those checks.

Conditional branches are bad for tools like the rr debugger. Even if all DBUG_PRINT statements are normally disabled in test runs, the conditional branches would create unnecessary (and useless) opportunity of context switches in rr. I have witnessed a case where a test that would take more than 2 hours to run would finish in a few seconds when the server was compiled with cmake -DPLUGIN_PERFSCHEMA=NO -DWITH_DBUG_TRACE=OFF -DWITH_SAFEMALLOC=OFF.



 Comments   
Comment by Marko Mäkelä [ 2022-09-23 ]

After this change, enabling cmake -DWITH_DBUG_TRACE=OFF on debug builders would trivially work around MDEV-21361.

Generated at Thu Feb 08 10:09:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.