X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-abi.c;h=a57e5e9f2acb699c899bba2fc2e1ccc5797be053;hb=7b3034704e39d3796b6cbcf540f8f6c53ab83afa;hp=40f96eb5d76dc6992dd6e6a311742593ed3b87c1;hpb=2470a237d7eda2c66432572cf534ac955b9e2957;p=lttng-modules.git diff --git a/lttng-abi.c b/lttng-abi.c index 40f96eb5..a57e5e9f 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -51,10 +51,12 @@ #include #include #include +#include #include #include #include #include +#include #include /* @@ -683,6 +685,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 +707,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 +762,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 +784,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 +1048,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, @@ -1744,6 +1728,12 @@ int __init lttng_abi_init(void) wrapper_vmalloc_sync_all(); lttng_clock_ref(); + + ret = lttng_tp_mempool_init(); + if (ret) { + goto error; + } + lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL, <tng_fops, NULL); @@ -1756,6 +1746,7 @@ int __init lttng_abi_init(void) return 0; error: + lttng_tp_mempool_destroy(); lttng_clock_unref(); return ret; } @@ -1763,6 +1754,7 @@ error: /* No __exit annotation because used by init error path too. */ void lttng_abi_exit(void) { + lttng_tp_mempool_destroy(); lttng_clock_unref(); if (lttng_proc_dentry) remove_proc_entry("lttng", NULL);