#define BT_COMP_LOG_SELF_COMP (ctx->self_comp)
#define BT_LOG_OUTPUT_LEVEL (ctx->log_level)
#define BT_LOG_TAG "PLUGIN/CTF/META/RESOLVE"
#define BT_COMP_LOG_SELF_COMP (ctx->self_comp)
#define BT_LOG_OUTPUT_LEVEL (ctx->log_level)
#define BT_LOG_TAG "PLUGIN/CTF/META/RESOLVE"
#include <babeltrace2/babeltrace.h>
#include "common/macros.h"
#include "common/assert.h"
#include "common/common.h"
#include <glib.h>
#include <babeltrace2/babeltrace.h>
#include "common/macros.h"
#include "common/assert.h"
#include "common/common.h"
#include <glib.h>
- struct field_class_stack_frame *entry = NULL;
-
- if (!stack || index >= stack->len) {
- goto end;
- }
-
- entry = g_ptr_array_index(stack, index);
+ BT_ASSERT(stack);
+ BT_ASSERT(index < stack->len);
const size_t prefixes_count = sizeof(absolute_path_prefixes) /
sizeof(*absolute_path_prefixes);
for (scope = CTF_SCOPE_PACKET_HEADER; scope < CTF_SCOPE_PACKET_HEADER +
prefixes_count; scope++) {
/*
const size_t prefixes_count = sizeof(absolute_path_prefixes) /
sizeof(*absolute_path_prefixes);
for (scope = CTF_SCOPE_PACKET_HEADER; scope < CTF_SCOPE_PACKET_HEADER +
prefixes_count; scope++) {
/*
/*
* Converts a path token list to a field path object. The path token
* list is relative from `fc`. The index of the source looking for its
/*
* Converts a path token list to a field path object. The path token
* list is relative from `fc`. The index of the source looking for its
- * target within `fc` is indicated by `src_index`. This can be `INT64_MAX`
- * if the source is contained in `fc`.
+ * target within `fc` is indicated by `src_index`. This can be
+ * `INT64_MAX` if the source is contained in `fc`.
/* Absolute or relative path? */
root_scope = get_root_scope_from_absolute_pathstr(pathstr, ctx);
/* Absolute or relative path? */
root_scope = get_root_scope_from_absolute_pathstr(pathstr, ctx);
/* Relative path: start with current root scope */
field_path->root = ctx->root_scope;
BT_COMP_LOGD("Detected relative path: starting with current root scope: "
/* Relative path: start with current root scope */
field_path->root = ctx->root_scope;
BT_COMP_LOGD("Detected relative path: starting with current root scope: "
GString *field_path_pretty = ctf_field_path_string(field_path);
const char *field_path_pretty_str =
field_path_pretty ? field_path_pretty->str : NULL;
GString *field_path_pretty = ctf_field_path_string(field_path);
const char *field_path_pretty_str =
field_path_pretty ? field_path_pretty->str : NULL;
* Returns the index of the lowest common ancestor of two field path
* objects having the same root scope.
*/
* Returns the index of the lowest common ancestor of two field path
* objects having the same root scope.
*/
int64_t get_field_paths_lca_index(struct ctf_field_path *field_path1,
struct ctf_field_path *field_path2,
struct resolve_context *ctx)
int64_t get_field_paths_lca_index(struct ctf_field_path *field_path1,
struct ctf_field_path *field_path2,
struct resolve_context *ctx)
GString *field_path1_pretty =
ctf_field_path_string(field_path1);
GString *field_path2_pretty =
GString *field_path1_pretty =
ctf_field_path_string(field_path1);
GString *field_path2_pretty =