diff options
Diffstat (limited to 'include/mysql/psi/psi.h')
-rw-r--r-- | include/mysql/psi/psi.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/mysql/psi/psi.h b/include/mysql/psi/psi.h index 3f43445e08a..394dd1b30b4 100644 --- a/include/mysql/psi/psi.h +++ b/include/mysql/psi/psi.h @@ -40,6 +40,21 @@ #error "You must include my_global.h in the code for the build to be correct." #endif +/* + If PSI_ON_BY_DFAULT is defined, assume PSI will be enabled by default and + optimize jumps testing for PSI this case. If not, optimize the binary for + that PSI is not enabled +*/ + +#ifdef PSI_ON_BY_DEFAULT +#define psi_likely(A) likely(A) +#define psi_unlikely(A) unlikely(A) +#else +#define psi_likely(A) unlikely(A) +#define psi_unlikely(A) likely(A) +#endif + + C_MODE_START struct TABLE_SHARE; @@ -2346,6 +2361,7 @@ typedef struct PSI_stage_info_none PSI_stage_info; #endif /* HAVE_PSI_INTERFACE */ +extern MYSQL_PLUGIN_IMPORT my_bool pfs_enabled; extern MYSQL_PLUGIN_IMPORT PSI *PSI_server; /* |