#include "context-internal.h"
#include "lttng-bytecode.h"
#include "ust-events-internal.h"
#include "context-internal.h"
#include "lttng-bytecode.h"
#include "ust-events-internal.h"
static const char *opnames[] = {
[ BYTECODE_OP_UNKNOWN ] = "UNKNOWN",
static const char *opnames[] = {
[ BYTECODE_OP_UNKNOWN ] = "UNKNOWN",
struct bytecode_runtime *runtime,
uint32_t runtime_len,
uint32_t reloc_offset,
const char *field_name,
enum bytecode_op bytecode_op)
{
struct bytecode_runtime *runtime,
uint32_t runtime_len,
uint32_t reloc_offset,
const char *field_name,
enum bytecode_op bytecode_op)
{
unsigned int nr_fields, i;
struct load_op *op;
uint32_t field_offset = 0;
unsigned int nr_fields, i;
struct load_op *op;
uint32_t field_offset = 0;
case atype_sequence_nestable:
field_offset += sizeof(unsigned long);
field_offset += sizeof(void *);
case atype_sequence_nestable:
field_offset += sizeof(unsigned long);
field_offset += sizeof(void *);
case atype_enum_nestable:
op->op = BYTECODE_OP_GET_CONTEXT_REF_S64;
break;
/* Sequence and array supported as string */
case atype_string:
case atype_enum_nestable:
op->op = BYTECODE_OP_GET_CONTEXT_REF_S64;
break;
/* Sequence and array supported as string */
case atype_string:
int bytecode_is_linked(struct lttng_ust_bytecode_node *bytecode,
struct cds_list_head *bytecode_runtime_head)
{
int bytecode_is_linked(struct lttng_ust_bytecode_node *bytecode,
struct cds_list_head *bytecode_runtime_head)
{
cds_list_for_each_entry(bc_runtime, bytecode_runtime_head, node) {
if (bc_runtime->priv->bc == bytecode)
cds_list_for_each_entry(bc_runtime, bytecode_runtime_head, node) {
if (bc_runtime->priv->bc == bytecode)
-int link_bytecode(const struct lttng_event_desc *event_desc,
- struct lttng_ctx **ctx,
+int link_bytecode(const struct lttng_ust_event_desc *event_desc,
+ struct lttng_ust_ctx **ctx,
struct cds_list_head *insert_loc)
{
int ret, offset, next_offset;
struct cds_list_head *insert_loc)
{
int ret, offset, next_offset;
runtime_priv->pub = runtime;
runtime_priv->bc = bytecode;
runtime_priv->pctx = ctx;
runtime_priv->pub = runtime;
runtime_priv->bc = bytecode;
runtime_priv->pctx = ctx;
* This function is called after we confirmed that name enabler and the
* instance are name matching (or glob pattern matching).
*/
* This function is called after we confirmed that name enabler and the
* instance are name matching (or glob pattern matching).
*/
-void lttng_enabler_link_bytecode(const struct lttng_event_desc *event_desc,
- struct lttng_ctx **ctx,
+void lttng_enabler_link_bytecode(const struct lttng_ust_event_desc *event_desc,
+ struct lttng_ust_ctx **ctx,
struct cds_list_head *instance_bytecode_head,
struct cds_list_head *enabler_bytecode_head)
{
struct lttng_ust_bytecode_node *enabler_bc;
struct cds_list_head *instance_bytecode_head,
struct cds_list_head *enabler_bytecode_head)
{
struct lttng_ust_bytecode_node *enabler_bc;
- ret = link_bytecode(event_desc, ctx, enabler_bc, insert_loc);
+ ret = link_bytecode(event_desc, ctx, enabler_bc, instance_bytecode_head, insert_loc);