BareCTF tracing of UML models in Papyrus - Running the trace file

The generated file can be executed normally. By default, the folder "ctftraceXY" will contain the trace file (called streams). The XY correspond to a two digit counter, since the trace mechanism searches a folder that does not exist yet in order to avoid (accidentally) overwriting an existing trace. The new folder is created and the program tries to copy the metadata file into it. This requires that the generated project (with the src-gen/ctf folder) still exists at the original location.

The trace production can be tailored in two ways
  1. Specify trace folder
  2. The environment variable CTF_TRACE_FOLDER can indicate the use of a different folder. The variable contents may be a relative or absolute path to this folder

  3. Specify buffer size
  4. By default, a buffer of 512 bytes is used. This can be changed via the environment variable CTF_TRACE_BUFSIZE enables to customize this setting. The value should be adjusted carefully. If the buffer size is too small for a single trace event, the trace event is silently ignored. If it is large, traces are kept in memory (and not written to the file) until this buffer size is reached. While the complete trace is written when the program terminates, there is a risk of losing trace data. In order to reduce this risk, the generated code registers the code that writes remaining trace data with some signal handlers, notably SIGINT (interruption), SIGKILL (process is killed) and SIGSEGV (segmentation fault).