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

replace pthread_getspecific() with C++11 thread_local in dbug.c

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • N/A
    • Debug
    • None

    Description

      thread_local is faster a simpler than function call. https://godbolt.org/z/whHsjI

      I'm running main suite tests in debug mode with -O2 optimizations, for example, for Spent 1556.669 of 260 seconds executing testcases and with thread_local, for example, for Spent 1484.632 of 246 seconds executing testcases.

      Patch requires transferring dbug.c from C to C++. C11 would fit too, but it's not used in MariaDB.

      Similar technique could be used also for THD and PFS.

      Attachments

        Activity

          People

            kevg Eugene Kosov (Inactive)
            kevg Eugene Kosov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.