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. - 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. 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 > _______________________________________________ linuxtools-dev mailing list linuxtools-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/linuxtools-dev