projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Markers: trace_mark should not pass "ust" to ust_mark
[lttng-ust.git]
/
ustctl
/
ustctl.c
diff --git
a/ustctl/ustctl.c
b/ustctl/ustctl.c
index d642178a0a5c0019aa05e86c9fb2ace38ec4403a..18f7d307caa64477a7105814a65cf1a8d211ed96 100644
(file)
--- a/
ustctl/ustctl.c
+++ b/
ustctl/ustctl.c
@@
-121,7
+121,7
@@
int main(int argc, char *argv[])
case DESTROY_TRACE:
case ENABLE_MARKER:
case DISABLE_MARKER:
case DESTROY_TRACE:
case ENABLE_MARKER:
case DISABLE_MARKER:
- args = (char **)malloc(sizeof(char *
*) * argc + 3
);
+ args = (char **)malloc(sizeof(char *
) * (argc + 3)
);
optind--;
args[optind] = strdup(&argv[optind][2]);
for (i = optind + 1; i < argc; i++) {
optind--;
args[optind] = strdup(&argv[optind][2]);
for (i = optind + 1; i < argc; i++) {
@@
-213,6
+213,25
@@
static int get_sock_path(int argc, char *argv[])
return 0;
}
return 0;
}
+static int list_pids(int argc, char *argv[])
+{
+ pid_t *pid_list;
+ int i;
+
+ pid_list = ustctl_get_online_pids();
+ if (!pid_list) {
+ return -1;
+ }
+
+ for (i = 0; pid_list[i]; i++) {
+ printf("%ld\n", (long)pid_list[i]);
+ }
+
+ free(pid_list);
+
+ return 0;
+}
+
struct cli_cmd __cli_cmds general_cmds[] = {
{
.name = "list-trace-events",
struct cli_cmd __cli_cmds general_cmds[] = {
{
.name = "list-trace-events",
@@
-241,4
+260,13
@@
struct cli_cmd __cli_cmds general_cmds[] = {
.desired_args = 1,
.desired_args_op = CLI_EQ,
},
.desired_args = 1,
.desired_args_op = CLI_EQ,
},
+ {
+ .name = "list-pids",
+ .description = "List traceable pids",
+ .help_text = "list-pids\n"
+ "List the traceable pids for the current user\n",
+ .function = list_pids,
+ .desired_args = 0,
+ .desired_args_op = CLI_EQ,
+ },
};
};
This page took
0.026019 seconds
and
4
git commands to generate.