SimGrid: Tracing marks

SimGrid 3.10 Versatile Simulation of Distributed Systems

- Home page
- Online documentation
- Dev's Corner

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Tracing marks
TRACE

Functions to declare and create tracing marks. More...

## Functions
void | TRACE_declare_mark (const char *mark_type)
| Declare a new type for tracing mark.
void | TRACE_declare_mark_value_with_color (const char *mark_type, const char *mark_value, const char *mark_color)
| Declare a new colored value for a previously declared mark type.
void | TRACE_declare_mark_value (const char *mark_type, const char *mark_value)
| Declare a new value for a previously declared mark type.
void | TRACE_mark (const char *mark_type, const char *mark_value)
| Create a new instance of a tracing mark type.
xbt_dynar_t | TRACE_get_marks (void)
| Get declared marks.

## Detailed Description

Functions to declare and create tracing marks.

## Function Documentation

void TRACE_declare_mark | ( | const char * | mark_type | ) |

Declare a new type for tracing mark.

This function declares a new Paje event type in the trace file that can be used by simulators to declare application-level marks. This function is independent of which API is used in SimGrid.

Parameters

  mark_type | The name of the new type.

See Also
  TRACE_mark

void TRACE_declare_mark_value_with_color | ( | const char * | mark_type,
|  | const char * | mark_value,
|  | const char * | mark_color
| ) |  |

Declare a new colored value for a previously declared mark type.

This function declares a new colored value for a Paje event type in the trace file that can be used by simulators to declare application-level marks. This function is independent of which API is used in SimGrid. The color needs to be a string with three numbers separated by spaces in the range [0,1]. A light-gray color can be specified using "0.7 0.7 0.7" as color. If a NULL color is provided, the color used will be white ("1 1 1").

Parameters

  mark_type | The name of the new type.
  mark_value | The name of the new value for this type.
  mark_color | The color of the new value for this type.

See Also
  TRACE_mark

void TRACE_declare_mark_value | ( | const char * | mark_type,
|  | const char * | mark_value
| ) |  |

Declare a new value for a previously declared mark type.

This function declares a new value for a Paje event type in the trace file that can be used by simulators to declare application-level marks. This function is independent of which API is used in SimGrid. Calling this function is the same as calling TRACE_declare_mark_value_with_color with a NULL color.

Parameters

  mark_type | The name of the new type.
  mark_value | The name of the new value for this type.

See Also
  TRACE_mark

void TRACE_mark | ( | const char * | mark_type,
|  | const char * | mark_value
| ) |  |

Create a new instance of a tracing mark type.

This function creates a mark in the trace file. The first parameter had to be previously declared using TRACE_declare_mark, the second is the identifier for this mark instance. We recommend that the mark_value is a unique value for the whole simulation. Nevertheless, this is not a strong requirement: the trace will be valid even if there are multiple mark identifiers for the same trace.

Parameters

  mark_type | The name of the type for which the new instance will belong.
  mark_value | The name of the new instance mark.

See Also
  TRACE_declare_mark

xbt_dynar_t TRACE_get_marks | ( | void |  | ) |

Get declared marks.

This function should be used to get marks that were already declared with TRACE_declare_mark.

Returns
  A dynar with the declared marks, must be freed with xbt_dynar_free.