X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=libustcmd%2Fustcmd.c;h=d22fb5236f4b01f707a554c313216f4e84cfeec2;hb=120b0ec33d0c9052f3b4db2199a2dd20ed5fd00e;hp=bbb6928c3bff3fda77e02b380d93305d75b9e9cb;hpb=08230db7e2e536bddf0015fa663b6d10abea30f1;p=ust.git diff --git a/libustcmd/ustcmd.c b/libustcmd/ustcmd.c index bbb6928..d22fb52 100644 --- a/libustcmd/ustcmd.c +++ b/libustcmd/ustcmd.c @@ -111,7 +111,7 @@ int ustcmd_destroy_trace(pid_t pid) { int result; - result = ustcmd_send_cmd("destroy", pid, NULL); + result = ustcmd_send_cmd("trace_destroy", pid, NULL); if (result) { return USTCMD_ERR_GEN; } @@ -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. * @@ -255,7 +273,7 @@ int ustcmd_get_cmsf(struct marker_status **cmsf, const pid_t pid) while (big_str[i] != '\0') { char state; - sscanf(big_str + i, "%a[^/]/%a[^ ] %c %a[^\n]", + sscanf(big_str + i, "marker: %a[^/]/%a[^ ] %c %a[^\n]", &tmp_cmsf[cmsf_ind].channel, &tmp_cmsf[cmsf_ind].marker, &state,