Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] [TC incubator] Data provider and its factory is not called
  • From: tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
  • Date: Fri, 15 May 2020 10:50:15 -0400
  • Autocrypt: addr=gbastien@xxxxxxxxxxxx; prefer-encrypt=mutual; keydata= xsFNBFBOneQBEACmVKsSR9YiWFJuUI5qFPMHh11O3aHBjxsVXIcPchi/FJF9ZB4rOaQ4cbVq AOFD4wftjWl5cZE6SwQS+IsCB3QjaJvq/hQsSgwW959PllZ266/yW7G8f77si2g9NeK+u5NB EwNCTLcai6VPjHXpXvWD0s9oeD5RuEK5qRjAjne7D1F/vpDEzfolc8ZIYkTp+eQ7gwgqSoei z9qPObes8fg6l/zB+vsOu2L5DE8/2Ad5ItYlC8MTD+LrFjyhxuFC14VuXvIV4DwOkKRfWGn9 PDDUnQbu2p1x4g6zLmk9Karm9qzWDKNrqhUHvrQwUS5ooiLHeCbkjDG3Iq7f9u3DiqP7OFmu 313UX8qB8glOJgGLnjha9sVwUT6Eqx+oqAXwBZJIopG5mVDTuhIiapWcWUzwewIF5rIw7ReN RQsCD2e+a+xBhoFTfM0yqbHKLaPfds2/b7+vIzi9lKfqOX8o5OEKPjJkxcxXJcYVpxCWQpfG rVuek0ucfyBd5zeHJYfwOdiVjGn7lqrhAlzsCYj7DYYSC/7bNykh2wyttuzi4DcprgxsVKIk j1KaSdq8GhSuAgOnja9Ro1/E4pNZHdBd/kNU+Qb1L98s8r3EcdOoPI4CJCDrNLodNbBliH5Y JvnpaYvMqWek+MQ8a/spmuSdFS5FivSMaOfifzWCOItTksOtEQARAQABzTJHZW5ldmlldmUg QmFzdGllbiAodGFoaW5pKSA8Z2Jhc3RpZW5AdmVyc2F0aWMubmV0PsLBoQQTAQIASwIbAwYL CQgHAwIGFQgCCQoLBBYCAwECHgECF4AfGGh0dHA6Ly9wb29sLnNrcy1rZXlzZXJ2ZXJzLm5l d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PMm+Wl8cxakWYJio09E9HaP+V7b jvgrBQ==
  • Delivered-to: tracecompass-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/tracecompass-dev>
  • List-help: <mailto:tracecompass-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/tracecompass-dev>, <mailto:tracecompass-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/tracecompass-dev>, <mailto:tracecompass-dev-request@eclipse.org?subject=unsubscribe>
  • User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Hi,


On 5/15/20 10:30 AM, tracecompass developer discussions wrote:

Hi Geneviève,


It helps, now the view is showing something! Thanks a lot! 


But may I ask why should I the ID of the data provider be identical to the ID of the factory?

Actually, the factory element in the plugin.xml file means "what is the factory class to get the data provider with ID". So the factory itself does not have an ID. Maybe we should have called the attribute dataProviderId instead of simply id, but we didn't...


Geneviève




What if I modify the 


id = "org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProviderFactory"


to be 


id = "org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProvider"


will this disable the program to find my provider factory class? 


Yang 


From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Sent: Friday, May 15, 2020 4:11 PM
To: tracecompass-dev@xxxxxxxxxxx
Subject: Re: [tracecompass-dev] [TC incubator] Data provider and its factory is not called
 

Hi Yang,


Quick check: is JpfThreadStatusDataProvider.ID equal to org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProviderFactory (the id in your factory declaration in plugin.xml)?


These 2 values should match.


HTH,

Geneviève


On 5/15/20 9:42 AM, tracecompass developer discussions wrote:

Hi,


I'm implementing a new trace type and try to visualize it by extending the control flow view, but I encountered some problems and would like to ask your help.


Formerly my trace implements IKernelTrace so it could be drawn by the Control Flow View. 

Now I want to make my own trace events types(not only the ones in DefaultEventLayout) such as thread_wait, thread_notify, etc. I also expect to draw more elements on the chart denoting these type of events.


Now I created a ui module for my trace, the view class extends ControlFlowView, and override the getProviderId() function by returning the ID of my extended JpfThreadStatusDataProvider:


    @Override
    protected String getProviderId() {
        return JpfThreadStatusDataProvider.ID;
    }


I've also created a factory for my data provider and try to hook it to the dataprovider point in plugin.xml, and I do like this:


   <extension
         point="org.eclipse.tracecompass.tmf.core.dataprovider">
      <dataProviderFactory
              class="org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProviderFactory"
              id="org.eclipse.tracecompass.incubator.internal.jpftrace.ui.view.JpfThreadStatusDataProviderFactory">
      </dataProviderFactory>
   </extension>


But from the running and logging, I could see that:


* My view window could be opened, but there's nothing in it. 

        (there should be a graph at least the same athe control flow view if it works)


* The JpfTraceControlFlowView is constructed, and the overrided getProviderId() is called;


The function createProvider() of my data provider factory is never called;

so my JpfThreadStatusDataProvider is not instantiated.


How should I check if I miss anything for it to work? Or should I do it in another way to create the expected features?


Thank you a lot in advance,


Yang


_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tracecompass-dev

_______________________________________________
tracecompass-dev mailing list
tracecompass-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tracecompass-dev

Back to the top