我的迹线罗盘分析有什么问题?
What's wrong with my trace compass analysis?
我使用头文件生成了带有 lttng-ust 的事件流,包含以下事件声明:
TRACEPOINT_EVENT(
random_chart,
point,
TP_ARGS(
int, value_arg
),
TP_FIELDS(
ctf_integer( int, value, value_arg )
))
在 TraceCompass 中成功打开它之后,我尝试用 XYChart 编写分析,将这个价值流显示为一个简单的图表。我的 XML 文件包含以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<!-- The state provider assigns states from events -->
<stateProvider id="org.eclipse.linuxtools.ust.random_chart" version="1">
<head>
<traceType id="org.eclipse.linuxtools.lttng2.ust.tracetype" />
<label value="Value chart analysis" />
</head>
<!-- Event handlers -->
<eventHandler eventName="random_chart:point">
<stateChange>
<stateAttribute type="constant" value="Dummy" />
<stateAttribute type="constant" value="Value" />
<stateValue type="eventField" value="value" />
</stateChange>
</eventHandler>
</stateProvider>
<!-- This is the definition of the XY chart view -->
<xyView id="my.test.xy.chart.view">
<head>
<analysis id="org.eclipse.linuxtools.ust.random_chart" />
</head>
<entry path="Dummy/Value">
<display type="constant" value="Value" />
<name type="self" />
</entry>
</xyView>
我看不出它有什么问题(即使在阅读了 git-存储库中所有相关的 xml-schema 文件之后)。
我可以成功导入它,但是在单击 'XML XY Chart View' 之后,我看到一个空图和 'type filter text' 下的一个(事件流中的最后一个)值。
AFAIK 'State System Explorer' 显示我正确的 'Value at timestamp' 对应于 'Full attribute path' 等于 'Dummy/Value'。可能我漏掉了什么。
EDIT1:我已经尝试修复,但仍然没有成功:
<entry path="Dummy"> <display type="constant" value="Value" /> <name type="self" /> </entry>
EDIT2: 同样的问题:
<entry path="Dummy/Value">
<display type="self" />
<name type="self" />
</entry>
鉴于您只有一个数据属性,您有 2 种可能性来解决问题:
1- 将 <entry path="Dummy/Value">
改为 <entry path="Dummy">
并保留其余的
或
2- 保留您的输入并将显示元素更改为 <display type="self" />
类型常量的显示意味着它试图读取主路径下该名称的属性,所以在这里,它试图读取不存在的 "Dummy/Value/Value"
编辑:这是供您分析的视图部分的工作示例:
<xyView id="my.test.xy.chart.view">
<head>
<analysis id="org.eclipse.linuxtools.ust.random_chart" />
<label value="Random view" />
</head>
<entry path="Dummy">
<display type="constant" value="Value" />
<name type="self" />
</entry>
</xyView>
我使用头文件生成了带有 lttng-ust 的事件流,包含以下事件声明:
TRACEPOINT_EVENT(
random_chart,
point,
TP_ARGS(
int, value_arg
),
TP_FIELDS(
ctf_integer( int, value, value_arg )
))
在 TraceCompass 中成功打开它之后,我尝试用 XYChart 编写分析,将这个价值流显示为一个简单的图表。我的 XML 文件包含以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<!-- The state provider assigns states from events -->
<stateProvider id="org.eclipse.linuxtools.ust.random_chart" version="1">
<head>
<traceType id="org.eclipse.linuxtools.lttng2.ust.tracetype" />
<label value="Value chart analysis" />
</head>
<!-- Event handlers -->
<eventHandler eventName="random_chart:point">
<stateChange>
<stateAttribute type="constant" value="Dummy" />
<stateAttribute type="constant" value="Value" />
<stateValue type="eventField" value="value" />
</stateChange>
</eventHandler>
</stateProvider>
<!-- This is the definition of the XY chart view -->
<xyView id="my.test.xy.chart.view">
<head>
<analysis id="org.eclipse.linuxtools.ust.random_chart" />
</head>
<entry path="Dummy/Value">
<display type="constant" value="Value" />
<name type="self" />
</entry>
</xyView>
我看不出它有什么问题(即使在阅读了 git-存储库中所有相关的 xml-schema 文件之后)。
我可以成功导入它,但是在单击 'XML XY Chart View' 之后,我看到一个空图和 'type filter text' 下的一个(事件流中的最后一个)值。
AFAIK 'State System Explorer' 显示我正确的 'Value at timestamp' 对应于 'Full attribute path' 等于 'Dummy/Value'。可能我漏掉了什么。
EDIT1:我已经尝试修复,但仍然没有成功:
<entry path="Dummy"> <display type="constant" value="Value" /> <name type="self" /> </entry>
EDIT2: 同样的问题:
<entry path="Dummy/Value">
<display type="self" />
<name type="self" />
</entry>
鉴于您只有一个数据属性,您有 2 种可能性来解决问题:
1- 将 <entry path="Dummy/Value">
改为 <entry path="Dummy">
并保留其余的
或
2- 保留您的输入并将显示元素更改为 <display type="self" />
类型常量的显示意味着它试图读取主路径下该名称的属性,所以在这里,它试图读取不存在的 "Dummy/Value/Value"
编辑:这是供您分析的视图部分的工作示例:
<xyView id="my.test.xy.chart.view">
<head>
<analysis id="org.eclipse.linuxtools.ust.random_chart" />
<label value="Random view" />
</head>
<entry path="Dummy">
<display type="constant" value="Value" />
<name type="self" />
</entry>
</xyView>