|Re: [tracecompass-dev] Segments|
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:
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 ):
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <segment> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <segType> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <segName> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <stateValue type="query"> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <stateAttribute type="constant" value="#CurrentScenario" /> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <stateAttribute type="constant" value="name" /> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </stateValue> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </segName> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </segType> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <segContent> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <segField name="ret" type="long"> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <stateValue type="eventField" value="ret" /> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </segField> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <segField name="irq" type="long"> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <stateValue type="query"> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <stateAttribute type="constant" value="#CurrentScenario" /> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <stateAttribute type="constant" value="irq" /> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </stateValue> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </segField> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <segField name="cpu" type="long"> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <stateValue type="eventField" value="cpu" /> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </segField> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </segContent> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </segment>
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?
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 bell?
The following lines apply to the answers of both, question 2 and 3.
First: What I want to do with the callstack-segments?
Ciao Fabian -- With best regards, Dr. Fabian Scheler
Siemens AG Corporate Technology Research and Development for Digitalization and Automation CT RDA IOT SES-DE Guenther-Scharowsky-Str. 1 91058 Erlangen, Germany Tel.: +49 1522 1702973 Mobile: +49 1522 1702973 mailto:fabian.scheler@xxxxxxxxxxx
Description: S/MIME Cryptographic Signature