Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
e36be6e7
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e36be6e7
编写于
3月 23, 2010
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add entry point logging for cpu functions
上级
e07cf19f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
44 addition
and
2 deletion
+44
-2
src/cpu/cpu.c
src/cpu/cpu.c
+44
-2
未找到文件。
src/cpu/cpu.c
浏览文件 @
e36be6e7
...
...
@@ -23,6 +23,7 @@
#include <config.h>
#include "logging.h"
#include "memory.h"
#include "xml.h"
#include "cpu.h"
...
...
@@ -73,6 +74,8 @@ cpuCompareXML(virCPUDefPtr host,
virCPUDefPtr
cpu
=
NULL
;
virCPUCompareResult
ret
=
VIR_CPU_COMPARE_ERROR
;
VIR_DEBUG
(
"host=%p, xml=%s"
,
host
,
NULLSTR
(
xml
));
if
(
!
(
doc
=
virXMLParseString
(
xml
,
"cpu.xml"
)))
goto
cleanup
;
...
...
@@ -104,6 +107,8 @@ cpuCompare(virCPUDefPtr host,
{
struct
cpuArchDriver
*
driver
;
VIR_DEBUG
(
"host=%p, cpu=%p"
,
host
,
cpu
);
if
((
driver
=
cpuGetSubDriver
(
host
->
arch
))
==
NULL
)
return
VIR_CPU_COMPARE_ERROR
;
...
...
@@ -126,6 +131,13 @@ cpuDecode(virCPUDefPtr cpu,
{
struct
cpuArchDriver
*
driver
;
VIR_DEBUG
(
"cpu=%p, data=%p, nmodels=%u"
,
cpu
,
data
,
nmodels
);
if
(
models
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
nmodels
;
i
++
)
VIR_DEBUG
(
"models[%u]=%s"
,
i
,
NULLSTR
(
models
[
i
]));
}
if
(
models
==
NULL
&&
nmodels
!=
0
)
{
virCPUReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"nonzero nmodels doesn't match with NULL models"
));
...
...
@@ -163,6 +175,11 @@ cpuEncode(const char *arch,
{
struct
cpuArchDriver
*
driver
;
VIR_DEBUG
(
"arch=%s, cpu=%p, forced=%p, required=%p, "
"optional=%p, disabled=%p, forbidden=%p"
,
NULLSTR
(
arch
),
cpu
,
forced
,
required
,
optional
,
disabled
,
forbidden
);
if
((
driver
=
cpuGetSubDriver
(
arch
))
==
NULL
)
return
-
1
;
...
...
@@ -184,6 +201,8 @@ cpuDataFree(const char *arch,
{
struct
cpuArchDriver
*
driver
;
VIR_DEBUG
(
"arch=%s, data=%p"
,
NULLSTR
(
arch
),
data
);
if
(
data
==
NULL
)
return
;
...
...
@@ -206,6 +225,8 @@ cpuNodeData(const char *arch)
{
struct
cpuArchDriver
*
driver
;
VIR_DEBUG
(
"arch=%s"
,
NULLSTR
(
arch
));
if
((
driver
=
cpuGetSubDriver
(
arch
))
==
NULL
)
return
NULL
;
...
...
@@ -227,6 +248,8 @@ cpuGuestData(virCPUDefPtr host,
{
struct
cpuArchDriver
*
driver
;
VIR_DEBUG
(
"host=%p, guest=%p, data=%p"
,
host
,
guest
,
data
);
if
((
driver
=
cpuGetSubDriver
(
host
->
arch
))
==
NULL
)
return
VIR_CPU_COMPARE_ERROR
;
...
...
@@ -254,6 +277,16 @@ cpuBaselineXML(const char **xmlCPUs,
char
*
cpustr
;
unsigned
int
i
;
VIR_DEBUG
(
"ncpus=%u, nmodels=%u"
,
ncpus
,
nmodels
);
if
(
xmlCPUs
)
{
for
(
i
=
0
;
i
<
ncpus
;
i
++
)
VIR_DEBUG
(
"xmlCPUs[%u]=%s"
,
i
,
NULLSTR
(
xmlCPUs
[
i
]));
}
if
(
models
)
{
for
(
i
=
0
;
i
<
nmodels
;
i
++
)
VIR_DEBUG
(
"models[%u]=%s"
,
i
,
NULLSTR
(
models
[
i
]));
}
if
(
xmlCPUs
==
NULL
&&
ncpus
!=
0
)
{
virCPUReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"nonzero ncpus doesn't match with NULL xmlCPUs"
));
...
...
@@ -320,6 +353,17 @@ cpuBaseline(virCPUDefPtr *cpus,
{
struct
cpuArchDriver
*
driver
;
virCPUDefPtr
cpu
;
unsigned
int
i
;
VIR_DEBUG
(
"ncpus=%u, nmodels=%u"
,
ncpus
,
nmodels
);
if
(
cpus
)
{
for
(
i
=
0
;
i
<
ncpus
;
i
++
)
VIR_DEBUG
(
"cpus[%u]=%p"
,
i
,
cpus
[
i
]);
}
if
(
models
)
{
for
(
i
=
0
;
i
<
nmodels
;
i
++
)
VIR_DEBUG
(
"models[%u]=%s"
,
i
,
NULLSTR
(
models
[
i
]));
}
if
(
cpus
==
NULL
&&
ncpus
!=
0
)
{
virCPUReportError
(
VIR_ERR_INTERNAL_ERROR
,
...
...
@@ -349,8 +393,6 @@ cpuBaseline(virCPUDefPtr *cpus,
}
if
((
cpu
=
driver
->
baseline
(
cpus
,
ncpus
,
models
,
nmodels
)))
{
int
i
;
cpu
->
type
=
VIR_CPU_TYPE_GUEST
;
cpu
->
match
=
VIR_CPU_MATCH_EXACT
;
VIR_FREE
(
cpu
->
arch
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录