Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
6eb3a1f4
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看板
提交
6eb3a1f4
编写于
5月 04, 2011
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
esx: Disable performance counter queries in esxDomainGetInfo
The queried values aren't used yet.
上级
62a6b7cc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
0 deletion
+17
-0
src/esx/esx_driver.c
src/esx/esx_driver.c
+17
-0
未找到文件。
src/esx/esx_driver.c
浏览文件 @
6eb3a1f4
...
...
@@ -2163,6 +2163,15 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
/*
* libvirt exposed virtual CPU usage in absolute time, ESX doesn't provide this
* information in this format. It exposes it in 20 seconds slots, but it's hard
* to get a reliable absolute time from this. Therefore, disable the code that
* queries the performance counters here for now, but keep it as example for how
* to query a selected performance counter for its values.
*/
#define ESX_QUERY_FOR_USED_CPU_TIME 0
static
int
esxDomainGetInfo
(
virDomainPtr
domain
,
virDomainInfoPtr
info
)
{
...
...
@@ -2173,6 +2182,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
esxVI_VirtualMachinePowerState
powerState
;
int64_t
memory_limit
=
-
1
;
#if ESX_QUERY_FOR_USED_CPU_TIME
esxVI_PerfMetricId
*
perfMetricId
=
NULL
;
esxVI_PerfMetricId
*
perfMetricIdList
=
NULL
;
esxVI_Int
*
counterId
=
NULL
;
...
...
@@ -2185,6 +2195,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
esxVI_PerfEntityMetric
*
perfEntityMetric
=
NULL
;
esxVI_PerfMetricIntSeries
*
perfMetricIntSeries
=
NULL
;
esxVI_Long
*
value
=
NULL
;
#endif
memset
(
info
,
0
,
sizeof
(
*
info
));
...
...
@@ -2249,6 +2260,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
/* memory_limit < 0 means no memory limit is set */
info
->
memory
=
memory_limit
<
0
?
info
->
maxMem
:
memory_limit
;
#if ESX_QUERY_FOR_USED_CPU_TIME
/* Verify the cached 'used CPU time' performance counter ID */
/* FIXME: Currently no host for a vpx:// connection */
if
(
priv
->
host
!=
NULL
)
{
...
...
@@ -2404,10 +2416,12 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
*/
}
}
#endif
result
=
0
;
cleanup:
#if ESX_QUERY_FOR_USED_CPU_TIME
/*
* Remove values owned by data structures to prevent them from being freed
* by the call to esxVI_PerfQuerySpec_Free().
...
...
@@ -2420,14 +2434,17 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
querySpec
->
metricId
->
instance
=
NULL
;
}
}
#endif
esxVI_String_Free
(
&
propertyNameList
);
esxVI_ObjectContent_Free
(
&
virtualMachine
);
#if ESX_QUERY_FOR_USED_CPU_TIME
esxVI_PerfMetricId_Free
(
&
perfMetricIdList
);
esxVI_Int_Free
(
&
counterIdList
);
esxVI_PerfCounterInfo_Free
(
&
perfCounterInfoList
);
esxVI_PerfQuerySpec_Free
(
&
querySpec
);
esxVI_PerfEntityMetricBase_Free
(
&
perfEntityMetricBaseList
);
#endif
return
result
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录