lib/trace-ir/packet.h \
lib/trace-ir/resolve-field-path.c \
lib/trace-ir/resolve-field-path.h \
+ lib/trace-ir/resolve-field-xref.h \
lib/trace-ir/stream.c \
lib/trace-ir/stream-class.c \
lib/trace-ir/stream-class.h \
{
int ret;
struct bt_stream_class *stream_class;
- struct bt_resolve_field_path_context resolve_ctx = {
+ struct bt_resolve_field_xref_context resolve_ctx = {
.packet_context = NULL,
.event_common_context = NULL,
.event_specific_context = field_class,
{
int ret;
struct bt_stream_class *stream_class;
- struct bt_resolve_field_path_context resolve_ctx = {
+ struct bt_resolve_field_xref_context resolve_ctx = {
.packet_context = NULL,
.event_common_context = NULL,
.event_specific_context = NULL,
static
struct bt_field_path *find_field_class_in_ctx(struct bt_field_class *fc,
- struct bt_resolve_field_path_context *ctx)
+ struct bt_resolve_field_xref_context *ctx)
{
struct bt_field_path *field_path = NULL;
int ret;
BT_ASSERT_COND_DEV_FUNC
static inline
struct bt_field_class *borrow_root_field_class(
- struct bt_resolve_field_path_context *ctx, enum bt_field_path_scope scope)
+ struct bt_resolve_field_xref_context *ctx,
+ enum bt_field_path_scope scope)
{
switch (scope) {
case BT_FIELD_PATH_SCOPE_PACKET_CONTEXT:
bool target_field_path_in_different_scope_has_struct_fc_only(
struct bt_field_path *src_field_path,
struct bt_field_path *tgt_field_path,
- struct bt_resolve_field_path_context *ctx)
+ struct bt_resolve_field_xref_context *ctx)
{
bool is_valid = true;
uint64_t i = 0;
static inline
bool lca_is_structure_field_class(struct bt_field_path *src_field_path,
struct bt_field_path *tgt_field_path,
- struct bt_resolve_field_path_context *ctx)
+ struct bt_resolve_field_xref_context *ctx)
{
bool is_valid = true;
struct bt_field_class *src_fc;
static inline
bool lca_to_target_has_struct_fc_only(struct bt_field_path *src_field_path,
struct bt_field_path *tgt_field_path,
- struct bt_resolve_field_path_context *ctx)
+ struct bt_resolve_field_xref_context *ctx)
{
bool is_valid = true;
struct bt_field_class *src_fc;
static inline
bool field_path_is_valid(struct bt_field_class *src_fc,
struct bt_field_class *tgt_fc,
- struct bt_resolve_field_path_context *ctx)
+ struct bt_resolve_field_xref_context *ctx)
{
bool is_valid = true;
struct bt_field_path *src_field_path = find_field_class_in_ctx(
static
struct bt_field_path *resolve_field_path(struct bt_field_class *src_fc,
struct bt_field_class *tgt_fc,
- struct bt_resolve_field_path_context *ctx,
+ struct bt_resolve_field_xref_context *ctx,
const char *api_func)
{
BT_ASSERT_PRE_DEV_FROM_FUNC(api_func, "valid-field-class",
}
int bt_resolve_field_paths(struct bt_field_class *fc,
- struct bt_resolve_field_path_context *ctx,
+ struct bt_resolve_field_xref_context *ctx,
const char *api_func)
{
int ret = 0;
#include <babeltrace2/trace-ir/field-class.h>
#include <babeltrace2/trace-ir/field-path.h>
#include <glib.h>
+#include "resolve-field-xref.h"
-struct bt_resolve_field_path_context {
- struct bt_field_class *packet_context;
- struct bt_field_class *event_common_context;
- struct bt_field_class *event_specific_context;
- struct bt_field_class *event_payload;
-};
-
-int bt_resolve_field_paths(struct bt_field_class *field_class,
- struct bt_resolve_field_path_context *ctx,
+int bt_resolve_field_paths(
+ struct bt_field_class *field_class,
+ struct bt_resolve_field_xref_context *ctx,
const char *api_func);
#endif /* BABELTRACE_LIB_TRACE_IR_RESOLVE_FIELD_PATH_H */
--- /dev/null
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright 2016-2018 Philippe Proulx <pproulx@efficios.com>
+ */
+
+#ifndef BABELTRACE_LIB_TRACE_IR_RESOLVE_FIELD_XREF_H
+#define BABELTRACE_LIB_TRACE_IR_RESOLVE_FIELD_XREF_H
+
+#include "lib/func-status.h"
+
+struct bt_resolve_field_xref_context {
+ struct bt_field_class *packet_context;
+ struct bt_field_class *event_common_context;
+ struct bt_field_class *event_specific_context;
+ struct bt_field_class *event_payload;
+};
+
+#endif /* BABELTRACE_LIB_TRACE_IR_RESOLVE_FIELD_XREF_H */
struct bt_field_class *field_class)
{
int ret;
- struct bt_resolve_field_path_context resolve_ctx = {
+ struct bt_resolve_field_xref_context resolve_ctx = {
.packet_context = field_class,
.event_common_context = NULL,
.event_specific_context = NULL,
struct bt_field_class *field_class)
{
int ret;
- struct bt_resolve_field_path_context resolve_ctx = {
+ struct bt_resolve_field_xref_context resolve_ctx = {
.packet_context = NULL,
.event_common_context = field_class,
.event_specific_context = NULL,