Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Segments

Hi Fabian,

Answers in line.

On 2018-07-17 09:59 AM, Scheler, Fabian (CT RDA IOT SES-DE) wrote:
> Hi Trace Compassers!
> I recorded the start and the end of request carrying out a specific
> operation on a specific element on the server.
> I want to analyze the duration of these operations and for this I
> created a data driven analysis via an XML-file. The analysis creates
> segments and as name of the segment I use the ID of the element on the
> server. And now, I have some questions regarding the usage of segments:
> Question 1:
> My problem now is, that I cannot distinguish the different operations
> that have been carried out on the element. Is it possible to structure
> segments according to multiple dimensions, e.g. the element affected
> and the operation carried out? All the data necessary is available. Or
> is it necessary to provide multiple patterns here?
To my knowledge, there is only one dimension around which to "structure"
the segments, ie a dimension that views can use to sort, etc. and that
is the name. That does not need to be unique so you may want to name by
the element affected or operation.

But, you _can_ add additional content to the segment, but you'll only be
able to sort by their alphabetical string result. You can do it like
this (this example is taken from the XML IRQ analysis [1]):

                            <stateValue type="query">
                                <stateAttribute type="constant"
value="#CurrentScenario" />
                                <stateAttribute type="constant"
value="name" />
                        <segField name="ret" type="long">
                            <stateValue type="eventField" value="ret" />
                        <segField name="irq" type="long">
                            <stateValue type="query">
                                <stateAttribute type="constant"
value="#CurrentScenario" />
                                <stateAttribute type="constant"
value="irq" />
                        <segField name="cpu" type="long">
                            <stateValue type="eventField" value="cpu" />

> Question 2:
> Is it possible to generate segments within a callstack-analysis, too?
Definitely! A callstack analysis actually _is_ a segment store. That's
how the Function Duration Distribution and Function Duration Statistics
views are filled. We haven't seen a need yet to show any other
segment-related view with this segment store, but technically, it's all
there. But what exactly would you like to do with the callstack segments?
> Question 3:
> Can I also create segments that refer to specific state transitions
> within a more complex fsm?
> For example, I have a fsm with the following states: 'start',
> 'state1', 'state2', 'end'. The initial state is 'start', then the fsm
> proceeds to 'state1', then it may switch multiple times between
> 'state2' and 'state1', before the final state 'end' is reached. I now
> want to create one segment every time, the fsm takes the transition
> between 'state1' and 'state2'.
> Is this possible?
Now _that_ is a good question. I remember working or wanting to work on
this a few years ago or at least discussing it with Jean-Christian. We
were planning on adding a field to define the start time of the segment
(end time being the time of the current event). I see it's not supported
in the code. But where is it? Was it just a dream? JC, does that ring a

Thanks for the feedback,


Back to the top