2 # Common variables and macros (for C templates).
5 {% import 'common.j2' as common %}
7 {# generic barectf context structure name #}
8 {% set ctx_struct_name %}{{ common.prefix }}ctx{% endset %}
11 # Generates the name of a tracing function for the stream type
12 # `stream_type` and the event type `ev_type`.
16 # barectf_my_stream_trace_my_event
18 {% macro trace_func_name(stream_type, ev_type) %}
19 {{ common.prefix }}{{ stream_type.name }}_trace_{{ ev_type.name }}
23 # Generates the name of a source variable from the names of the
30 {% macro op_src(op) %}
31 {{ op.names | join('_') }}