Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
b04de8d4
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b04de8d4
编写于
11月 29, 2017
作者:
B
Brian Johnson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adding logging for contract load time.
上级
1ee7d512
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
3 deletion
+5
-3
libraries/chain/wasm_interface.cpp
libraries/chain/wasm_interface.cpp
+5
-3
未找到文件。
libraries/chain/wasm_interface.cpp
浏览文件 @
b04de8d4
...
...
@@ -974,7 +974,7 @@ DEFINE_INTRINSIC_FUNCTION2(env,account_balance_get,account_balance_get,i32,i32,c
try
{
// wlog( "LOADING CODE" );
//
auto start = fc::time_point::now();
const
auto
start
=
fc
::
time_point
::
now
();
Serialization
::
MemoryInputStream
stream
((
const
U8
*
)
recipient
.
code
.
data
(),
recipient
.
code
.
size
());
WASM
::
serializeWithInjection
(
stream
,
*
state
.
module
);
...
...
@@ -982,8 +982,7 @@ DEFINE_INTRINSIC_FUNCTION2(env,account_balance_get,account_balance_get,i32,i32,c
LinkResult
linkResult
=
linkModule
(
*
state
.
module
,
rootResolver
);
state
.
instance
=
instantiateModule
(
*
state
.
module
,
std
::
move
(
linkResult
.
resolvedImports
)
);
FC_ASSERT
(
state
.
instance
);
// auto end = fc::time_point::now();
// idump(( (end-start).count()/1000000.0) );
const
auto
llvm_time
=
fc
::
time_point
::
now
();
current_memory
=
Runtime
::
getDefaultMemory
(
state
.
instance
);
...
...
@@ -1004,6 +1003,7 @@ DEFINE_INTRINSIC_FUNCTION2(env,account_balance_get,account_balance_get,i32,i32,c
//std::cerr <<"\n";
state
.
code_version
=
recipient
.
code_version
;
// idump((state.code_version));
const
auto
init_time
=
fc
::
time_point
::
now
();
types
::
abi
abi
;
if
(
types
::
abi_serializer
::
to_abi
(
recipient
.
abi
,
abi
)
)
...
...
@@ -1019,6 +1019,8 @@ DEFINE_INTRINSIC_FUNCTION2(env,account_balance_get,account_balance_get,i32,i32,c
state
.
table_key_types
.
emplace
(
std
::
make_pair
(
table
.
table_name
,
key_type
));
}
}
ilog
(
"wasm_interface::load times llvm:${llvm} ms, init:${init} ms, abi:${abi} ms"
,
(
"llvm"
,(
llvm_time
-
start
).
count
()
/
1000.0
)(
"init"
,(
init_time
-
llvm_time
).
count
()
/
1000.0
)(
"abi"
,(
fc
::
time_point
::
now
()
-
init_time
).
count
()
/
1000.0
));
}
catch
(
Serialization
::
FatalSerializationException
exception
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录