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

>>
>> 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?

"Event name" is not necessarily LTTng specific. Every trace event has to
define an event name (accessible with ITmfEvent.getEventType().getName()).
It would typically be specific to one trace type though.

If we are sure we want to handle just event types, we could also use
ITmfEventType, for example. Or that could be for the method specific to
event types.

>
>>
>> - 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?

Yes, extending IAnalysisModule would make sense. Like we already have
with ITmfAnalysisModuleWithStateSystems, which is for "analysis modules
that provide state systems".

>>
>> Cheers,
>> Alex



Back to the top