X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lttng-abi.c;h=e193f4377734d1a47a8d881125de8d93befe0cc3;hb=5eade9b9f6fe8e4591f88842575a9837e074109a;hp=c14cc82b2baca8aa6e2012a6f46d8079fa58f2ec;hpb=0d2c717fd11a41a578a4370516605066f4371b89;p=lttng-modules.git diff --git a/lttng-abi.c b/lttng-abi.c index c14cc82b..e193f437 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -569,6 +569,8 @@ long lttng_session_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return lttng_session_list_tracker_pids(session); case LTTNG_KERNEL_SESSION_METADATA_REGEN: return lttng_session_metadata_regenerate(session); + case LTTNG_KERNEL_SESSION_STATEDUMP: + return lttng_session_statedump(session); default: return -ENOIOCTLCMD; } @@ -702,6 +704,18 @@ 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; } @@ -757,6 +771,39 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp, */ return -ENOSYS; } + case RING_BUFFER_FLUSH: + { + struct lttng_metadata_stream *stream = filp->private_data; + struct lib_ring_buffer *buf = stream->priv; + struct channel *chan = buf->backend.chan; + + /* + * Before doing the actual ring buffer flush, write up to one + * packet of metadata in the ring buffer. + */ + ret = lttng_metadata_output_channel(stream, chan); + if (ret < 0) + goto err; + break; + } + case RING_BUFFER_GET_METADATA_VERSION: + { + struct lttng_metadata_stream *stream = filp->private_data; + + 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; } @@ -774,12 +821,6 @@ long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp, cmd, arg); break; } - case RING_BUFFER_GET_METADATA_VERSION: - { - struct lttng_metadata_stream *stream = filp->private_data; - - return put_u64(stream->version, arg); - } default: break; }