Skip to main content

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

Hi Geneviève,

thanks for your reply!

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" />


OK, the filtering-mechanism along with segment contents gives me what I need here. Thank you!

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

The following lines apply to the answers of both, question 2 and 3.

First: What I want to do with the callstack-segments?

One possibly large requests contains possibly a multitude of interesting time-intervalls I want to inspect and analyze via segments.

It is definitely possible to come up with specific segments for each of these intervall-types. However, I want to keep the footprint of each event small by reusing information like this:

- One request may apply to multiple elements on the server.
- I want to analyze the time it takes to handle the single elements, and I know that the same operation will be applied to all elements because these are part of the same request. - I only provide the information about the operation when the request starts. - I want to reuse this information when a single element of the request is handled.

Using callstacks and a possibly larger fsm, something like this should be possible, if it would be possible to create segments starting/ending at arbitrary states in the fsm.

I already tried to use sub-fsms for that purpose, but I was not successful. Do sub-fsms even create scenarios that can be used to generate segments?

With best regards,
Dr. Fabian Scheler

Siemens AG
Corporate Technology
Research and Development for Digitalization and Automation
Guenther-Scharowsky-Str. 1
91058 Erlangen, Germany
Tel.: +49 1522 1702973
Mobile: +49 1522 1702973

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; Managing Board: Joe Kaeser, Chairman, President and Chief Executive Officer; Roland Busch, Lisa Davis, Klaus Helmrich, Janina Kugel, Cedrik Neike, Michael Sen, Ralf P. Thomas; Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Back to the top