[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[linuxtools-dev] extending TMF time chart viewer tooltips
|
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
Attachment:
time-chart-before.png
Description: PNG image
Attachment:
time-chart-with-all-event-attributes.png
Description: PNG image