Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
0dc88201
O
oceanbase
项目概览
野花太放肆
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0dc88201
编写于
12月 15, 2021
作者:
Z
zb0
提交者:
LINGuanRen
12月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add code for sw compiling and fix some problems
上级
77cf1eff
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
460 addition
and
16 deletion
+460
-16
deps/easy/src/include/easy_atomic.h
deps/easy/src/include/easy_atomic.h
+2
-0
deps/easy/src/io/ev.c
deps/easy/src/io/ev.c
+2
-0
deps/easy/src/util/easy_time.c
deps/easy/src/util/easy_time.c
+11
-1
deps/oblib/src/lib/CMakeLists.txt
deps/oblib/src/lib/CMakeLists.txt
+3
-0
deps/oblib/src/lib/atomic/atomic128.h
deps/oblib/src/lib/atomic/atomic128.h
+35
-0
deps/oblib/src/lib/atomic/ob_atomic.h
deps/oblib/src/lib/atomic/ob_atomic.h
+3
-0
deps/oblib/src/lib/checksum/ob_crc64.cpp
deps/oblib/src/lib/checksum/ob_crc64.cpp
+11
-0
deps/oblib/src/lib/coro/co_utils.h
deps/oblib/src/lib/coro/co_utils.h
+5
-0
deps/oblib/src/lib/coro/context/asm/jump_sw_64_sysv_elf_gas.S
.../oblib/src/lib/coro/context/asm/jump_sw_64_sysv_elf_gas.S
+172
-0
deps/oblib/src/lib/coro/context/asm/make_sw_64_sysv_elf_gas.S
.../oblib/src/lib/coro/context/asm/make_sw_64_sysv_elf_gas.S
+93
-0
deps/oblib/src/lib/coro/context/asm/ontop_sw_64_aapcs_elf_gas.S
...blib/src/lib/coro/context/asm/ontop_sw_64_aapcs_elf_gas.S
+88
-0
deps/oblib/src/lib/list/ob_atomic_list.h
deps/oblib/src/lib/list/ob_atomic_list.h
+7
-0
deps/oblib/src/lib/ob_define.h
deps/oblib/src/lib/ob_define.h
+2
-0
deps/oblib/src/lib/timezone/ob_timezone_info.h
deps/oblib/src/lib/timezone/ob_timezone_info.h
+1
-0
deps/oblib/src/lib/utility/ob_macro_utils.h
deps/oblib/src/lib/utility/ob_macro_utils.h
+2
-0
deps/oblib/src/lib/utility/utility.h
deps/oblib/src/lib/utility/utility.h
+2
-0
src/election/ob_election.h
src/election/ob_election.h
+4
-0
src/election/ob_election_group.h
src/election/ob_election_group.h
+4
-0
src/rootserver/backup/ob_backup_archive_log_scheduler.cpp
src/rootserver/backup/ob_backup_archive_log_scheduler.cpp
+1
-1
src/share/ob_task_define.cpp
src/share/ob_task_define.cpp
+1
-1
src/sql/engine/expr/ob_expr_instr.cpp
src/sql/engine/expr/ob_expr_instr.cpp
+1
-1
src/sql/resolver/ob_stmt.h
src/sql/resolver/ob_stmt.h
+3
-3
src/storage/ob_partition_group.cpp
src/storage/ob_partition_group.cpp
+3
-5
src/storage/ob_partition_loop_worker.cpp
src/storage/ob_partition_loop_worker.cpp
+1
-1
src/storage/ob_partition_service.cpp
src/storage/ob_partition_service.cpp
+1
-1
src/storage/ob_pg_storage.cpp
src/storage/ob_pg_storage.cpp
+1
-1
src/storage/transaction/ob_trans_part_ctx.cpp
src/storage/transaction/ob_trans_part_ctx.cpp
+1
-1
未找到文件。
deps/easy/src/include/easy_atomic.h
浏览文件 @
0dc88201
...
...
@@ -95,6 +95,8 @@ static __inline__ void easy_spin_lock(easy_atomic_t* lock)
__asm__
(
".byte 0xf3, 0x90"
);
#elif defined(__aarch64__)
__asm__
(
"yield"
);
// for ARM
#elif defined(__sw_64__)
//sw currently not provide related opcode
#else
#error arch unsupported
#endif
...
...
deps/easy/src/io/ev.c
浏览文件 @
0dc88201
...
...
@@ -531,6 +531,8 @@ EV_CPP(extern "C" {
#define ev_mb() __asm__ __volatile ("mfence" ::: "memory")
#elif defined(__aarch64__)
#define ev_mb() __asm__ __volatile ("dsb sy" ::: "memory") //for ARM
#elif defined(__sw_64__)
#define ev_mb() __sync_synchronize()
#else
#error arch unsupported
#endif
...
...
deps/easy/src/util/easy_time.c
浏览文件 @
0dc88201
...
...
@@ -139,6 +139,16 @@ static __inline__ uint64_t rdtscp()
__asm__
__volatile__
(
"rdtscp"
:
"=a"
(
rax
),
"=d"
(
rdx
)
::
"%rcx"
);
return
(
rdx
<<
32
)
+
rax
;
}
#elif defined(__sw_64__)
static
__inline__
uint64_t
rdtsc
()
{
return
(
uint64_t
)
easy_time_now
();
}
static
__inline__
uint64_t
rdtscp
()
{
return
(
uint64_t
)
easy_time_now
();
}
#else
static
__inline__
uint64_t
rdtscp
()
{
...
...
@@ -153,7 +163,7 @@ static __inline__ uint64_t rdtsc()
#endif
#if defined(__x86_64__)
#if defined(__x86_64__)
|| defined(__sw_64__)
uint64_t
get_cpufreq_khz
()
{
char
line
[
256
];
...
...
deps/oblib/src/lib/CMakeLists.txt
浏览文件 @
0dc88201
...
...
@@ -21,6 +21,9 @@ ob_lib_add_target(oblib_lib_coro_context
coro/context/asm/jump_x86_64_sysv_elf_gas.S
coro/context/asm/make_x86_64_sysv_elf_gas.S
coro/context/asm/ontop_x86_64_sysv_elf_gas.S
coro/context/asm/make_sw_64_sysv_elf_gas.S
coro/context/asm/jump_sw_64_sysv_elf_gas.S
coro/context/asm/ontop_sw_64_aapcs_elf_gas.S
)
disable_pch
(
oblib_lib_coro_context
)
...
...
deps/oblib/src/lib/atomic/atomic128.h
浏览文件 @
0dc88201
...
...
@@ -85,6 +85,41 @@ inline void load128(__uint128_t& target, types::uint128_t* source)
__ATOMIC_SEQ_CST)
#define LOAD128(dest, src) __atomic_load(((types::uint128_t*)(src)), ((types::uint128_t*)(&(dest))), __ATOMIC_SEQ_CST)
#elif defined(__sw_64__)
inline
bool
cas128
(
volatile
types
::
uint128_t
*
target
,
types
::
uint128_t
*
cmp
,
types
::
uint128_t
with
)
{
int
ret
=
0
;
types
::
uint128_t
tmp
;
tmp
.
lo
=
cmp
->
lo
;
tmp
.
hi
=
cmp
->
hi
;
ret
=
__atomic_compare_exchange
((
types
::
uint128_t
*
)(
target
),
((
types
::
uint128_t
*
)
&
(
tmp
)),
((
types
::
uint128_t
*
)
&
(
with
)),
false
,
__ATOMIC_SEQ_CST
,
__ATOMIC_SEQ_CST
);
return
ret
;
}
inline
void
load128
(
__uint128_t
&
target
,
types
::
uint128_t
*
source
)
{
__uint128_t
*
ptr
=
reinterpret_cast
<
__uint128_t
*>
(
&
target
);
__uint128_t
*
desired
=
reinterpret_cast
<
__uint128_t
*>
(
source
);
__atomic_load
((
__uint128_t
*
)
desired
,
ptr
,
__ATOMIC_SEQ_CST
);
}
#define CAS128_tmp(src, cmp, with) \
cas128((types::uint128_t*)(src), ((types::uint128_t*)(&(cmp))), *((types::uint128_t*)(&(with))))
#define LOAD128_asm(dest, src) load128((__uint128_t&)(dest), ((types::uint128_t*)(src)))
#define CAS128(src, cmp, with) \
__atomic_compare_exchange(((types::uint128_t*)(src)), \
((types::uint128_t*)(&(cmp))), \
((types::uint128_t*)&(with)), \
false, \
__ATOMIC_SEQ_CST, \
__ATOMIC_SEQ_CST)
#define LOAD128(dest, src) __atomic_load(((types::uint128_t*)(src)), ((types::uint128_t*)(&(dest))), __ATOMIC_SEQ_CST)
#else
#error arch unsupported
#endif
...
...
deps/oblib/src/lib/atomic/ob_atomic.h
浏览文件 @
0dc88201
...
...
@@ -36,6 +36,9 @@ namespace common {
OB_ATOMIC_EVENT(atomic_pause); \
asm("yield\n"); \
}) // for ARM
#elif defined(__sw_64__)
#define WEAK_BARRIER() __sync_synchronize()
#define PAUSE()
#else
#error arch unsupported
#endif
...
...
deps/oblib/src/lib/checksum/ob_crc64.cpp
浏览文件 @
0dc88201
...
...
@@ -422,6 +422,14 @@ for RHEL4 support (GCC 3 doesn't support this instruction) */
#define crc32_sse42_byte \
crc = __crc32cb(crc, (uint8_t)*buf); \
len--, buf++
#elif defined(__sw_64__)
#define crc32_sse42_byte nullptr
/* opcodes taken from objdump of "crc32q (%%rdx), %%rcx"
for RHEL4 support (GCC 3 doesn't support this instruction) */
#define crc32_sse42_quadword nullptr
#else
#error arch unsupported
#endif
/* defined(__GNUC__) && defined(__x86_64__) */
inline
static
uint64_t
crc64_sse42
(
uint64_t
uCRC64
,
const
char
*
buf
,
int64_t
len
)
...
...
@@ -2841,6 +2849,9 @@ uint64_t crc64_sse42_dispatch(uint64_t crc, const char* buf, int64_t len)
ob_crc64_sse42_func
=
&
fast_crc64_sse42_manually
;
_OB_LOG
(
INFO
,
"Use manual crc32 table lookup for crc64 calculate"
);
#endif
#elif defined(__sw_64__)
ob_crc64_sse42_func
=
&
fast_crc64_sse42_manually
;
_OB_LOG
(
INFO
,
"Use manual crc32 table lookup for crc64 calculate"
);
#else
#error arch unsupported
#endif
...
...
deps/oblib/src/lib/coro/co_utils.h
浏览文件 @
0dc88201
...
...
@@ -86,6 +86,11 @@ OB_INLINE uint64_t co_rdtscp(void)
asm
volatile
(
"mrs %0, cntvct_el0"
:
"=r"
(
virtual_timer_value
));
return
virtual_timer_value
;
}
#elif defined(__sw_64__)
OB_INLINE
uint64_t
co_rdtscp
(
void
)
{
return
co_current_time
()
*
1000
;
}
#else
#error arch unsupported
#endif
...
...
deps/oblib/src/lib/coro/context/asm/jump_sw_64_sysv_elf_gas.S
0 → 100644
浏览文件 @
0dc88201
#if defined(__sw_64__)
/*
Copyright
Edward
Nevill
2015
Distributed
under
the
Boost
Software
License
,
Version
1
.0.
(
See
accompanying
file
LICENSE_1_0
.
txt
or
copy
at
http
://
www.boost.org
/
LICENSE_1_0
.
txt
)
*/
/*******************************************************
*
*
*
-------------------------------------------------
*
*
| 0 |
1
| 2 |
3
| 4 |
5
| 6 |
7
|
*
*
-------------------------------------------------
*
*
| 0x0 |
0x4
| 0x8 |
0xc
| 0x10|
0x14
| 0x18|
0x1c
|
*
*
-------------------------------------------------
*
*
| d8 |
d9
| d10 |
d11
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 8 |
9
| 10 |
11
| 12 |
13
| 14 |
15
|
*
*
-------------------------------------------------
*
*
| 0x20|
0x24
| 0x28|
0x2c
| 0x30|
0x34
| 0x38|
0x3c
|
*
*
-------------------------------------------------
*
*
| d12 |
d13
| d14 |
d15
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 16 |
17
| 18 |
19
| 20 |
21
| 22 |
23
|
*
*
-------------------------------------------------
*
*
| 0x40|
0x44
| 0x48|
0x4c
| 0x50|
0x54
| 0x58|
0x5c
|
*
*
-------------------------------------------------
*
*
| x19 |
x20
| x21 |
x22
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 24 |
25
| 26 |
27
| 28 |
29
| 30 |
31
|
*
*
-------------------------------------------------
*
*
| 0x60|
0x64
| 0x68|
0x6c
| 0x70|
0x74
| 0x78|
0x7c
|
*
*
-------------------------------------------------
*
*
| x23 |
x24
| x25 |
x26
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 32 |
33
| 34 |
35
| 36 |
37
| 38 |
39
|
*
*
-------------------------------------------------
*
*
| 0x80|
0x84
| 0x88|
0x8c
| 0x90|
0x94
| 0x98|
0x9c
|
*
*
-------------------------------------------------
*
*
| x27 |
x28
| FP |
LR
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 40 |
41
| 42 |
43
| |
|
*
*
-------------------------------------------------
*
*
| 0xa0|
0xa4
| 0xa8|
0xac
| |
|
*
*
-------------------------------------------------
*
*
| PC |
align
| |
|
*
*
-------------------------------------------------
*
*
*
*******************************************************/
#.
cpu
generic
+
fp
+
simd
.
text
.
align
2
.
global
jump_fcontext
.
type
jump_fcontext
,
%
function
jump_fcontext
:
#
prepare
stack
for
GP
+
FPU
#
sub
sp
,
sp
,
#
0xb0
ldih
$
29
,
0
(
$
27
)
!
gpdisp
!
1
ldi
$
29
,
0
(
$
29
)
!
gpdisp
!
1
subl
$
30
,
0x98
,
$
30
#
Because
gcc
may
save
integer
registers
in
fp
registers
across
a
#
function
call
we
cannot
skip
saving
the
fp
registers
.
#
#
Do
not
reinstate
this
test
unless
you
fully
understand
what
you
#
are
doing
.
#
#
#
test
if
fpu
env
should
be
preserved
#
cmp
w3
,
#
0
#
b.eq
1
f
#
save
d8
-
d15
#
stp
d8
,
d9
,
[
sp
,
#
0x00
]
#
stp
d10
,
d11
,
[
sp
,
#
0x10
]
#
stp
d12
,
d13
,
[
sp
,
#
0x20
]
#
stp
d14
,
d15
,
[
sp
,
#
0x30
]
fstd
$f2
,
0x00
(
$
30
)
fstd
$f3
,
0x08
(
$
30
)
fstd
$f3
,
0x10
(
$
30
)
fstd
$f4
,
0x18
(
$
30
)
fstd
$f5
,
0x20
(
$
30
)
fstd
$f6
,
0x28
(
$
30
)
fstd
$f7
,
0x30
(
$
30
)
fstd
$f8
,
0x38
(
$
30
)
fstd
$f9
,
0x40
(
$
30
)
1
:
#
save
x19
-
x30
#
stp
x19
,
x20
,
[
sp
,
#
0x40
]
#
stp
x21
,
x22
,
[
sp
,
#
0x50
]
#
stp
x23
,
x24
,
[
sp
,
#
0x60
]
#
stp
x25
,
x26
,
[
sp
,
#
0x70
]
#
stp
x27
,
x28
,
[
sp
,
#
0x80
]
#
stp
x29
,
x30
,
[
sp
,
#
0x90
]
stl
$
9
,
0x48
(
$
30
)
stl
$
10
,
0x50
(
$
30
)
stl
$
11
,
0x58
(
$
30
)
stl
$
12
,
0x60
(
$
30
)
stl
$
13
,
0x68
(
$
30
)
stl
$
14
,
0x70
(
$
30
)
stl
$
15
,
0x90
(
$
30
)
#
save
LR
as
PC
#
str
x30
,
[
sp
,
#
0xa0
]
stl
$
26
,
0x80
(
$
30
)
stl
$
26
,
0x88
(
$
30
)
#
store
RSP
(
pointing
to
context
-
data
)
in
first
argument
(
x0
)
.
#
STR
cannot
have
sp
as
a
target
register
#
mov
x4
,
sp
mov
$
30
,
$
1
#
str
x4
,
[
x0
]
stl
$
1
,
0x00
(
$
16
)
#
restore
RSP
(
pointing
to
context
-
data
)
from
A2
(
x1
)
#
mov
sp
,
x1
mov
$
17
,
$
30
#
#
test
if
fpu
env
should
be
preserved
#
cmp
w3
,
#
0
#
b.eq
2
f
#
load
d8
-
d15
#
ldp
d8
,
d9
,
[
sp
,
#
0x00
]
#
ldp
d10
,
d11
,
[
sp
,
#
0x10
]
#
ldp
d12
,
d13
,
[
sp
,
#
0x20
]
#
ldp
d14
,
d15
,
[
sp
,
#
0x30
]
fldd
$f2
,
0x00
(
$
30
)
fldd
$f3
,
0x08
(
$
30
)
fldd
$f3
,
0x10
(
$
30
)
fldd
$f4
,
0x18
(
$
30
)
fldd
$f5
,
0x20
(
$
30
)
fldd
$f6
,
0x28
(
$
30
)
fldd
$f7
,
0x30
(
$
30
)
fldd
$f8
,
0x38
(
$
30
)
fldd
$f9
,
0x40
(
$
30
)
2
:
#
load
x19
-
x30
#
ldp
x19
,
x20
,
[
sp
,
#
0x40
]
#
ldp
x21
,
x22
,
[
sp
,
#
0x50
]
#
ldp
x23
,
x24
,
[
sp
,
#
0x60
]
#
ldp
x25
,
x26
,
[
sp
,
#
0x70
]
#
ldp
x27
,
x28
,
[
sp
,
#
0x80
]
#
ldp
x29
,
x30
,
[
sp
,
#
0x90
]
ldl
$
9
,
0x48
(
$
30
)
ldl
$
10
,
0x50
(
$
30
)
ldl
$
11
,
0x58
(
$
30
)
ldl
$
12
,
0x60
(
$
30
)
ldl
$
13
,
0x68
(
$
30
)
ldl
$
14
,
0x70
(
$
30
)
ldl
$
26
,
0x80
(
$
30
)
ldl
$
15
,
0x90
(
$
30
)
#
use
third
arg
as
return
value
after
jump
#
and
as
first
arg
in
context
function
#
mov
x0
,
x2
mov
$
18
,
$
16
mov
$
18
,
$
0
#
load
pc
#
ldr
x4
,
[
sp
,
#
0xa0
]
ldl
$
27
,
0x88
(
$
30
)
#
ldl
$
26
,
0x88
(
$
30
)
#
restore
stack
from
GP
+
FPU
#
add
sp
,
sp
,
#
0xb0
#
mov
$
1
,
$
30
addl
$
30
,
0x98
,
$
30
#
addl
$
30
,
32
,
$
30
#
ret
x4
#
mov
$
1
,
$
26
ret
$
31
,(
$
27
),
1
.
size
jump_fcontext
,.-
jump_fcontext
#
Mark
that
we
don
't need executable stack.
.
section
.
note.GNU
-
stack
,"",%
progbits
#endif
deps/oblib/src/lib/coro/context/asm/make_sw_64_sysv_elf_gas.S
0 → 100644
浏览文件 @
0dc88201
#if defined(__sw_64__)
/*
Copyright
Edward
Nevill
2015
Distributed
under
the
Boost
Software
License
,
Version
1
.0.
(
See
accompanying
file
LICENSE_1_0
.
txt
or
copy
at
http
://
www.boost.org
/
LICENSE_1_0
.
txt
)
*/
/*******************************************************
*
*
*
-------------------------------------------------
*
*
| 0 |
1
| 2 |
3
| 4 |
5
| 6 |
7
|
*
*
-------------------------------------------------
*
*
| 0x0 |
0x4
| 0x8 |
0xc
| 0x10|
0x14
| 0x18|
0x1c
|
*
*
-------------------------------------------------
*
*
| d8 |
d9
| d10 |
d11
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 8 |
9
| 10 |
11
| 12 |
13
| 14 |
15
|
*
*
-------------------------------------------------
*
*
| 0x20|
0x24
| 0x28|
0x2c
| 0x30|
0x34
| 0x38|
0x3c
|
*
*
-------------------------------------------------
*
*
| d12 |
d13
| d14 |
d15
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 16 |
17
| 18 |
19
| 20 |
21
| 22 |
23
|
*
*
-------------------------------------------------
*
*
| 0x40|
0x44
| 0x48|
0x4c
| 0x50|
0x54
| 0x58|
0x5c
|
*
*
-------------------------------------------------
*
*
| x19 |
x20
| x21 |
x22
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 24 |
25
| 26 |
27
| 28 |
29
| 30 |
31
|
*
*
-------------------------------------------------
*
*
| 0x60|
0x64
| 0x68|
0x6c
| 0x70|
0x74
| 0x78|
0x7c
|
*
*
-------------------------------------------------
*
*
| x23 |
x24
| x25 |
x26
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 32 |
33
| 34 |
35
| 36 |
37
| 38 |
39
|
*
*
-------------------------------------------------
*
*
| 0x80|
0x84
| 0x88|
0x8c
| 0x90|
0x94
| 0x98|
0x9c
|
*
*
-------------------------------------------------
*
*
| x27 |
x28
| FP |
LR
|
*
*
-------------------------------------------------
*
*
-------------------------------------------------
*
*
| 40 |
41
| 42 |
43
| |
|
*
*
-------------------------------------------------
*
*
| 0xa0|
0xa4
| 0xa8|
0xac
| |
|
*
*
-------------------------------------------------
*
*
| PC |
align
| |
|
*
*
-------------------------------------------------
*
*
*
*******************************************************/
#.
cpu
generic
+
fp
+
simd
.
text
.
align
2
.
global
make_fcontext
.
type
make_fcontext
,
%
function
make_fcontext
:
ldih
$
29
,
0
(
$
27
)
!
gpdisp
!
1
ldi
$
29
,
0
(
$
29
)
!
gpdisp
!
1
#
shift
address
in
x0
(
allocated
stack
)
to
lower
16
byte
boundary
#
and
$
16
,
~
0xf
,
$
16
srl
$
16
,
4
,
$
16
sll
$
16
,
4
,
$
16
#
reserve
space
for
context
-
data
on
context
-
stack
subl
$
16
,
0x90
,
$
16
#
third
arg
of
make_fcontext
()
==
address
of
context
-
function
#
store
address
as
a
PC
to
jump
in
#
stl
x2
,
[
x0
,
#
0xa0
]
stl
$
18
,
0x88
(
$
16
)
#
save
address
of
finish
as
return
-
address
for
context
-
function
#
will
be
entered
after
context
-
function
returns
(
LR
register
)
#
adr
x1
,
finish
ldi
$
17
,
finish
#
str
x1
,
[
x0
,
#
0x98
]
stl
$
17
,
0x80
(
$
16
)
#
ret
x30
//
return
pointer
to
context
-
data
(
x0
)
mov
$
16
,
$
0
ret
$
31
,(
$
26
),
1
finish
:
#
exit
code
is
zero
#
mov
0
,
$
16
mov
0
,
$
0
#
exit
application
call
_exit
.
size
make_fcontext
,.-
make_fcontext
#
Mark
that
we
don
't need executable stack.
.
section
.
note.GNU
-
stack
,"",%
progbits
#endif
deps/oblib/src/lib/coro/context/asm/ontop_sw_64_aapcs_elf_gas.S
0 → 100644
浏览文件 @
0dc88201
#if defined(__sw_64__)
.
text
.
align
2
.
global
ontop_fcontext
.
type
ontop_fcontext
,
%
function
ontop_fcontext
:
#
prepare
stack
for
GP
+
FPU
#
ldih
$
29
,
0
(
$
27
)
#
ldi
$
29
,
0
(
$
29
)
subl
$sp
,
0x98
,
$sp
#
save
$f2
-
$f9
fstd
$f2
,
0x00
(
$sp
)
fstd
$f3
,
0x08
(
$sp
)
fstd
$f4
,
0x10
(
$sp
)
fstd
$f5
,
0x18
(
$sp
)
fstd
$f6
,
0x20
(
$sp
)
fstd
$f7
,
0x28
(
$sp
)
fstd
$f8
,
0x30
(
$sp
)
fstd
$f9
,
0x38
(
$sp
)
#
save
$
9
-
$
15
,
fp
,
$
26
stl
$
9
,
0x40
(
$sp
)
stl
$
10
,
0x48
(
$sp
)
stl
$
11
,
0x50
(
$sp
)
stl
$
12
,
0x58
(
$sp
)
stl
$
13
,
0x60
(
$sp
)
stl
$
14
,
0x68
(
$sp
)
stl
$
15
,
0x70
(
$sp
)
stl
$fp
,
0x78
(
$sp
)
stl
$
16
,
0x80
(
$sp
)
#
save
ontop_fcontext
return
address
stl
$
26
,
0x88
(
$sp
)
#
save
LR
as
PC
stl
$
26
,
0x90
(
$sp
)
#
store
RSP
(
pointing
to
context
-
data
)
in
$
16
mov
$sp
,
$
20
#
restore
RSP
(
pointing
to
context
-
data
)
from
$
17
mov
$
17
,
$sp
#
load
$f2
-
$f9
fldd
$f2
,
0x00
(
$sp
)
fldd
$f3
,
0x08
(
$sp
)
fldd
$f4
,
0x10
(
$sp
)
fldd
$f5
,
0x18
(
$sp
)
fldd
$f6
,
0x20
(
$sp
)
fldd
$f7
,
0x28
(
$sp
)
fldd
$f8
,
0x30
(
$sp
)
fldd
$f9
,
0x38
(
$sp
)
#
load
$
9
-
$
15
,
fp
,
$
26
ldl
$
9
,
0x40
(
$sp
)
ldl
$
10
,
0x48
(
$sp
)
ldl
$
11
,
0x50
(
$sp
)
ldl
$
12
,
0x58
(
$sp
)
ldl
$
13
,
0x60
(
$sp
)
ldl
$
14
,
0x68
(
$sp
)
ldl
$
15
,
0x70
(
$sp
)
ldl
$fp
,
0x78
(
$sp
)
ldl
$
26
,
0x88
(
$sp
)
#
pass
transfer_t
as
first
arg
in
context
function
#
to
store
$
1
,
$
2
to
$
16
address
ldl
$
16
,
0x80
(
$sp
)
#
load
$
16
,
store
return
struct
do
return
address
stl
$
20
,
0
(
$
16
)
stl
$
18
,
8
(
$
16
)
#
pass
transfer_t
as
first
arg
in
context
function
,
such
as
f1
,
f2
,
f3
#
$
16
==
FCTX
,
$
17
==
DATA
mov
$
20
,
$
16
#
$
16
$
17
$
18
as
first
and
second
arg
mov
$
18
,
$
17
#
skip
pc
mov
$
19
,
$
27
#
restore
stack
from
GP
+
FPU
addl
$sp
,
0x98
,
$sp
ret
$
31
,(
$
27
),
0x1
//
jmp
$
31
,
(
$
27
)
//
ret
(
$
27
)
.
size
ontop_fcontext
,.-
ontop_fcontext
#
Mark
that
we
don
't need executable stack.
.
section
.
note.GNU
-
stack
,"",%
progbits
#endif
deps/oblib/src/lib/list/ob_atomic_list.h
浏览文件 @
0dc88201
...
...
@@ -102,6 +102,13 @@ union ObHeadNode {
(((~(((static_cast<intptr_t>((x).data_)) << 16 >> 63) - 1)) >> 48) << 48)) & \
0x0000FFFFFFFFFFFFULL))
#define FREELIST_VERSION(x) ((static_cast<intptr_t>((x).data_)) >> 48)
#define SET_FREELIST_POINTER_VERSION(x, p, v) \
(x).data_ = (((reinterpret_cast<intptr_t>(p)) & 0x0000FFFFFFFFFFFFULL) | (((v)&0xFFFFULL) << 48))
#elif defined(__sw_64__)
#define FREELIST_POINTER(x) \
(reinterpret_cast<void*>((((static_cast<intptr_t>((x).data_)) << 16) >> 16) | \
(((~(((static_cast<intptr_t>((x).data_)) << 16 >> 63) - 1)) >> 48) << 48))) // sign extend
#define FREELIST_VERSION(x) ((static_cast<intptr_t>((x).data_)) >> 48)
#define SET_FREELIST_POINTER_VERSION(x, p, v) \
(x).data_ = (((reinterpret_cast<intptr_t>(p)) & 0x0000FFFFFFFFFFFFULL) | (((v)&0xFFFFULL) << 48))
#else
...
...
deps/oblib/src/lib/ob_define.h
浏览文件 @
0dc88201
...
...
@@ -1493,6 +1493,8 @@ const int32_t OB_MAX_SYS_BKGD_THREAD_NUM = 64;
const
int64_t
OB_MAX_CPU_NUM
=
64
;
#elif __aarch64__
const
int64_t
OB_MAX_CPU_NUM
=
128
;
#else
const
int64_t
OB_MAX_CPU_NUM
=
64
;
#endif
const
int64_t
OB_MAX_STATICS_PER_TABLE
=
128
;
...
...
deps/oblib/src/lib/timezone/ob_timezone_info.h
浏览文件 @
0dc88201
...
...
@@ -13,6 +13,7 @@
#ifndef OCEANBASE_LIB_TIMEZONE_INFO_
#define OCEANBASE_LIB_TIMEZONE_INFO_
#include <cmath>
#include "lib/string/ob_string.h"
#include "lib/utility/ob_print_utils.h"
#include "lib/container/ob_array.h"
...
...
deps/oblib/src/lib/utility/ob_macro_utils.h
浏览文件 @
0dc88201
...
...
@@ -888,6 +888,8 @@
#define CACHE_ALIGN_SIZE 64
#elif __aarch64__
#define CACHE_ALIGN_SIZE 128
#else
#define CACHE_ALIGN_SIZE 64
#endif
#define CACHE_ALIGNED __attribute__((aligned(CACHE_ALIGN_SIZE)))
...
...
deps/oblib/src/lib/utility/utility.h
浏览文件 @
0dc88201
...
...
@@ -444,6 +444,8 @@ inline bool is_cpu_support_sse42()
return
0
!=
(
data
&
CPUID_STD_SSE4_2
);
#elif defined(__aarch64__)
return
0
;
#elif defined(__sw_64__)
return
0
;
#else
#error arch unsupported
#endif
...
...
src/election/ob_election.h
浏览文件 @
0dc88201
...
...
@@ -384,6 +384,10 @@ private:
typedef
common
::
RWLock
::
RLockGuard
RLockGuard
;
typedef
common
::
RWLock
::
WLockGuard
WLockGuard
;
mutable
common
::
RWLock
lock_
;
#elif defined(__sw_64__)
typedef
common
::
SpinRLockGuard
RLockGuard
;
typedef
common
::
SpinWLockGuard
WLockGuard
;
mutable
common
::
SpinRWLock
lock_
;
#endif
private:
bool
is_inited_
;
...
...
src/election/ob_election_group.h
浏览文件 @
0dc88201
...
...
@@ -307,6 +307,10 @@ private:
typedef
common
::
RWLock
::
RLockGuard
RLockGuard
;
typedef
common
::
RWLock
::
WLockGuard
WLockGuard
;
mutable
common
::
RWLock
lock_
;
#elif defined(__sw_64__)
typedef
common
::
RWLock
::
RLockGuard
RLockGuard
;
typedef
common
::
RWLock
::
WLockGuard
WLockGuard
;
mutable
common
::
RWLock
lock_
;
#endif
private:
common
::
ObTraceEventRecorder
tlog_
;
...
...
src/rootserver/backup/ob_backup_archive_log_scheduler.cpp
浏览文件 @
0dc88201
...
...
@@ -1383,7 +1383,7 @@ int ObBackupArchiveLogScheduler::get_all_tenant_ids(
LOG_WARN
(
"failed to get same round log archive history infos"
,
KR
(
ret
));
}
else
if
(
OB_FAIL
(
mgr
.
get_all_same_round_in_progress_backup_info
(
*
sql_proxy_
,
log_archive_round
,
his_info_list
)))
{
LOG_WARN
(
"failed to get_all_same_round_in_progress_backup_info"
,
KR
(
ret
)
,
K
(
round
)
);
LOG_WARN
(
"failed to get_all_same_round_in_progress_backup_info"
,
KR
(
ret
));
}
else
if
(
OB_FAIL
(
append
(
info_list
,
cur_info_list
)))
{
LOG_WARN
(
"failed to add array"
,
KR
(
ret
));
}
else
if
(
OB_FAIL
(
append
(
info_list
,
his_info_list
)))
{
...
...
src/share/ob_task_define.cpp
浏览文件 @
0dc88201
...
...
@@ -9,7 +9,7 @@
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*/
#include <numeric>
#include "ob_task_define.h"
#include "lib/allocator/ob_malloc.h"
#include "lib/utility/ob_simple_rate_limiter.h"
...
...
src/sql/engine/expr/ob_expr_instr.cpp
浏览文件 @
0dc88201
...
...
@@ -211,7 +211,7 @@ int ObExprOracleInstr::calc(ObObj& result, const ObObj& haystack, const ObObj& n
}
}
else
{
if
(
OB_FAIL
(
slow_reverse_search
(
*
(
expr_ctx
.
calc_buf_
),
calc_cs_type
,
str1
,
str2
,
pos
,
occ
,
idx
)))
{
LOG_WARN
(
"slow_reverse_search failed"
,
K
(
ret
),
K
(
str1
),
K
(
str2
),
K
(
pow
),
K
(
occ
));
LOG_WARN
(
"slow_reverse_search failed"
,
K
(
ret
),
K
(
str1
),
K
(
str2
),
K
(
occ
));
}
}
if
(
OB_SUCC
(
ret
))
{
...
...
src/sql/resolver/ob_stmt.h
浏览文件 @
0dc88201
...
...
@@ -594,9 +594,6 @@ public:
return
ret
;
}
template
<
>
int
create_stmt
<
ObSelectStmt
>
(
ObSelectStmt
*&
stmt
);
inline
int
free_stmt
(
ObSelectStmt
*
stmt
)
{
int
ret
=
common
::
OB_SUCCESS
;
...
...
@@ -630,6 +627,9 @@ private:
private:
DISALLOW_COPY_AND_ASSIGN
(
ObStmtFactory
);
};
template
<
>
int
ObStmtFactory
::
create_stmt
<
ObSelectStmt
>
(
ObSelectStmt
*&
stmt
);
}
// namespace sql
}
// namespace oceanbase
...
...
src/storage/ob_partition_group.cpp
浏览文件 @
0dc88201
...
...
@@ -1876,7 +1876,6 @@ int ObPartitionGroup::replay_split_source_log(
"replay split source log failed"
,
K
(
ret
),
K_
(
pkey
),
K
(
log
),
K
(
log_id
),
K
(
log_ts
),
"used_time"
,
...
...
@@ -1885,7 +1884,6 @@ int ObPartitionGroup::replay_split_source_log(
STORAGE_LOG
(
INFO
,
"replay split source log success"
,
K_
(
pkey
),
K
(
log
),
K
(
log_id
),
K
(
log_ts
),
K
(
write_slog
),
...
...
@@ -2475,7 +2473,7 @@ int ObPartitionGroup::split_dest_partition(const ObPartitionSplitInfo& split_inf
split_info
.
get_spp
())))
{
STORAGE_LOG
(
WARN
,
"split dest log init failed"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
submit_split_dest_log_
(
log
)))
{
STORAGE_LOG
(
WARN
,
"submit split dest log failed"
,
K
(
ret
)
,
K
(
log
)
);
STORAGE_LOG
(
WARN
,
"submit split dest log failed"
,
K
(
ret
));
}
else
{
// do nothing
}
...
...
@@ -2552,10 +2550,10 @@ int ObPartitionGroup::push_reference_tables(const ObIArray<ObPartitionKey>& dest
ret
=
OB_NOT_INIT
;
STORAGE_LOG
(
WARN
,
"not init"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
check_if_dest_pg_ready_
(
dest_array
,
is_dest_partition_ready
)))
{
STORAGE_LOG
(
WARN
,
"check if dest partition group ready failed"
,
K
(
ret
)
,
K
(
log
)
);
STORAGE_LOG
(
WARN
,
"check if dest partition group ready failed"
,
K
(
ret
));
}
else
if
(
!
is_dest_partition_ready
)
{
ret
=
OB_EAGAIN
;
STORAGE_LOG
(
WARN
,
"dest partition group is not ready, need retry"
,
K
(
ret
)
,
K
(
log
)
);
STORAGE_LOG
(
WARN
,
"dest partition group is not ready, need retry"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
push_reference_tables_
(
dest_array
,
split_version
)))
{
STORAGE_LOG
(
WARN
,
"failed to push reference tables"
,
K
(
ret
),
K
(
dest_array
),
K
(
split_version
));
}
...
...
src/storage/ob_partition_loop_worker.cpp
浏览文件 @
0dc88201
...
...
@@ -255,7 +255,7 @@ int ObPartitionLoopWorker::write_checkpoint_(const int64_t checkpoint)
if
(
OB_FAIL
(
cb
->
init
(
ps_
,
checkpoint
)))
{
STORAGE_LOG
(
WARN
,
"checkpoint log callback init failed"
,
K
(
ret
),
K
(
checkpoint
));
}
else
if
(
OB_FAIL
(
write_checkpoint
(
checkpoint
,
cb
,
log_id
)))
{
STORAGE_LOG
(
WARN
,
"submit checkpoint log failed"
,
K
(
ret
)
,
K
(
log
)
);
STORAGE_LOG
(
WARN
,
"submit checkpoint log failed"
,
K
(
ret
));
}
else
{
// do nothing
}
...
...
src/storage/ob_partition_service.cpp
浏览文件 @
0dc88201
...
...
@@ -2030,7 +2030,7 @@ int ObPartitionService::replay_add_partition_to_pg_clog(
ret = E(EventTable::EN_REPLAY_ADD_PARTITION_TO_PG_CLOG_AFTER_CREATE_SSTABLE) OB_SUCCESS;
#endif
if (OB_FAIL(ret)) {
LOG_WARN("failed to replay add partition to pg clog after create sstable", K(ret)
, K(log)
);
LOG_WARN("failed to replay add partition to pg clog after create sstable", K(ret));
} else if (sstables_handle.get_count() > 0) {
if (OB_FAIL(pg->create_pg_partition(arg.partition_key_,
data_info.get_publish_version(),
...
...
src/storage/ob_pg_storage.cpp
浏览文件 @
0dc88201
...
...
@@ -1160,7 +1160,7 @@ int ObPGStorage::replay(const ObStoreCtx& ctx, const char* data, const int64_t d
mem_store
=
static_cast
<
ObMemtable
*>
(
memtable
);
}
}
else
{
TRANS_LOG
(
ERROR
,
"invalid row flag, unexpected error"
,
K
(
meta
)
,
K
(
log
)
);
TRANS_LOG
(
ERROR
,
"invalid row flag, unexpected error"
,
K
(
meta
));
ret
=
OB_ERR_UNEXPECTED
;
}
}
...
...
src/storage/transaction/ob_trans_part_ctx.cpp
浏览文件 @
0dc88201
...
...
@@ -4734,7 +4734,7 @@ int ObPartTransCtx::replay_start_working_log(const int64_t timestamp, const uint
TRANS_LOG
(
ERROR
,
"invalid state, transaction is not replaying"
,
KR
(
ret
),
"context"
,
*
this
);
need_print_trace_log_
=
true
;
}
else
if
(
OB_UNLIKELY
(
!
is_trans_valid_for_replay_
(
OB_LOG_START_MEMBERSHIP_STORAGE
,
timestamp
)))
{
TRANS_LOG
(
WARN
,
"trans is not valid"
,
K
(
*
this
),
K
(
log_id
),
K
(
timestamp
),
K
(
log
),
K
(
timestamp
));
TRANS_LOG
(
WARN
,
"trans is not valid"
,
K
(
*
this
),
K
(
log_id
),
K
(
timestamp
),
K
(
timestamp
));
ret
=
OB_TRANS_INVALID_STATE
;
need_print_trace_log_
=
true
;
}
else
if
(
0
==
submit_log_count_
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录