Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] Use Trace compass internal storage for large trace streaming mode

Hi,

First of all, what do you mean with streaming function flow trace? Do you mean that you have stream trace data into a trace that Trace Compass is then supposed to analyze and when new trace data arrives continue with the analysis (live trace analysis)? Please clarify. 

Streaming and  live trace analysis is not fully supported at the moment. There is some code to achieve that and views are made to allow to display data while the trace (offline trace) is analysed. But handling streamed trace is not supported out of the box.

If you store data in heap you run into issue of running out of heap, depending on trace size and size of heap. That's why in Trace Compass intermediate storages on disk like state system  exists.

I think you can use the state system to store the data and then have data providers (another Trace Compass concept) to query the state system and further analyse or visualize the data.

Since you dealing with function entries/exits you might want to look into the flame chart analysis (or also called call stack analysis) and how it uses the state system apis to store that. In particular, it use the pushAttribute and popAttribute feature of the state system.

Here is the state provider for the call stack analysis of LTTng UST traces with function entry/exit  (from finstrument functions of gcc). It extends a generic CallStackStateProvider
  
Once you have created your own state provider extending the CallStackStateProvider then you can create an analysis module extending https://github.com/eclipse-tracecompass/org.eclipse.tracecompass/blob/master/analysis/org.eclipse.tracecompass.analysis.profiling.core/src/org/eclipse/tracecompass/analysis/profiling/core/instrumented/InstrumentedCallStackAnalysis.java. After adding the analysis module to your plugin.xml then you should be able to see the a call stack view out-of-the-box in Trace Compass

I hope this helps. If you have any more questions please let us know

Regards
Bernd


From: tracecompass-dev <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of Vinod Appu via tracecompass-dev <tracecompass-dev@xxxxxxxxxxx>
Sent: August 5, 2024 1:16 AM
To: Matthew Khouzam <matthew.khouzam@xxxxxxxxxxxx>; tracecompass-dev@xxxxxxxxxxx <tracecompass-dev@xxxxxxxxxxx>
Cc: Vinod Appu <vinod.appu@xxxxxxxxxxx>
Subject: [tracecompass-dev] Use Trace compass internal storage for large trace streaming mode
 

Hi,

 

I’m trying to implement a streaming function flow trace (function entry and exit), where the below specific case is getting handled.

 

  1. Now we keep function entry and exit it in a list in heap which is the data to be displayed, but obviously for large data, this is not enough.
  2. If we store the function entry and exit again into a file, which will affect the performance.

 

Below is what I’m trying to achieve in theory.

 

  1. Use state system itself as the cache, stream events and feed to the state system.
  2. Let the state system persist data to hard disk in its own format.
  3. One-time sequential analysis, I’ll discard the original data once analysis is done (Need to identify a point where this can be done too.)

 

Please share your thoughts, Could you please share the major areas I must investigate?

 

~Vinod


Back to the top