Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tracecompass-dev] [v5.3.0] Question about JsonTrace module and custom parser for json files

Hi Geneviève,


Thank you for your reply! And thanks for the guide to the incubator, I would look into it to see how it extends jsontrace.


I couldn't yet say which format is more similar to the one we are using, because the trace data we contains some unnatural attributes, 

since program is a JVM(JPF) above JVM, it executes parallel java programs and analyses possible deadlocks or conflicts. Its output has, for example, 


* no real time stamps, but execution sequence of thread (discretized into group of instructions).


* a choice generator to decide which thread and instruction to proceed next, 


    for example, the program proceed a thread for a while and then decided whether to switch to another; this is controlled by choice-generator.


    ​one of our expectation is to perseve the total number of choices (at any time) and visualize it.



In general, instead of being a real trace, our data includes the possibility of different execution order, 

which I think are very customized comparing with the commonly used formats, 

so I wonder how and where should these custom data structures be imported?


Best regards,


Yang Zhou
Kungliga Tekniska högskolan | KTH Royal Institute of Technology
Master i datalogi | Master of Computer Science
Datorgrafik och visualisering | Computer Graphics and Visualization
Email (preferred): zhy@xxxxxx
Tel: +46 073 846 48 96 

From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Sent: Monday, April 6, 2020 2:49 PM
To: tracecompass-dev@xxxxxxxxxxx
Subject: Re: [tracecompass-dev] [v5.3.0] Question about JsonTrace module and custom parser for json files
 

Hi Yang,


By json trace, do you mean the trace-event trace format? Where a trace event looks like this:


{"cat":"task","pid":23885,"tid":11,"ts":1496637340355,"ph":"B","name":"SyncChannel::SendWithTimeout"},


If so, the current analysis is already at thread level so you wouldn't have to do much. Trace Compass itself produces, when logging is activated, such a trace type.


Or is it rather a variation on the OpenTracing trace?


In both cases, you should look at the incubator source code [1], where the 2 classes, OpenTracingTrace and TraceEventTrace, both extend the JsonTrace and have their associated analyses.


Don't hesitate to ask more question if that does not give you the answer you were looking for.


[1] https://projects.eclipse.org/projects/tools.tracecompass.incubator/developer


Best regards,

Geneviève





On 4/6/20 8:12 AM, tracecompass developer discussions wrote:

Sorry it was my bad, I solved this by select the add-ons and the jsontrace option is now available,


Now my question is about developing a custom parser for json file, since the java trace data we are creating is output in this file format. 

The attribute we are using might be different from JsonTrace, since it is for thread-level infomation instead of processes,


So I would like to know if it's possible to:


1. define custom event type for thread-level events

    ​so that the analysis module could recognize the event types and highlight them in charts.

2. extend (or create) another json file parser for this kind of json file. 


I have looked into the class JsonTrace and TmfTrace which it extends, and think I may start from extending JsonTrace, 

but I would like to know your suggestions, how to better structure this?


Best regards,


Yang Zhou
Kungliga Tekniska högskolan | KTH Royal Institute of Technology
Master i datalogi | Master of Computer Science
Datorgrafik och visualisering | Computer Graphics and Visualization
Email (preferred): zhy@xxxxxx
Tel: +46 073 846 48 96 

From: tracecompass-dev-bounces@xxxxxxxxxxx <tracecompass-dev-bounces@xxxxxxxxxxx> on behalf of tracecompass developer discussions <tracecompass-dev@xxxxxxxxxxx>
Sent: Monday, April 6, 2020 1:54 PM
To: tracecompass-dev@xxxxxxxxxxx
Subject: [tracecompass-dev] [v5.3.0] Question about JsonTrace module and custom parser for json files
 

Hi all


I'm Yang and I'm doing a master thesis about visualising Java traces with TraceCompass, my supervisor is Cyrille Artho.


Currently I built TC v5.3.0 from source and was trying to import a json file, however the JsonTrace module doesn't exist, and Json Trace files cannot be recognized. 

Before this I was using the official release package v5.2 and it supports importing Json file, no matter it is a valid trace or not. 

The current problem is, the maven build log shows that all modules are built successfully, including JsonTrace.


[INFO] Trace Compass Json trace Parent .................... SUCCESS [  0.031 s]
[INFO] org.eclipse.tracecompass.jsontrace.core ............ SUCCESS [  0.677 s]
[INFO] org.eclipse.tracecompass.jsontrace ................. SUCCESS [  1.890 s]
...
[INFO] org.eclipse.tracecompass.tmf.remote ................ SUCCESS [  1.234 s]
[INFO] Trace Compass Repository ........................... SUCCESS [ 14.221 s]
[INFO] org.eclipse.tracecompass.jsontrace.core.tests ...... SUCCESS [  0.554 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

However option "jsontrace" doesn't exist in the menu.


I look up the build configurations and there is <module> jsontrace </module> in the root pom file, but do I need to pass any parameters when building?


Looking forward to your reply and thanks in advance, once I got this solved, I have some further questions about extending class JsonTrace ​and  analysis of custom event types.


Best regards,


Yang Zhou
Kungliga Tekniska högskolan | KTH Royal Institute of Technology
Master i datalogi | Master of Computer Science
Datorgrafik och visualisering | Computer Graphics and Visualization
Email (preferred): zhy@xxxxxx
Tel: +46 073 846 48 96 

_______________________________________________
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