X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libustcmd%2Fustcmd.c;h=d22fb5236f4b01f707a554c313216f4e84cfeec2;hb=62ec620f40891af46d0ee4768992275dc7b28433;hp=d573a7fe2ef84ae845c698053322808252d2778d;hpb=23e47a47f1cb9848f6a5e93ae34f60d30479339c;p=ust.git diff --git a/libustcmd/ustcmd.c b/libustcmd/ustcmd.c index d573a7f..d22fb52 100644 --- a/libustcmd/ustcmd.c +++ b/libustcmd/ustcmd.c @@ -137,6 +137,24 @@ int ustcmd_setup_and_start(pid_t pid) return 0; } +/** + * Creates an UST trace according to a PID. + * + * @param pid Traced process ID + * @return 0 if successful, or error USTCMD_ERR_GEN + */ +int ustcmd_create_trace(pid_t pid) +{ + int result; + + result = ustcmd_send_cmd("trace_create", pid, NULL); + if (result) { + return USTCMD_ERR_GEN; + } + + return 0; +} + /** * Starts an UST trace according to a PID. *