Add ustctl command to regenerate the statedump
authorJulien Desfossez <jdesfossez@efficios.com>
Thu, 30 Jun 2016 15:43:50 +0000 (11:43 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 30 Jun 2016 18:02:38 +0000 (14:02 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-ctl.h
liblttng-ust-ctl/ustctl.c

index 06de95c25ee12160b8fefcd545ac5eff961341cb..08122a79da002d43fe778812bf9f5b639801a2ad 100644 (file)
@@ -260,6 +260,9 @@ int ustctl_get_instance_id(struct ustctl_consumer_stream *stream,
 /* returns whether UST has perf counters support. */
 int ustctl_has_perf_counters(void);
 
+/* Regenerate the statedump. */
+int ustctl_regenerate_statedump(int sock, int handle);
+
 /* event registry management */
 
 enum ustctl_socket_type {
index 97445d5ecb90252e0cfaf43df2a018eeb789a34c..7b46eda2675caaa00b4b84124c188bd2748650f2 100644 (file)
@@ -2183,6 +2183,23 @@ int ustctl_reply_register_channel(int sock,
        return 0;
 }
 
+/* Regenerate the statedump. */
+int ustctl_regenerate_statedump(int sock, int handle)
+{
+       struct ustcomm_ust_msg lum;
+       struct ustcomm_ust_reply lur;
+       int ret;
+
+       memset(&lum, 0, sizeof(lum));
+       lum.handle = handle;
+       lum.cmd = LTTNG_UST_SESSION_STATEDUMP;
+       ret = ustcomm_send_app_cmd(sock, &lum, &lur);
+       if (ret)
+               return ret;
+       DBG("Regenerated statedump for handle %u", handle);
+       return 0;
+}
+
 static __attribute__((constructor))
 void ustctl_init(void)
 {
This page took 0.027411 seconds and 4 git commands to generate.