Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
19caf206
O
oceanbase
项目概览
Metz
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
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,发现更多精彩内容 >>
提交
19caf206
编写于
7月 27, 2022
作者:
羽飞
提交者:
wangzelin.wzl
7月 27, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
revert 'use isal for crc check'
上级
139fe70c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
7 addition
and
28 deletion
+7
-28
deps/oblib/src/lib/checksum/ob_crc64.cpp
deps/oblib/src/lib/checksum/ob_crc64.cpp
+7
-27
deps/oblib/src/lib/checksum/ob_crc64.h
deps/oblib/src/lib/checksum/ob_crc64.h
+0
-1
未找到文件。
deps/oblib/src/lib/checksum/ob_crc64.cpp
浏览文件 @
19caf206
...
...
@@ -13,8 +13,6 @@
#include <stdlib.h>
#include "lib/checksum/ob_crc64.h"
#include "lib/ob_define.h"
#include "isa-l/crc64.h"
#include "isa-l/crc.h"
namespace
oceanbase
{
namespace
common
{
...
...
@@ -2832,12 +2830,6 @@ uint64_t fast_crc64_sse42_manually(uint64_t crc, const char* buf, int64_t len)
return
crc
;
}
//If the CPU is intel, ISA-L library for CRC can be used
inline
static
uint64_t
ob_crc64_isal
(
uint64_t
uCRC64
,
const
char
*
buf
,
int64_t
cb
)
{
return
crc32_iscsi
((
unsigned
char
*
)(
buf
),
cb
,
uCRC64
);
}
uint64_t
crc64_sse42_dispatch
(
uint64_t
crc
,
const
char
*
buf
,
int64_t
len
)
{
#if defined(__x86_64__)
...
...
@@ -2845,26 +2837,14 @@ uint64_t crc64_sse42_dispatch(uint64_t crc, const char* buf, int64_t len)
uint32_t
b
=
0
;
uint32_t
c
=
0
;
uint32_t
d
=
0
;
uint32_t
vendor_info
[
4
];
__asm__
(
"mov $0x0, %eax
\n\t
"
);
__asm__
(
"cpuid
\n\t
"
);
__asm__
(
"mov %%ebx, %0
\n\t
"
:
"=r"
(
vendor_info
[
0
]));
__asm__
(
"mov %%edx, %0
\n\t
"
:
"=r"
(
vendor_info
[
1
]));
__asm__
(
"mov %%ecx, %0
\n\t
"
:
"=r"
(
vendor_info
[
2
]));
vendor_info
[
3
]
=
'\0'
;
if
(
strcmp
((
char
*
)
vendor_info
,
"GenuineIntel"
)
==
0
)
{
ob_crc64_sse42_func
=
&
ob_crc64_isal
;
_OB_LOG
(
INFO
,
"Use ISAL for crc64 calculate"
);
}
else
{
asm
(
"cpuid"
:
"=a"
(
a
),
"=b"
(
b
),
"=c"
(
c
),
"=d"
(
d
)
:
"0"
(
1
));
if
((
c
&
(
1
<<
20
))
!=
0
)
{
ob_crc64_sse42_func
=
&
crc64_sse42
;
_OB_LOG
(
INFO
,
"Use CPU crc32 instructs for crc64 calculate"
);
}
else
{
ob_crc64_sse42_func
=
&
fast_crc64_sse42_manually
;
_OB_LOG
(
INFO
,
"Use manual crc32 table lookup for crc64 calculate"
);
}
asm
(
"cpuid"
:
"=a"
(
a
),
"=b"
(
b
),
"=c"
(
c
),
"=d"
(
d
)
:
"0"
(
1
));
if
((
c
&
(
1
<<
20
))
!=
0
)
{
ob_crc64_sse42_func
=
&
crc64_sse42
;
_OB_LOG
(
INFO
,
"Use CPU crc32 instructs for crc64 calculate"
);
}
else
{
ob_crc64_sse42_func
=
&
fast_crc64_sse42_manually
;
_OB_LOG
(
INFO
,
"Use manual crc32 table lookup for crc64 calculate"
);
}
#elif defined(__aarch64__)
...
...
deps/oblib/src/lib/checksum/ob_crc64.h
浏览文件 @
19caf206
...
...
@@ -66,7 +66,6 @@ inline uint64_t ob_crc64_sse42(const void* pv, int64_t cb)
return
(
*
ob_crc64_sse42_func
)(
0
,
static_cast
<
const
char
*>
(
pv
),
cb
);
}
uint64_t
ob_crc64_isal
(
uint64_t
uCRC64
,
const
void
*
pv
,
int64_t
cb
);
uint64_t
crc64_sse42_manually
(
uint64_t
crc
,
const
char
*
buf
,
int64_t
len
);
uint64_t
fast_crc64_sse42_manually
(
uint64_t
crc
,
const
char
*
buf
,
int64_t
len
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录