Add ustctl_snapshot_sample_positions ustctl command
[deliverable/lttng-ust.git] / liblttng-ust / ust-core.c
index 60751dc32a9aa56058e1452f3e9ddec4a395981b..5355f5c117ad62104c34ee1fd7cfe2d94f67f810 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#define _LGPL_SOURCE
 #include <stdlib.h>
 #include <lttng/ust-events.h>
 #include <usterr-signal-safe.h>
+#include "lttng-tracer-core.h"
 #include "jhash.h"
 
 static CDS_LIST_HEAD(lttng_transport_list);
@@ -80,3 +82,36 @@ struct lttng_enum *lttng_ust_enum_get(struct lttng_session *session,
        }
        return NULL;
 }
+
+size_t lttng_ust_dummy_get_size(struct lttng_ctx_field *field, size_t offset)
+{
+       size_t size = 0;
+
+       size += lib_ring_buffer_align(offset, lttng_alignof(char));
+       size += sizeof(char);           /* tag */
+       return size;
+}
+
+void lttng_ust_dummy_record(struct lttng_ctx_field *field,
+                struct lttng_ust_lib_ring_buffer_ctx *ctx,
+                struct lttng_channel *chan)
+{
+       char sel_char = (char) LTTNG_UST_DYNAMIC_TYPE_NONE;
+
+       lib_ring_buffer_align_ctx(ctx, lttng_alignof(sel_char));
+       chan->ops->event_write(ctx, &sel_char, sizeof(sel_char));
+}
+
+void lttng_ust_dummy_get_value(struct lttng_ctx_field *field,
+               struct lttng_ctx_value *value)
+{
+       value->sel = LTTNG_UST_DYNAMIC_TYPE_NONE;
+}
+
+int lttng_context_is_app(const char *name)
+{
+       if (strncmp(name, "$app.", strlen("$app.")) != 0) {
+               return 0;
+       }
+       return 1;
+}
This page took 0.030246 seconds and 5 git commands to generate.