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

perf and stack trace observability: include indentifying info in function parameters

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.7
    • Optimizer
    • None

    Description

      See https://petrunia.net/2024/03/01/using-linux-perf-do-we-need-to-pass-identifying-info-as-arguments-to-important-functions/ for inspiration.

      One can use perf tool to do performance analysis (See for example TODO-4509).

      However, analysis is hard because it's not possible to access function parameter values. We can catch an SP call or a statement execution, but we cannot determine the name of SP or which statement it is.

      If we add parameters, for example make add routine name as a parameter to sp_head::execute(), it will be much easier (See the blog post above for detail, example patch: https://gist.github.com/spetrunia/d8e6f26e2b9c85231389a8d3ebde100b)

      The drawback is a little extra CPU overhead but that should be negligible.
      A possible alternative is to use static probes. However, probes do not help with the stack traces.

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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