#include "common/ust-fd.h"
#include "common/dynamic-type.h"
#include "common/ust-context-provider.h"
-#include "error.h"
-#include "lttng-ust-uuid.h"
-#include "tracepoint-internal.h"
-#include "string-utils.h"
+#include "common/tracepoint.h"
+#include "common/strutils.h"
#include "lttng-bytecode.h"
-#include "lttng-tracer.h"
+#include "common/tracer.h"
#include "lttng-tracer-core.h"
#include "lttng-ust-statedump.h"
#include "context-internal.h"
#include "lib/lttng-ust/events.h"
-#include "wait.h"
#include "common/ringbuffer/shm.h"
#include "common/ringbuffer/frontend_types.h"
#include "common/ringbuffer/frontend.h"
int req_loglevel)
{
if (!has_loglevel)
- loglevel = TRACE_DEFAULT;
+ loglevel = LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT;
switch (req_type) {
case LTTNG_UST_ABI_LOGLEVEL_RANGE:
if (loglevel <= req_loglevel
- || (req_loglevel == -1 && loglevel <= TRACE_DEBUG))
+ || (req_loglevel == -1 && loglevel <= LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG))
return 1;
else
return 0;
case LTTNG_UST_ABI_LOGLEVEL_SINGLE:
if (loglevel == req_loglevel
- || (req_loglevel == -1 && loglevel <= TRACE_DEBUG))
+ || (req_loglevel == -1 && loglevel <= LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG))
return 1;
else
return 0;
case LTTNG_UST_ABI_LOGLEVEL_ALL:
default:
- if (loglevel <= TRACE_DEBUG)
+ if (loglevel <= LTTNG_UST_TRACEPOINT_LOGLEVEL_DEBUG)
return 1;
else
return 0;
static
void _lttng_channel_unmap(struct lttng_ust_channel_buffer *lttng_chan)
{
- struct lttng_ust_lib_ring_buffer_channel *chan;
+ struct lttng_ust_ring_buffer_channel *chan;
struct lttng_ust_shm_handle *handle;
cds_list_del(<tng_chan->priv->node);
{
int ret;
const struct lttng_ust_event_desc *desc;
- char name[LTTNG_UST_ABI_SYM_NAME_LEN];
assert(event->priv->registered == 0);
desc = event->priv->desc;
- lttng_ust_format_event_name(desc, name);
- ret = lttng_ust_tp_probe_register_queue_release(name,
- desc->probe_callback,
- event, desc->signature);
+ ret = lttng_ust_tp_probe_register_queue_release(desc->probe_desc->provider_name,
+ desc->event_name,
+ desc->tp_class->probe_callback,
+ event, desc->tp_class->signature);
WARN_ON_ONCE(ret);
if (!ret)
event->priv->registered = 1;
{
int ret;
const struct lttng_ust_event_desc *desc;
- char name[LTTNG_UST_ABI_SYM_NAME_LEN];
assert(event->priv->registered == 1);
desc = event->priv->desc;
- lttng_ust_format_event_name(desc, name);
- ret = lttng_ust_tp_probe_unregister_queue_release(name,
- desc->probe_callback,
+ ret = lttng_ust_tp_probe_unregister_queue_release(desc->probe_desc->provider_name,
+ desc->event_name,
+ desc->tp_class->probe_callback,
event);
WARN_ON_ONCE(ret);
if (!ret)
static
int lttng_create_all_event_enums(size_t nr_fields,
- const struct lttng_ust_event_field **event_fields,
+ const struct lttng_ust_event_field * const *event_fields,
struct lttng_ust_session *session)
{
size_t i;
goto socket_error;
}
- ret = lttng_create_all_event_enums(desc->nr_fields, desc->fields,
+ ret = lttng_create_all_event_enums(desc->tp_class->nr_fields, desc->tp_class->fields,
session);
if (ret < 0) {
DBG("Error (%d) adding enum to session", ret);
event_recorder->parent->priv->desc = desc;
if (desc->loglevel)
- loglevel = *(*event_recorder->parent->priv->desc->loglevel);
+ loglevel = *(*desc->loglevel);
else
- loglevel = TRACE_DEFAULT;
+ loglevel = LTTNG_UST_TRACEPOINT_LOGLEVEL_DEFAULT;
if (desc->model_emf_uri)
uri = *(desc->model_emf_uri);
else
chan->priv->parent.objd,
name,
loglevel,
- desc->signature,
- desc->nr_fields,
- desc->fields,
+ desc->tp_class->signature,
+ desc->tp_class->nr_fields,
+ desc->tp_class->fields,
uri,
&event_recorder->priv->id);
if (ret < 0) {
unsigned int i;
/* Destroy enums of the current event. */
- for (i = 0; i < event_recorder->parent->priv->desc->nr_fields; i++) {
+ for (i = 0; i < event_recorder->parent->priv->desc->tp_class->nr_fields; i++) {
const struct lttng_ust_enum_desc *enum_desc;
const struct lttng_ust_event_field *field;
struct lttng_enum *curr_enum;
- field = event_recorder->parent->priv->desc->fields[i];
+ field = event_recorder->parent->priv->desc->tp_class->fields[i];
switch (field->type->type) {
case lttng_ust_type_enum:
enum_desc = lttng_ust_get_type_enum(field->type)->desc;
* context (either app context callbacks, or dummy callbacks).
*/
void lttng_ust_context_set_session_provider(const char *name,
- size_t (*get_size)(void *priv, size_t offset),
- void (*record)(void *priv, struct lttng_ust_lib_ring_buffer_ctx *ctx,
+ size_t (*get_size)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
+ size_t offset),
+ void (*record)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
+ struct lttng_ust_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan),
- void (*get_value)(void *priv, struct lttng_ust_ctx_value *value),
+ void (*get_value)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
+ struct lttng_ust_ctx_value *value),
void *priv)
{
struct lttng_ust_session_private *session_priv;
* context (either app context callbacks, or dummy callbacks).
*/
void lttng_ust_context_set_event_notifier_group_provider(const char *name,
- size_t (*get_size)(void *priv, size_t offset),
- void (*record)(void *priv, struct lttng_ust_lib_ring_buffer_ctx *ctx,
+ size_t (*get_size)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
+ size_t offset),
+ void (*record)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
+ struct lttng_ust_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan),
- void (*get_value)(void *priv, struct lttng_ust_ctx_value *value),
+ void (*get_value)(void *priv, struct lttng_ust_probe_ctx *probe_ctx,
+ struct lttng_ust_ctx_value *value),
void *priv)
{
struct lttng_event_notifier_group *event_notifier_group;