Add sock flush buffer ctl API
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 8 Dec 2011 21:37:03 +0000 (16:37 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 8 Dec 2011 21:37:03 +0000 (16:37 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-ctl.h
liblttng-ust-ctl/ustctl.c

index 1ff34b9a61afeaf8f16a623019d976b2f12328f4..0f8aa835151ea710fedb133ee1d406ab3b257e48 100644 (file)
@@ -59,6 +59,8 @@ int ustctl_tracepoint_list_get(int sock, int tp_list_handle,
 int ustctl_tracer_version(int sock, struct lttng_ust_tracer_version *v);
 int ustctl_wait_quiescent(int sock);
 
+int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object);
+
 /* not implemented yet */
 struct lttng_ust_calibrate;
 int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate);
index b612d2ce6e5819c4160bd4022cd20c366c082e4d..13100aebdcda0ba4f3b7aacc4242846e9e9c0937 100644 (file)
@@ -466,6 +466,22 @@ int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate)
        return -ENOSYS;
 }
 
+int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object)
+{
+       struct ustcomm_ust_msg lum;
+       struct ustcomm_ust_reply lur;
+       int ret;
+
+       memset(&lum, 0, sizeof(lum));
+       lum.handle = object->handle;
+       lum.cmd = LTTNG_UST_FLUSH_BUFFER;
+       ret = ustcomm_send_app_cmd(sock, &lum, &lur);
+       if (ret)
+               return ret;
+       DBG("flushed buffer handle %u", object->handle);
+       return 0;
+}
+
 /* Buffer operations */
 
 /* Map channel shm into process memory */
This page took 0.027268 seconds and 4 git commands to generate.