Fix: update writeback instrumentation for kernel 4.14
[lttng-modules.git] / lttng-abi.c
index 40f96eb5d76dc6992dd6e6a311742593ed3b87c1..77e5e9859e7f51099964f4002b932faf98531984 100644 (file)
@@ -51,6 +51,7 @@
 #include <wrapper/poll.h>
 #include <wrapper/file.h>
 #include <wrapper/kref.h>
+#include <lttng-string-utils.h>
 #include <lttng-abi.h>
 #include <lttng-abi-old.h>
 #include <lttng-events.h>
@@ -683,6 +684,7 @@ long lttng_metadata_ring_buffer_ioctl(struct file *filp,
                 */
                return -ENOSYS;
        }
+       case RING_BUFFER_FLUSH_EMPTY:   /* Fall-through. */
        case RING_BUFFER_FLUSH:
        {
                struct lttng_metadata_stream *stream = filp->private_data;
@@ -704,18 +706,6 @@ long lttng_metadata_ring_buffer_ioctl(struct file *filp,
 
                return put_u64(stream->version, arg);
        }
-       case RING_BUFFER_SNAPSHOT:
-       {
-               /*
-                * Force the buffer to quiescent so the ring buffer
-                * don't attempt to perform a SWITCH_FLUSH, which would
-                * desynchronize the client accounting of the amount of
-                * data available in the buffer from the ring buffer
-                * view.
-                */
-               buf->quiescent = true;
-               break;
-       }
        default:
                break;
        }
@@ -771,6 +761,7 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp,
                 */
                return -ENOSYS;
        }
+       case RING_BUFFER_FLUSH_EMPTY:   /* Fall-through. */
        case RING_BUFFER_FLUSH:
        {
                struct lttng_metadata_stream *stream = filp->private_data;
@@ -792,18 +783,6 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp,
 
                return put_u64(stream->version, arg);
        }
-       case RING_BUFFER_SNAPSHOT:
-       {
-               /*
-                * Force the buffer to quiescent so the ring buffer
-                * don't attempt to perform a SWITCH_FLUSH, which would
-                * desynchronize the client accounting of the amount of
-                * data available in the buffer from the ring buffer
-                * view.
-                */
-               buf->quiescent = true;
-               break;
-       }
        default:
                break;
        }
@@ -1068,8 +1047,12 @@ int lttng_abi_create_event(struct file *channel_file,
                        || event_param->instrumentation == LTTNG_KERNEL_SYSCALL) {
                struct lttng_enabler *enabler;
 
-               if (event_param->name[strlen(event_param->name) - 1] == '*') {
-                       enabler = lttng_enabler_create(LTTNG_ENABLER_WILDCARD,
+               if (strutils_is_star_glob_pattern(event_param->name)) {
+                       /*
+                        * If the event name is a star globbing pattern,
+                        * we create the special star globbing enabler.
+                        */
+                       enabler = lttng_enabler_create(LTTNG_ENABLER_STAR_GLOB,
                                event_param, channel);
                } else {
                        enabler = lttng_enabler_create(LTTNG_ENABLER_NAME,
This page took 0.023284 seconds and 4 git commands to generate.