diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-08-02 09:34:15 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-08-02 09:34:15 +0200 |
commit | b043e1098e3575f6e91882ab7b6b254327a2865b (patch) | |
tree | ccc06f38301a8e4dcaade49dee57faeaa45cdb98 /include | |
parent | 4d0c53a3276da82e84d477c5a94bf40083f06cbf (diff) | |
parent | 61d08f74275b129c5d00daaa7856aead88f034ff (diff) | |
download | mariadb-git-b043e1098e3575f6e91882ab7b6b254327a2865b.tar.gz |
Merge branch 'merge-perfschema-5.7' into 10.5
Diffstat (limited to 'include')
-rw-r--r-- | include/mysql/psi/mysql_file.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_idle.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_mdl.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_memory.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_ps.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_socket.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_sp.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_stage.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_statement.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/mysql_thread.h | 9 | ||||
-rw-r--r-- | include/mysql/psi/mysql_transaction.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi.h | 13 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v0.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v1.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v1.h.pp | 3 | ||||
-rw-r--r-- | include/mysql/psi/psi_abi_v2.h | 2 | ||||
-rw-r--r-- | include/mysql/psi/psi_base.h | 8 | ||||
-rw-r--r-- | include/mysql/psi/psi_memory.h | 2 | ||||
-rw-r--r-- | include/pfs_thread_provider.h | 2 |
19 files changed, 46 insertions, 17 deletions
diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index 795a40e38b7..9b172cfe9b0 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_idle.h b/include/mysql/psi/mysql_idle.h index 95886bd4e13..1c9927f95b2 100644 --- a/include/mysql/psi/mysql_idle.h +++ b/include/mysql/psi/mysql_idle.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2021, Oracle and/or its affiliates +/* Copyright (c) 2011, 2022, Oracle and/or its affiliates Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_mdl.h b/include/mysql/psi/mysql_mdl.h index 3b3aba0a81f..483f28f396b 100644 --- a/include/mysql/psi/mysql_mdl.h +++ b/include/mysql/psi/mysql_mdl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2012, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_memory.h b/include/mysql/psi/mysql_memory.h index b461f2fb206..06027a655f7 100644 --- a/include/mysql/psi/mysql_memory.h +++ b/include/mysql/psi/mysql_memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2012, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_ps.h b/include/mysql/psi/mysql_ps.h index 42f518b77c4..670555fc55f 100644 --- a/include/mysql/psi/mysql_ps.h +++ b/include/mysql/psi/mysql_ps.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2014, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h index 143c382c912..e32474db1dd 100644 --- a/include/mysql/psi/mysql_socket.h +++ b/include/mysql/psi/mysql_socket.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_sp.h b/include/mysql/psi/mysql_sp.h index 68b79f1b852..1fec59cec91 100644 --- a/include/mysql/psi/mysql_sp.h +++ b/include/mysql/psi/mysql_sp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_stage.h b/include/mysql/psi/mysql_stage.h index f16b0ce207e..cb579ea4e8c 100644 --- a/include/mysql/psi/mysql_stage.h +++ b/include/mysql/psi/mysql_stage.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h index 7a95e4057fd..78a4de73869 100644 --- a/include/mysql/psi/mysql_statement.h +++ b/include/mysql/psi/mysql_statement.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index f380f2f02ac..9ff3dd382a8 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. Copyright (c) 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify @@ -1339,6 +1339,13 @@ static inline void inline_mysql_thread_set_psi_THD(THD *thd) } #endif /* __cplusplus */ +static inline void mysql_thread_set_peer_port(uint port __attribute__ ((unused))) { +#ifdef HAVE_PSI_THREAD_INTERFACE + struct PSI_thread *psi = PSI_THREAD_CALL(get_thread)(); + PSI_THREAD_CALL(set_thread_peer_port)(psi, port); +#endif +} + #endif #endif /* DISABLE_MYSQL_THREAD_H */ diff --git a/include/mysql/psi/mysql_transaction.h b/include/mysql/psi/mysql_transaction.h index 611bd1fa0f9..02f08bfab44 100644 --- a/include/mysql/psi/mysql_transaction.h +++ b/include/mysql/psi/mysql_transaction.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi.h b/include/mysql/psi/psi.h index b9beab77e2a..4c3e2c6a9c4 100644 --- a/include/mysql/psi/psi.h +++ b/include/mysql/psi/psi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -1692,6 +1692,15 @@ typedef void (*set_thread_info_v1_t)(const char* info, uint info_len); */ typedef void (*set_thread_v1_t)(struct PSI_thread *thread); +/** + Assign the remote (peer) port to the instrumented thread. + + @param thread pointer to the thread instrumentation + @param port the remote port +*/ +typedef void (*set_thread_peer_port_v1_t)(PSI_thread *thread, + unsigned int port); + /** Delete the current thread instrumentation. */ typedef void (*delete_current_thread_v1_t)(void); @@ -2737,6 +2746,8 @@ struct PSI_v1 start_metadata_wait_v1_t start_metadata_wait; end_metadata_wait_v1_t end_metadata_wait; + + set_thread_peer_port_v1_t set_thread_peer_port; }; /** @} (end of group Group_PSI_v1) */ diff --git a/include/mysql/psi/psi_abi_v0.h b/include/mysql/psi/psi_abi_v0.h index b94a7695ade..df47ae78eb4 100644 --- a/include/mysql/psi/psi_abi_v0.h +++ b/include/mysql/psi/psi_abi_v0.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2011, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi_abi_v1.h b/include/mysql/psi/psi_abi_v1.h index bdf475147ab..61018bdf030 100644 --- a/include/mysql/psi/psi_abi_v1.h +++ b/include/mysql/psi/psi_abi_v1.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi_abi_v1.h.pp b/include/mysql/psi/psi_abi_v1.h.pp index a1845ac62f6..2dc27e09ca4 100644 --- a/include/mysql/psi/psi_abi_v1.h.pp +++ b/include/mysql/psi/psi_abi_v1.h.pp @@ -459,6 +459,8 @@ typedef void (*set_thread_start_time_v1_t)(time_t start_time); typedef void (*set_thread_state_v1_t)(const char* state); typedef void (*set_thread_info_v1_t)(const char* info, uint info_len); typedef void (*set_thread_v1_t)(struct PSI_thread *thread); +typedef void (*set_thread_peer_port_v1_t)(PSI_thread *thread, + unsigned int port); typedef void (*delete_current_thread_v1_t)(void); typedef void (*delete_thread_v1_t)(struct PSI_thread *thread); typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t) @@ -829,6 +831,7 @@ struct PSI_v1 destroy_metadata_lock_v1_t destroy_metadata_lock; start_metadata_wait_v1_t start_metadata_wait; end_metadata_wait_v1_t end_metadata_wait; + set_thread_peer_port_v1_t set_thread_peer_port; }; typedef struct PSI_v1 PSI; typedef struct PSI_mutex_info_v1 PSI_mutex_info; diff --git a/include/mysql/psi/psi_abi_v2.h b/include/mysql/psi/psi_abi_v2.h index 63d99106055..31c9e8fc42f 100644 --- a/include/mysql/psi/psi_abi_v2.h +++ b/include/mysql/psi/psi_abi_v2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/mysql/psi/psi_base.h b/include/mysql/psi/psi_base.h index 7b4eaf80892..592aaf58fef 100644 --- a/include/mysql/psi/psi_base.h +++ b/include/mysql/psi/psi_base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, @@ -94,6 +94,12 @@ extern "C" { */ #define PSI_FLAG_VOLATILITY_SESSION (1 << 6) +/** + System thread flag. + Indicates that the instrumented object exists on a system thread. +*/ +#define PSI_FLAG_THREAD_SYSTEM (1 << 9) + #ifdef HAVE_PSI_INTERFACE /** diff --git a/include/mysql/psi/psi_memory.h b/include/mysql/psi/psi_memory.h index 9b968667d53..4f5215d1808 100644 --- a/include/mysql/psi/psi_memory.h +++ b/include/mysql/psi/psi_memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2021, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff --git a/include/pfs_thread_provider.h b/include/pfs_thread_provider.h index 3c43f8e3d77..6b5633722f5 100644 --- a/include/pfs_thread_provider.h +++ b/include/pfs_thread_provider.h @@ -99,6 +99,8 @@ void pfs_set_thread_info_v1(const char* info, uint info_len); void pfs_set_thread_v1(PSI_thread* thread); +void pfs_set_thread_peer_port_v1(PSI_thread *thread, uint port); + void pfs_delete_current_thread_v1(void); void pfs_delete_thread_v1(PSI_thread *thread); |