Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] Ideas about pin and new view features

Hi,

I would like to share some ideas I had that we briefly discussed about the pin and new view features.

Let my start by stating that the current proposed patch for the pin feature was demoed to internal users who found it too restrictive. These users would expect to still be able to navigate a view that has been pinned.

That being said, I think it might be a good idea to separate the concept of pinning the 'trace' and pinning the 'time' (for this discussion pinning 'time' refers to synchronizing both the window range and the time selection).

When you create a new view instance, it's not really useful to have the new instance unconstrained by both time and trace. Otherwise you have two views that show exactly the same thing (well, you could scroll up and down and have different filters, but that will be still be possible with my following suggestion...). What I would suggest is that a new view instance should be pinned by 'trace' permanently. Furthermore, all such views pinned to the same 'trace' should be 'time' synchronized together permanently.

So for example if you have two traces opened, Trace A and Trace B. Trace A is the active trace and Control Flow view (CFV) and Resources view (RV) show Trace A. If you create a new instance of CFV, you somehow have to decide which trace it should be pinned to, let's say Trace B in this example.

Now you have CFV-B and you pin it in 'time' so that it is no longer synchronized with Trace A. If you then create a new instance of Resources view RV-B pinned in 'time', I don't think we want to have three independent time selections. You would have to manually browse in CFV-B and RV-B separately to keep them aligned. Hence the proposal to have CFV-B and RV-B permanently time-synchronized. And they would also be time-synchronized with their pinned trace Trace B so that you could correlate the trace events with the selection in those views.

Then what happens to the pinning by 'time'? I think this should be a state of that trace instance. Trace B is either pinned to its own time, or it is time-synchronized with the other unpinned traces. This propagates to all the views that are trace-pinned to that trace instance. The control of time-pinning should be available also from the trace editor and kept in consistent state with the views.

Let us now consider the case of a user that wants to view two different window ranges of the same trace. When creating a new view instance, the user would choose the same trace that is currently shown in the original view. This would create a new instance of the trace and open it in its own editor. This would allow the user to view and synchronize the trace events of the two examined regions concurrently, e.g. CFV-A(1) synchronized with Trace A(1) and CFV-A(2) synchronized with Trace A(2).

With all these views it will be useful to have clear visual indication of which views are pinned to which trace and/or synchronize together. In addition to updating the view tab title as is proposed in the current patches, just an idea, we could use some colors for example in the view/editor border. In the long term, we envision having a common container for all views/viewers related to the same trace.

With regards to the ongoing discussion about time synchronization, now that we are implementing a pin feature we could have time-synchronization being an opt-in instead of an opt-out. All that is required is to have the pinned state set by default when opening a trace (or it could be a user preference).

Some other ideas that the above design could enable (the devil is in the details):

When opening a view from the Window > Show View menu, you would get the unconstrained view (the one without a secondaryId) that follows the active trace. But when you open a view from the Project Explorer 'Views' subtree under the trace, you would get a view that is automatically pinned to that trace.

When closing a trace it would automatically close all views that are pinned to that trace.

When opening traces from under an experiment they could be automatically time-synchronized with other traces from the same experiment. (I'm not sure if it would be possible to implement this well with the pin feature?)

Any thoughts? The end goal is to have a feature that is both flexible, useful and intuitive.

Best regards,
Patrick



Back to the top