[MDEV-24973] Performance schema duplicates rarely executed code for mutex operations Created: 2021-02-24  Updated: 2024-01-04  Resolved: 2021-03-02

Status: Closed
Project: MariaDB Server
Component/s: Performance Schema
Affects Version/s: 5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6
Fix Version/s: 10.6.0

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: performance, performance_schema

Issue Links:
Relates
relates to MDEV-21452 Use condition variables and normal mu... Closed
relates to MDEV-22721 Remove bloat caused by InnoDB logger ... Closed
relates to MDEV-33181 Performance schema introduces many co... Open

 Description   

The PERFORMANCE_SCHEMA wrapper for mutex and rw-lock operations is causing a lot of unlikely code to be inlined in each invocation. The impact of this may have been emphasized in MariaDB 10.6, because InnoDB now uses the common implementation of mutexes and condition variables (MDEV-21452).

By default, we build with cmake -DPLUGIN_PERFSCHEMA enabled, but at runtime no instrumentation will be enabled. Similar to MDEV-22721, we’d better avoid inlining the rarely executed code in order to reduce the code size and to improve the efficiency of the instruction cache.



 Comments   
Comment by Marko Mäkelä [ 2021-02-26 ]

axel, your test with performance schema disabled at runtime did not show any regression. Can you please repeat the test with performance schema enabled at runtime?

Comment by Axel Schwenke [ 2021-03-01 ]

commit 522fd37c3e0 vs. da8bc5ee9b0

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