Difference between revisions of "TraceVis"

From BP Wiki
Jump to: navigation, search
(New page: = Debugging and visualizing behavioral Java programs with TraceVis The TraceVis tools provides visualization for the concurrent execution of multiple b-threads, with indications of the e...)
 
Line 1: Line 1:
= Debugging and visualizing behavioral Java programs with TraceVis  
+
= Debugging and visualizing behavioral Java programs with TraceVis
  
The TraceVis tools provides visualization for the concurrent execution of multiple b-threads, with indications of the events that are  requested, waited-for and blocked at each synchronization point, providing insights into why a certain event is triggered and others are not.  
+
The TraceVis tools provides visualization for the concurrent execution of multiple b-threads, with indications of the events that are  requested, waited-for and blocked at each synchronization point, providing insights into why a certain event is triggered and others are not.
  
This can be used for general program comprehension and for debugging specific flows.  
+
This can be used for general program comprehension and for debugging specific flows.
  
== TraceVis Setup ==  
+
== TraceVis Setup ==
* Add the following parameter in run configuration ->  arguments  -> vm arguments:  
+
* Add the following parameter in run configuration ->  arguments  -> vm arguments:
  
 
  -DgeneVisTrace=true
 
  -DgeneVisTrace=true
  
* Run the program as usual. The input to the trace visualization will be stored in <BProgram name>_log.xml.  
+
* Run the program as usual. The input to the trace visualization will be stored in <BProgram name>_log.xml.
* Open the file  TraceVis.htm with the FIREFOX browser.  
+
* Open the file  TraceVis.htm with the FIREFOX browser.
* In the BPJ Trace Visualization Menu browse and select the file <BProgram name>_log.xml.  
+
* In the BPJ Trace Visualization Menu browse and select the file <BProgram name>_log.xml.
 
* Choose the type of b-threads you want to display. B-threads are classified into 4 types, based on their actions in the traced run:
 
* Choose the type of b-threads you want to display. B-threads are classified into 4 types, based on their actions in the traced run:
 
** Non-Active: b-threads that did not block or request anything, and did not advance; they waited for event sequences that did not occur.
 
** Non-Active: b-threads that did not block or request anything, and did not advance; they waited for event sequences that did not occur.
Line 18: Line 18:
 
** Active: b-threads that requested or blocked events, but didn’t lead the run, i.e., none of their requests affected the run.
 
** Active: b-threads that requested or blocked events, but didn’t lead the run, i.e., none of their requests affected the run.
 
** Active-leader: b-threads that contributed to driving the run, i.e., at least one of their requests was chosen for triggering.
 
** Active-leader: b-threads that contributed to driving the run, i.e., at least one of their requests was chosen for triggering.
 +
* Optionally, choose “Group into classes” to group all b-threads of the same class in one column. The sets of requested, waited-for and blocked events shown in each cell are the union of the corresponding sets over all instances.
 +
* Optionally, choose “Group events” to show only one representative event in each cell for the requested/waited-for/blocked events, even if multiple such events exist. Clicking on the button next to the representative name shows the rest of the events.
 +
* Optionally, choose “Static view” in order to get a print-friendly view, without buttons or dynamic content.
 +
* Optionally, choose the syncpoints you want to display: how many syncpoints you want to view per page (or all), and the starting syncpoint number. The first syncpoint shown can be changed later via navigation. Note that the length of the trace that is shown affects the loading time, so it is highly advisable not to display all syncpoints for large traces.
 +
* Press “show” to view the visualization. Note that the loading might take a few minutes.

Revision as of 09:37, 5 August 2013

= Debugging and visualizing behavioral Java programs with TraceVis

The TraceVis tools provides visualization for the concurrent execution of multiple b-threads, with indications of the events that are requested, waited-for and blocked at each synchronization point, providing insights into why a certain event is triggered and others are not.

This can be used for general program comprehension and for debugging specific flows.

TraceVis Setup

  • Add the following parameter in run configuration -> arguments -> vm arguments:
-DgeneVisTrace=true
  • Run the program as usual. The input to the trace visualization will be stored in <BProgram name>_log.xml.
  • Open the file TraceVis.htm with the FIREFOX browser.
  • In the BPJ Trace Visualization Menu browse and select the file <BProgram name>_log.xml.
  • Choose the type of b-threads you want to display. B-threads are classified into 4 types, based on their actions in the traced run:
    • Non-Active: b-threads that did not block or request anything, and did not advance; they waited for event sequences that did not occur.
    • Active-follower: b-threads that advanced when certain events occurred, but did not block or request events.
    • Active: b-threads that requested or blocked events, but didn’t lead the run, i.e., none of their requests affected the run.
    • Active-leader: b-threads that contributed to driving the run, i.e., at least one of their requests was chosen for triggering.
  • Optionally, choose “Group into classes” to group all b-threads of the same class in one column. The sets of requested, waited-for and blocked events shown in each cell are the union of the corresponding sets over all instances.
  • Optionally, choose “Group events” to show only one representative event in each cell for the requested/waited-for/blocked events, even if multiple such events exist. Clicking on the button next to the representative name shows the rest of the events.
  • Optionally, choose “Static view” in order to get a print-friendly view, without buttons or dynamic content.
  • Optionally, choose the syncpoints you want to display: how many syncpoints you want to view per page (or all), and the starting syncpoint number. The first syncpoint shown can be changed later via navigation. Note that the length of the trace that is shown affects the loading time, so it is highly advisable not to display all syncpoints for large traces.
  • Press “show” to view the visualization. Note that the loading might take a few minutes.