Hi Aaron,

The Time Chart view was initially designed only to show punctual event
distribution over time, with a model that has a low memory footprint at
zoomed-out level but that can self-itemize itself with more detail as the
user zooms in to a particular time. It was not designed to have any
knowledge of the type of event that it is displaying.

Adding event-specific information to the tool tip would be a welcome
addition. However I wouldn't include anything related to TMF events in
ITimeEvent or any of the time graph classes. The time graph is just a
widget that has no knowledge of TMF.

The Time Chart is an implementation of the time graph that does have
knowledge of TMF, so we can add the event-specific stuff there. In the Time
Chart's implementation of the time graph model (e.g. TimeChartEvent), we
have access to the TMF event's rank and to the TMF trace through the parent
entry. So we can get to the TMF event with a seek on rank on the trace. In
the case where we are zoomed out and the TimeChartEvent represents many
events (duration != 0), then we can either not show any event information,
or get to the event by using a seek on the hover time. In any case this
should be done only at hover time (getEventHoverToolTipInfo) because we
don't want to slow down the building of the model or store the TMF event in
the TimeChartEvent for memory reasons.

Once we have the TMF event, then we can go with a customizable approach
with an extension point (add a new optional child element to the 'type'
element in org.eclipse.linuxtools.tmf.ui.tracetype). Or we can have a
generic approach where we show in the tool tip information the data from
the basic ITmfEvent fields, which normally should include specific data in
the content. This would be similar to the information shown in the
Properties view when you select an event in the table (if you're running
the code from master branch). Or perhaps, make this the default tool tip
information that can be overridden by using the optional extension point
element.

Feel free to contribute any part of this to gerrit, we will be happy to
review it.

Patrick

On Wed, Jan 23, 2013 at 12:33 PM, Aaron Spear <asp...@vmware.com> wrote:

> Hi all,
>
> I have been playing with some ideas for a trace viewer, and have made a
> couple of extensions that I am interested in contributing/getting feedback
> on.
>
> I was looking at the "Time Chart" control that allows you to see
> correlation between events in various traces.  It is  particular
> interesting in that you can see kernel + ust events and such side by side.
>  I was curious why the tooltips didn't include information on the events?
>
> So, playing with this a bit I added access to the underlying ITmfEvent
> instance into the ITimeEvent class. Then in
> TimeGraphPresentationProvider.getEventHoverToolTipInfo it was possible to
> get the event type and various attribute values from the event and add them
> to the tooltip.   Have a look at screenshot time-chart-before.png and
> time-chart-with-all-event-attributes.
>
> While I think this is an improvement, I don't think that the code changes
> are all that is desireable here.  (I added about 10 lines total).  I think
> that the right way to do this is to have an extension point for factories
> for tooltips that are trace specific. So then a plugin can provide the
> implementation of this tooltip factory, and then do whatever it wants that
> is trace/event specific.  The default implementation would probably look
> like what I have here, a little smarter in terms of at least showing the
> attributes common to all events.
>
> thoughts?
> Aaron
>
> _______________________________________________
> linuxtools-dev mailing list
> linuxtools-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/linuxtools-dev
>
>
_______________________________________________
linuxtools-dev mailing list
linuxtools-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/linuxtools-dev

Reply via email to