From 9e52b0d84210aaed7b6bb70709a6dafbffbe922c Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 18 Dec 2013 09:48:23 -0500 Subject: [PATCH] Python: add create_snapshot Also fix documentation of create/destroy. Signed-off-by: Mathieu Desnoyers Signed-off-by: David Goulet --- extras/bindings/swig/python/lttng.i.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extras/bindings/swig/python/lttng.i.in b/extras/bindings/swig/python/lttng.i.in index c947ce3dd..145b0f8e1 100644 --- a/extras/bindings/swig/python/lttng.i.in +++ b/extras/bindings/swig/python/lttng.i.in @@ -314,6 +314,7 @@ enum lttng_calibrate_type { // ============================================= %rename("create") lttng_create_session(const char *name, const char *path); +%rename("create_snapshot") lttng_create_session_snapshot(const char *name, const char *snapshot_url); %rename("destroy") lttng_destroy_session(const char *name); %rename("_lttng_create_handle") lttng_create_handle(const char *session_name, struct lttng_domain *domain); %rename("_lttng_destroy_handle") lttng_destroy_handle(struct lttng_handle *handle); @@ -361,14 +362,20 @@ int lttng_list_domains(const char *session_name, struct lttng_domain **domains); %feature("docstring")"create(str name, str path) -> int Create a new tracing session using name and path. -Returns size of returned session payload data or a negative error code." +Returns 0 on success or a negative error code." int lttng_create_session(const char *name, const char *path); +%feature("docstring")"create_snapshot(str name, str snapshot_url) -> int + +Create a new tracing session using name and snapshot_url in snapshot +mode (flight recorder). +Returns 0 on success or a negative error code." +int lttng_create_session_snapshot(const char *name, const char *path); %feature("docstring")"destroy(str name) -> int Tear down tracing session using name. -Returns size of returned session payload data or a negative error code." +Returns 0 on success or a negative error code." int lttng_destroy_session(const char *name); -- 2.34.1