Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29616

cmake -DWITH_DBUG_TRACE=OFF does not disable DBUG_PRINT

    XMLWordPrintable

Details

    Description

      The CMake parameter WITH_DBUG_TRACE allows debug tests to run much faster by disabling macros like DBUG_ENTER and DBUG_RETURN.

      We should go one step further and also disable DBUG_PRINT output. 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.

      Thanks to wlad for noticing this additional opportunity.

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

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.