-
- parent_def_scope = trace->definition_scope;
- if (stream->packet_context_decl) {
- stream->packet_context =
- container_of(
- stream->packet_context_decl->p.definition_new(&stream->packet_context_decl->p,
- parent_def_scope, 0, 0),
- struct definition_struct, p);
- set_dynamic_definition_scope(&stream->packet_context->p,
- stream->packet_context->scope,
- "stream.packet.context");
- parent_def_scope = stream->packet_context->scope;
- declaration_unref(&stream->packet_context_decl->p);
- }
- if (stream->event_header_decl) {
- stream->event_header =
- container_of(
- stream->event_header_decl->p.definition_new(&stream->event_header_decl->p,
- parent_def_scope, 0, 0),
- struct definition_struct, p);
- set_dynamic_definition_scope(&stream->event_header->p,
- stream->event_header->scope,
- "stream.event.header");
- parent_def_scope = stream->event_header->scope;
- declaration_unref(&stream->event_header_decl->p);
- }
- if (stream->event_context_decl) {
- stream->event_context =
- container_of(
- stream->event_context_decl->p.definition_new(&stream->event_context_decl->p,
- parent_def_scope, 0, 0),
- struct definition_struct, p);
- set_dynamic_definition_scope(&stream->event_context->p,
- stream->event_context->scope,
- "stream.event.context");
- parent_def_scope = stream->event_context->scope;
- declaration_unref(&stream->event_context_decl->p);
- }
- stream->definition_scope = parent_def_scope;