Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Trace server questions

Hi,

I don't think the TmfExperiment needs to be extended or changed if your custom trace type takes care it's index and persist it to disk using Trace Compass APIs.

The TmfExperiment creates a TmfCheckpointIndexer which is in memory if it can't persist it to disk. Closing a trace or the server, the index gets lost and needs to be rebuilt. Trace Compass provides interfaces to persist the trace index on disk. For that, the custom trace type needs to implement interface ITmfPeristentlyIndexable and needs to return a TmfBTreeTraceIndexer (by method createIndexer() ) that stores the index to disk. See the CtfTmfTrace implementation for an example.

The TmfExperiment doesn't need to be changed. If all children traces can persist their index then it will use itself an TmfBTreeTraceIndexer for the experiment index. Opening the experiment then will create an index persisted on disk. 

So, I would suggest to look into using the TmfBTreeTraceIndexer for your custom trace type and implement ITmfPeristentlyIndexable, then the persistence comes out of the box. If it is not possible to use the TmfBTreeTraceIndexer I would suggest that your custom indexer implementation persists the index to disk using ITmfPerstentlyIndexable interface of your custom trace type.

BR
Bernd


From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Matthew Khouzam via tracecompass-dev <tracecompass-dev@xxxxxxxxxxx>
Sent: March 7, 2023 2:32 PM
To: tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Cc: Matthew Khouzam <matthew.khouzam@xxxxxxxxxxxx>
Subject: Re: [tracecompass-dev] Trace server questions
 
Oh, gotcha, that's kinda tricky... you would need to make a custom experiment with a custom indexer. Then connect it to the trace server for your trace types.

I was musing with doing that to handle a kernel and user space trace for the same machine to make it a "special" use case, but never got the time/energy to do it.

Matthew

From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Neel Gondalia <ngondalia@xxxxxxxxxxxxxx>
Sent: Tuesday, March 7, 2023 12:53 PM
To: tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Subject: Re: [tracecompass-dev] Trace server questions
 
Hi Matthew,

That is what i override from the custom trace type. The problem is that the server creates a TmfExperiment and indexes it. I can't override the indexer for TmfExperiment as it is instantiated by ExperimentManagerService.

Neel

From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of: Matthew Khouzam via tracecompass-dev <tracecompass-dev@xxxxxxxxxxx>
Date: Tuesday, Mar 07, 2023 at 12:46 PM
To: tracecompass-dev@xxxxxxxxxxx <tracecompass-dev@xxxxxxxxxxx>
Cc: Matthew Khouzam <matthew.khouzam@xxxxxxxxxxxx>, Elena Laskavaia <ELaskavaia@xxxxxxxxxxxxxx>
Subject: Re: [tracecompass-dev] Trace server questions

CAUTION - This email is from an external source. Please be cautious with links and attachments. (go/taginfo)

  1. I will leave this one to other people, but generic commands seem out of the scope of the trace server protocol to me. You may be able to side-band them maybe?
  2. The indexer is created by calling TmfTrace#createIndexer. Overriding that command should do the trick, I think.
I hope this helps!

Matthew


From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Neel Gondalia <ngondalia@xxxxxxxxxxxxxx>
Sent: Tuesday, March 7, 2023 11:07 AM
To: tracecompass-dev@xxxxxxxxxxx <tracecompass-dev@xxxxxxxxxxx>
Cc: Elena Laskavaia <ELaskavaia@xxxxxxxxxxxxxx>
Subject: [tracecompass-dev] Trace server questions
 

Hello everyone,


I had a couple of questions regarding the trace server.


1) I am looking to pass some commands from the vscode trace extension to the server.  Is there an endpoint to handle generic commands? Or if there is some other endpoint that can be used for such purposes. Something along the lines of receive request to server, server fires a signal, handle the signal and return the data response.


2) We have a custom trace type for which I want to provide a custom indexer. This works fine. The issue i am having is using it with the trace extension. Currently, trace server creates an experiment which also does the indexing, but it uses the TmfCheckpointIndexer and not the custom indexer i specify for the trace. Is there a way to workaround this?


Thanks,

Neel 


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Back to the top