Cleanup: namespace string encoding
[lttng-modules.git] / src / probes / lttng-uprobes.c
index 368828e350f79cddbb87dde44980457a792cdeff..816b7fc1be209c952c11eedddf5df5fcc83e1338 100644 (file)
@@ -9,7 +9,7 @@
  *
  */
 
-#include <linux/fdtable.h>
+#include <wrapper/fdtable.h>
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/namei.h>
@@ -69,11 +69,13 @@ int lttng_uprobes_event_notifier_handler_pre(struct uprobe_consumer *uc, struct
        struct lttng_uprobe_handler *uprobe_handler =
                container_of(uc, struct lttng_uprobe_handler, up_consumer);
        struct lttng_event_notifier *event_notifier = uprobe_handler->u.event_notifier;
+       struct lttng_kernel_notifier_ctx notif_ctx;
 
        if (unlikely(!READ_ONCE(event_notifier->enabled)))
                return 0;
 
-       event_notifier->send_notification(event_notifier);
+       notif_ctx.eval_capture = LTTNG_READ_ONCE(event_notifier->eval_capture);
+       event_notifier->send_notification(event_notifier, NULL, NULL, &notif_ctx);
        return 0;
 }
 
@@ -105,13 +107,13 @@ int lttng_create_uprobe_event(const char *name, struct lttng_event *event)
                goto error_fields;
        }
        fields[0].name = "ip";
-       fields[0].type.atype = atype_integer;
+       fields[0].type.type = lttng_kernel_type_integer;
        fields[0].type.u.integer.size = sizeof(unsigned long) * CHAR_BIT;
        fields[0].type.u.integer.alignment = lttng_alignof(unsigned long) * CHAR_BIT;
        fields[0].type.u.integer.signedness = lttng_is_signed_type(unsigned long);
        fields[0].type.u.integer.reverse_byte_order = 0;
        fields[0].type.u.integer.base = 16;
-       fields[0].type.u.integer.encoding = lttng_encode_none;
+       fields[0].type.u.integer.encoding = lttng_kernel_string_encoding_none;
 
        desc->owner = THIS_MODULE;
        event->desc = desc;
@@ -170,7 +172,7 @@ static struct inode *get_inode_from_fd(int fd)
         * Returns the file backing the given fd. Needs to be done inside an RCU
         * critical section.
         */
-       file = fcheck(fd);
+       file = lttng_lookup_fd_rcu(fd);
        if (file == NULL) {
                printk(KERN_WARNING "LTTng: Cannot access file backing the fd(%d)\n", fd);
                inode = NULL;
@@ -208,7 +210,7 @@ int lttng_uprobes_add_callsite(struct lttng_uprobe *uprobe,
                goto end;
        }
 
-       /* Ensure the memory we just allocated don't event_notifier page faults. */
+       /* Ensure the memory we just allocated don't notify page faults. */
        wrapper_vmalloc_sync_mappings();
 
        uprobe_handler->u.event = priv_data;
This page took 0.031459 seconds and 4 git commands to generate.