代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/mysql 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Support s390/s390x in performance schema's cycle-counting functions.
Filed upstream at http://bugs.mysql.com/bug.php?id=59953
---
include/my_rdtsc.h | 1 +
mysys/my_rdtsc.cc | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/include/my_rdtsc.h b/include/my_rdtsc.h
index b411eda0..03fc9a58 100644
--- a/include/my_rdtsc.h
+++ b/include/my_rdtsc.h
@@ -128,5 +128,6 @@ void my_timer_init(MY_TIMER_INFO *mti);
#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
/* #define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27 - No longer used */
#define MY_TIMER_ROUTINE_ASM_AARCH64 28
+#define MY_TIMER_ROUTINE_ASM_S390 29
#endif
diff --git a/mysys/my_rdtsc.cc b/mysys/my_rdtsc.cc
index d9756487..817aa9d6 100644
--- a/mysys/my_rdtsc.cc
+++ b/mysys/my_rdtsc.cc
@@ -168,6 +168,13 @@ ulonglong my_timer_cycles(void) {
__asm __volatile__("mrs %[rt],cntvct_el0" : [ rt ] "=r"(result));
return result;
}
+#elif defined(__GNUC__) && defined(__s390__)
+ /* covers both s390 and s390x */
+ {
+ ulonglong result;
+ __asm__ __volatile__ ("stck %0" : "=Q" (result) : : "cc");
+ return result;
+ }
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
/* gethrtime may appear as either cycle or nanosecond counter */
return (ulonglong)gethrtime();
@@ -453,6 +460,8 @@ void my_timer_init(MY_TIMER_INFO *mti) {
mti->cycles.routine = MY_TIMER_ROUTINE_ASM_GCC_SPARC64;
#elif defined(__GNUC__) && defined(__aarch64__)
mti->cycles.routine = MY_TIMER_ROUTINE_ASM_AARCH64;
+#elif defined(__GNUC__) && defined(__s390__)
+ mti->cycles.routine = MY_TIMER_ROUTINE_ASM_S390;
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
mti->cycles.routine = MY_TIMER_ROUTINE_GETHRTIME;
#else
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。