Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
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.