X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fplugins%2Flttng-utils%2Fdebug-info%2Ftrace-ir-mapping.h;h=500201c1ef7ab6fb6b24afd77873079c235641b9;hp=e09cf7634693490b3630afab339eadc36cf7d546;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hpb=91bc8451beb6d39c9f4218e95375d01b56497976 diff --git a/src/plugins/lttng-utils/debug-info/trace-ir-mapping.h b/src/plugins/lttng-utils/debug-info/trace-ir-mapping.h index e09cf763..500201c1 100644 --- a/src/plugins/lttng-utils/debug-info/trace-ir-mapping.h +++ b/src/plugins/lttng-utils/debug-info/trace-ir-mapping.h @@ -1,27 +1,12 @@ -#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H -#define BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H /* - * Copyright 2019 Francis Deslauriers francis.deslauriers@efficios.com> - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * SPDX-License-Identifier: MIT * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * Copyright 2019 Francis Deslauriers francis.deslauriers@efficios.com> */ +#ifndef BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H +#define BABELTRACE_PLUGIN_DEBUG_INFO_TRACE_IR_MAPPING_H + #include #include "common/assert.h" @@ -30,6 +15,11 @@ #include "debug-info.h" +enum debug_info_trace_ir_mapping_status { + DEBUG_INFO_TRACE_IR_MAPPING_STATUS_OK = 0, + DEBUG_INFO_TRACE_IR_MAPPING_STATUS_MEMORY_ERROR = -12, +}; + /* Used to resolve field paths for dynamic arrays and variant field classes. */ struct field_class_resolving_context { /* Weak reference. Owned by input stream class. */ @@ -83,7 +73,7 @@ struct trace_ir_metadata_maps { struct field_class_resolving_context *fc_resolving_ctx; - uint64_t destruction_listener_id; + bt_listener_id destruction_listener_id; }; struct trace_ir_data_maps { @@ -106,7 +96,7 @@ struct trace_ir_data_maps { */ GHashTable *packet_map; - uint64_t destruction_listener_id; + bt_listener_id destruction_listener_id; }; struct trace_ir_maps { @@ -157,6 +147,16 @@ struct trace_ir_metadata_maps *trace_ir_metadata_maps_create( BT_HIDDEN void trace_ir_metadata_maps_destroy(struct trace_ir_metadata_maps *md_maps); +BT_HIDDEN +bt_stream_class *trace_ir_mapping_create_new_mapped_stream_class( + struct trace_ir_maps *ir_maps, + const bt_stream_class *in_stream_class); + +BT_HIDDEN +bt_stream_class *trace_ir_mapping_borrow_mapped_stream_class( + struct trace_ir_maps *ir_maps, + const bt_stream_class *in_stream_class); + BT_HIDDEN bt_stream *trace_ir_mapping_create_new_mapped_stream( struct trace_ir_maps *ir_maps,