Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] TMF: Analysis requirement API

Hi Alex,

On 19/02/2014 4:45 PM, Alexandre Montplaisir wrote:
Hi Guilliano,

Interesting project! Indeed, there is already an API for traces to
indicate if they contain specific events (hasEvent(String),
hasAllEvents(String[]),...).[1]  The next step would be to have a way
for an analysis to specify which event types they need, so we can match
the traces and analyses better.

Some questions:
- A "string" requirement is quite generic. What actual types of
requirements do you have in mind? I can see event type (or event name),
but what else? If we can pinpoint a few specific types of requirements,
we could have a couple of methods specifically for those. Having
something too vague or too generic makes it more confusing to use, and
we don't have as much compile-time guarantees.
Since TMF isn't only LTTng oriented and can be used for many trace types, we didn't want to incline the analysis developer to provide specific type requirements, but let him instead define his type and values related. I understand that our primary analysis source is LTTng, but we don't want to bend the development towards his needs.
If analyses are and will be only for LTTng, we might reconsider the generic option.
The only compile-time guarantee you have right now is in the *Strings interfaces (LTTngStrings, UstMemoryStrings, etc.). Is the generic way of doing it might be problematic?


- Were you thinking about simply adding new API methods to
IAnalysisModule, or going through the analysis-module extension point?
Extension points are very powerful, but the golden rule is: don't use
them if you don't need to :)  In this particular case, I think you could
make do without it, but we would have to see.
Currently, we added the new API methods into IAnalysisModule (since it's pretty much related according to us). If needed be, we may extend IAnalysisModule to an IAnalysisRequirementProvider interface that would contain all the methods (only two at the moment). What do you think?

Cheers,
Alex


[1] It's only in CtfTmfTrace for now, because it's quite quick for CTF
traces to just look in the metadata for existing even types. Perhaps
this could be a good time to move it up to ITmfTrace, so it can be
implemented for other trace types.



On 14-02-19 11:40 AM, Guilliano Molaire wrote:
Hi everyone,

Mathieu Rail and I, Guilliano Molaire, are working on the TMF part of
linuxtools. Our main goal
is to provide an API for the analysis modules that will permit queries
of their requirements.

A requirement is basically a string container of his type (e.g.
"event_name") and all the values associated with it (e.g.
"sched_switch").
Other properties will be added. For instance, a requirement(or value
perhaps) could be mandatory or facultative.

This API will be used later to provide a way to obtain everything
needed to start a trace on which the analysis can be executed.
In the LTTng case, we could generate a profile with the requirements
in order to load it via the target machine.

You can follow our progress on github (branch analysis_requirement):
https://github.com/MathieuRail/org.eclipse.linuxtools

We are open to your feedback.

Thanks,
Guilliano and Mathieu


    
Guilliano

Back to the top