Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Trace Compass » Custom (time graph) view questions(three questions about custom time graphs and stateproviders)
Custom (time graph) view questions [message #1749681] Fri, 09 December 2016 14:35 Go to next message
Robbert Jongeling is currently offline Robbert JongelingFriend
Messages: 2
Registered: December 2016
Junior Member
Hi Trace Companions,

I have three questions about custom time graph views.

I have created a custom time graph view, in which all sorts of events are shown. Some events take a few seconds, while others take only microseconds. When I now zoom out, the very short events are sometimes not visible at all. Can I somehow force Trace Compass to show at least a bar of a single pixel wide if there is an event?

Is it possible to use wildcards as event names in the state provider? I have events that are named as follows foo_enter, foo_exit. But also bar_enter and bar_exit. In a time graph view, I would like to be able to show all events, by having one event handler for *_enter and one for *_exit. Is that possible?

In a time graph view, I would for example like to give the same color to any value above 100. This can be achieved e.g. by changing the XmlPresentationProvider (see diff attached). Would you also be interested in this functionality?
  • Attachment: diff.txt
    (Size: 3.12KB, Downloaded 51 times)
Re: Custom (time graph) view questions [message #1749713 is a reply to message #1749681] Fri, 09 December 2016 23:07 Go to previous messageGo to next message
Patrick Tasse is currently offline Patrick TasseFriend
Messages: 53
Registered: July 2009
Hi Robbert,

I'll just answer the first point, the others would be better answered by someone more familiar with the custom time graph views.

When we build the time graph event list for a particular zoom level, we sample the state at regular intervals, at least one sample per pixel. So there can be gaps, that should be smaller than one pixel in duration. The issue is what to do with those gaps. There are a few different options.

In Control Flow view, you have a process and show its state over time, the normal case is that the gaps are surrounded by two non-null states on each side. So what we do with gaps is use the special TRANSPARENT state table index in the presentation provider (the view creates generic dummy time graph events that can be detected as such). Those events are drawn as just a line on top and bottom and empty inside. You can see such events while navigating left and right in the Control Flow view, temporarily until the zoom thread kicks in to fill the gaps with the real data.

Your case resembles more what the Resources view does with interrupts. In that view, interrupts are normally very short in relation to the blank space to their left and right. If we were to use TRANSPARENT there, you wouldn't see anything when zoomed out (maybe a dot on top, I'm not sure), unless you are very lucky that the sample point falls inside an interrupt instead of a null state. So for that case we fill the gaps with a visible event. Since the interrupts only have one state, it's a good guess that the state between two nulls is the IRQ_ACTIVE state. Of course when you zoom in, that single dummy IRQ state in the gap might get replaced by the real data which could be three or more states: e.g. IRQ+null+IRQ. But when zoomed out you can't (and don't really need to) tell the difference (remember all this is smaller than one pixel wide).

Now if we look at the XmlTimeGraphView implementation, for the gaps it creates a dummy time graph event that has no value. In the XmlPresentationProvider, those dummy events map to the INVISIBLE index, so they are not shown at all. So two long null states (statistically sampled) with one short real state (statistically not sampled e.g. a 'gap') just show nothing at all.

The XmlPresentationProvider could be updated to either use TRANSPARENT (but this wouldn't help much your case) or have some unknown state that draws in a fixed color like black or gray (this just temporary until the user zooms and the zoom thread replaces with the actual state color).

Or perhaps, because there are different use cases, the custom time graph Xml could provide a way to define in the configuration what you want to put in the gaps.

In any case, the current implementation of using INVISIBLE is not the best, I would suggest to use at least TRANSPARENT, or some fixed 'unknown state' color.

Re: Custom (time graph) view questions [message #1750103 is a reply to message #1749713] Fri, 16 December 2016 07:37 Go to previous message
Robbert Jongeling is currently offline Robbert JongelingFriend
Messages: 2
Registered: December 2016
Junior Member
Hi Patrick,

Thanks for your answer.
We are now experimenting with using a fixed color for the null state.
Previous Topic:Live mode in Trace Compass
Next Topic:Network Tracing - Adding a new protocol
Goto Forum:

Current Time: Wed Sep 19 08:36:50 GMT 2018

Powered by FUDForum. Page generated in 0.02563 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top