/*
- * Babeltrace - Mapping of IR metadata and data object between input and output
- * trace
+ * SPDX-License-Identifier: MIT
*
* Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
* Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
* Copyright (c) 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.
- *
- * 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.
+ * Babeltrace - Mapping of IR metadata and data object between input and output
+ * trace
*/
#define BT_COMP_LOG_SELF_COMP (ir_maps->self_comp)
#define BT_LOG_TAG "PLUGIN/FLT.LTTNG-UTILS.DEBUG-INFO/TRACE-IR-MAPPING"
#include "logging/comp-logging.h"
-#include <stdbool.h>
-
#include "common/assert.h"
#include <babeltrace2/babeltrace.h>
-/* For bt_property_availability */
-#include <babeltrace2/property.h>
#include "debug-info.h"
#include "trace-ir-data-copy.h"
return out_trace;
}
-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)
(gpointer) in_stream_class);
}
-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)
return g_hash_table_lookup(d_maps->stream_map, (gpointer) in_stream);
}
-BT_HIDDEN
bt_stream *trace_ir_mapping_create_new_mapped_stream(
struct trace_ir_maps *ir_maps, const bt_stream *in_stream)
{
return out_stream;
}
-BT_HIDDEN
bt_stream *trace_ir_mapping_borrow_mapped_stream(struct trace_ir_maps *ir_maps,
const bt_stream *in_stream)
{
(gpointer) in_event_class);
}
-BT_HIDDEN
bt_event_class *trace_ir_mapping_create_new_mapped_event_class(
struct trace_ir_maps *ir_maps,
const bt_event_class *in_event_class)
return out_event_class;
}
-BT_HIDDEN
bt_event_class *trace_ir_mapping_borrow_mapped_event_class(
struct trace_ir_maps *ir_maps,
const bt_event_class *in_event_class)
return g_hash_table_lookup(d_maps->packet_map, (gpointer) in_packet);
}
-BT_HIDDEN
bt_packet *trace_ir_mapping_create_new_mapped_packet(
struct trace_ir_maps *ir_maps,
const bt_packet *in_packet)
return out_packet;
}
-BT_HIDDEN
bt_packet *trace_ir_mapping_borrow_mapped_packet(struct trace_ir_maps *ir_maps,
const bt_packet *in_packet)
{
return borrow_mapped_packet(d_maps, in_packet);
}
-BT_HIDDEN
void trace_ir_mapping_remove_mapped_packet(struct trace_ir_maps *ir_maps,
const bt_packet *in_packet)
{
BT_ASSERT(ret);
}
-BT_HIDDEN
void trace_ir_mapping_remove_mapped_stream(struct trace_ir_maps *ir_maps,
const bt_stream *in_stream)
{
return md_maps;
}
-BT_HIDDEN
void trace_ir_data_maps_destroy(struct trace_ir_data_maps *maps)
{
bt_trace_remove_listener_status status;
g_free(maps);
}
-BT_HIDDEN
void trace_ir_metadata_maps_destroy(struct trace_ir_metadata_maps *maps)
{
bt_trace_class_remove_listener_status status;
}
}
-BT_HIDDEN
void trace_ir_maps_destroy(struct trace_ir_maps *maps)
{
if (!maps) {
g_free(maps);
}
-BT_HIDDEN
struct trace_ir_maps *trace_ir_maps_create(bt_self_component *self_comp,
const char *debug_info_field_name, bt_logging_level log_level)
{