Update hardcoded loglevel
[lttng-ust.git] / liblttng-ust / lttng-ust-abi.c
index baea888586536c6555dbad8422db5d86b4a08cba..deb3311b882ca7dd682c4df32eb6fb3b06d754e5 100644 (file)
 #include <urcu/list.h>
 #include <lttng/ust-events.h>
 #include <lttng/ust-version.h>
+#include <lttng/tracepoint.h>
+#include "tracepoint-internal.h"
 #include <usterr-signal-safe.h>
 #include <helper.h>
 #include "ltt-tracer.h"
-#include "tracepoint-internal.h"
 
 static int lttng_ust_abi_close_in_progress;
 
@@ -203,7 +204,6 @@ static const struct lttng_ust_objd_ops lttng_session_ops;
 static const struct lttng_ust_objd_ops lttng_channel_ops;
 static const struct lttng_ust_objd_ops lttng_metadata_ops;
 static const struct lttng_ust_objd_ops lttng_event_ops;
-static const struct lttng_ust_objd_ops lttng_loglevel_ops;
 static const struct lttng_ust_objd_ops lttng_wildcard_ops;
 static const struct lttng_ust_objd_ops lib_ring_buffer_objd_ops;
 static const struct lttng_ust_objd_ops lttng_tracepoint_list_ops;
@@ -331,6 +331,8 @@ void lttng_metadata_create_events(int channel_objd)
        static struct lttng_ust_event metadata_params = {
                .instrumentation = LTTNG_UST_TRACEPOINT,
                .name = "lttng_ust:metadata",
+               .loglevel_type = LTTNG_UST_LOGLEVEL_ALL,
+               .loglevel = TRACE_DEFAULT,
        };
        struct ltt_event *event;
        int ret;
@@ -968,62 +970,6 @@ static const struct lttng_ust_objd_ops lttng_event_ops = {
        .cmd = lttng_event_cmd,
 };
 
-/**
- *     lttng_loglevel_cmd - lttng control through object descriptors
- *
- *     @objd: the object descriptor
- *     @cmd: the command
- *     @arg: command arg
- *     @uargs: UST arguments (internal)
- *
- *     This object descriptor implements lttng commands:
- *     LTTNG_UST_CONTEXT
- *             Prepend a context field to each record of events of this
- *             loglevel.
- *     LTTNG_UST_ENABLE
- *             Enable recording for these loglevel events (weak enable)
- *     LTTNG_UST_DISABLE
- *             Disable recording for these loglevel events (strong disable)
- */
-static
-long lttng_loglevel_cmd(int objd, unsigned int cmd, unsigned long arg,
-       union ust_args *uargs)
-{
-       struct session_loglevel *loglevel = objd_private(objd);
-
-       switch (cmd) {
-       case LTTNG_UST_CONTEXT:
-               return -ENOSYS; /* not implemented yet */
-#if 0
-               return lttng_abi_add_context(objd,
-                               (struct lttng_ust_context *) arg,
-                               &loglevel->ctx, loglevel->chan->session);
-#endif
-       case LTTNG_UST_ENABLE:
-               return ltt_loglevel_enable(loglevel);
-       case LTTNG_UST_DISABLE:
-               return ltt_loglevel_disable(loglevel);
-       default:
-               return -EINVAL;
-       }
-}
-
-static
-int lttng_loglevel_release(int objd)
-{
-       struct session_loglevel *loglevel = objd_private(objd);
-
-       if (loglevel)
-               return lttng_ust_objd_unref(loglevel->chan->objd);
-       return 0;
-}
-
-/* TODO: filter control ioctl */
-static const struct lttng_ust_objd_ops lttng_loglevel_ops = {
-       .release = lttng_loglevel_release,
-       .cmd = lttng_loglevel_cmd,
-};
-
 /**
  *     lttng_wildcard_cmd - lttng control through object descriptors
  *
This page took 0.023675 seconds and 4 git commands to generate.