[lttng-dev] Java code for CTF trace writing?
Bernd Hufmann
bernd.hufmann at ericsson.com
Wed May 8 07:38:02 EDT 2013
Hi Aaron
I'd like to comment on the pinning of views (the rest of the discussion is already covered by Alexandre).
> 1) support for being able to open as many instances of views as you wish, and then "pin" them to a particular trace. If you could do this then you could open an LTTng linux kernel view and a java trace and
> whatever else you wanted at the same time. In addition to the pin support the views would need some mechanism for time sync between them (like the current control flow view syncs based on the selection in
> Histogram view)
Since Eclipse supports to have multiple instances of the same view it should be straight forward to support multiple instances of the Tracing views. To do that we need to provide an unique instance ID to distinguish the different views. The data handled in the view has to be specific to the instance of the view. For our purpose, the data to be displayed will be related to the trace implementation (ITmfTrace). We have to make sure that the data and view are separated properly (data encapsulation). The next question is how to open a new instance of a tracing view (e.g. ControlFlowView). We could implement it similarly to the Eclipse Properties view. This means we have pin button and command to pin the view to the current active trace. To not change content when changing the trace, the pinned view has to ignore all relevant signals sent between views (e.g. TmfTraceSelectedSignal, TmfTraceOpenedSignal). Additionally, the views need a "Clone" or "New Instance" command (e.g. in the view menu) that creates a new instance of the view. The new view will be filled with the current active trace information (or stays empty initially) and when changing the trace the cloned view will change the content with the new trace information.
For the time synchronisation between views, we could have multiple instances of the Histogram View, each one synchronises with the corresponding tracing view instances from above. Or maybe the TimeChartView is sufficient to handle the time synchronisation.
Would it be beneficial to have a global action that would allow the user to clone multiple tracing views at the time? This action could allow the user to select the views to be cloned. This could be handy if there are multiple views that need to be cloned at the same time.
By the way, the base view class TmfView has already an action to pin a view that extends TmfView. Once created it will add a pin button (toggle) to the view's toolbar. This action toggles a flag in the base class and all sub-class can query this information and act accordingly. Initially this pin action was intended to be used to pin a view for the current selected time and time range. It hasn't been used by any of the Open Souce Tracing views. Even if it was meant for pinning to the current time, it's free for use and could be also be used for pinning to the current trace.
Best Regards
Bernd
________________________________________
From: Aaron Spear [aspear at vmware.com]
Sent: May 6, 2013 1:53 PM
To: Erik Ostermueller
Cc: Philippe Proulx; Dominique Toupin; Linux Tools developer discussions; lttng-dev at lists.lttng.org
Subject: Re: [lttng-dev] Java code for CTF trace writing?
Hi Erik,
The answer at this moment is no, you can't see that. That said, that is certainly the vision of what I want to create. I am working on extending a view so that I can see Java methods in one trace alongside state changes that come from another trace. The idea is to have a single view that knows how to present state vs. time and then providers for that state for different kinds of tracing. I have in fact done exactly what you want (java app trace + linux kernel trace), but it is clunky right now because you cannot see the Linux kernel trace and the Java trace at the same time.
The issue here is simply one of implementation choices related to how traces are viewed. At this moment the views in the LTTng viewer are singletons setup to only allow one trace to be viewed at a time (mostly. the "Time Chart" view is an exception to this). What is needed is one of two things (I think both):
1) support for being able to open as many instances of views as you wish, and then "pin" them to a particular trace. If you could do this then you could open an LTTng linux kernel view and a java trace and whatever else you wanted at the same time. In addition to the pin support the views would need some mechanism for time sync between them (like the current control flow view syncs based on the selection in Histogram view)
2) Change the "state flow view" that I created (borrowing code from the control flow view) so it supports multiple traces (e.g. LTTng kernel trace). I am working on this right now for data driven traces. One thought is that this view infrastructure could be changed so that a single view could show all of these different types of traces. A bunch of refactoring would be required to do this though. The current ControlFlowView has things very specific to kernel traces that don't make sense generically (e.g. process related details as columns in the trace)
I can't comment as to the official direction of the project (since I am not a committer...) but Perhaps Alexandre or others could comment on thoughts on what could be done to address this and when.
regards,
Aaron Spear
----- Original Message -----
> Hello all,
>
> I've got a question about the Java code that writes CTF traces.
> Would this design provide a single trace with Java events and OS events in
> the same trace?
> Here is an example:
>
> Consider an all-Java program that sends an XML requests request over HTTP.
> Would like the trace detail to show Java method activity as well as OS
> activity that opens/closes the socket.
>
> This could be very helpful for unveiling the details of how Java code
> consumes hardware resources.
>
> Thanks,
> --Erik
>
> -----Original Message-----
> From: Aaron Spear [mailto:aspear at vmware.com]
> Sent: Tuesday, April 23, 2013 3:51 PM
> To: Matthew Khouzam
> Cc: Philippe Proulx; Dominique Toupin; lttng-dev at lists.lttng.org; Linux Tools
> developer discussions
> Subject: Re: [lttng-dev] Java code for CTF trace writing?
>
> > When would you be available to work on this feature, I would love to
> > sync up our efforts for this.
>
> The way things look right now, I will have bandwidth for it in another month,
> so middle to end of May. Perhaps sooner if all the stars align.
>
> Aaron
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
> _____________
> The information contained in this message is proprietary and/or confidential.
> If you are not the intended recipient, please: (i) delete the message and
> all copies; (ii) do not disclose, distribute or use the message in any
> manner; and (iii) notify the sender immediately. In addition, please be
> aware that any message addressed to our domain is subject to archiving and
> review by persons other than the intended recipient. Thank you
>
_______________________________________________
lttng-dev mailing list
lttng-dev at lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
More information about the lttng-dev
mailing list