X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fadd_context.c;h=4122025728255114662c74f3d431165a01e4a41c;hb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;hp=0adaa75385b55f3472b783a75c520e8d04c228b8;hpb=59deec0c09b544d548711deaa6d8206efe99ea0d;p=lttng-tools.git diff --git a/src/bin/lttng/commands/add_context.c b/src/bin/lttng/commands/add_context.c index 0adaa7538..412202572 100644 --- a/src/bin/lttng/commands/add_context.c +++ b/src/bin/lttng/commands/add_context.c @@ -1,19 +1,9 @@ /* - * Copyright (C) 2011 - David Goulet - * Copyright (C) 2016 - Jérémie Galarneau + * Copyright (C) 2011 David Goulet + * Copyright (C) 2016 Jérémie Galarneau * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #define _LGPL_SOURCE @@ -84,6 +74,27 @@ enum context_type { CONTEXT_PREEMPTIBLE = 17, CONTEXT_NEED_RESCHEDULE = 18, CONTEXT_MIGRATABLE = 19, + CONTEXT_CALLSTACK_KERNEL = 20, + CONTEXT_CALLSTACK_USER = 21, + CONTEXT_CGROUP_NS = 22, + CONTEXT_IPC_NS = 23, + CONTEXT_MNT_NS = 24, + CONTEXT_NET_NS = 25, + CONTEXT_PID_NS = 26, + CONTEXT_USER_NS = 27, + CONTEXT_UTS_NS = 28, + CONTEXT_UID = 29, + CONTEXT_EUID = 30, + CONTEXT_SUID = 31, + CONTEXT_GID = 32, + CONTEXT_EGID = 33, + CONTEXT_SGID = 34, + CONTEXT_VUID = 35, + CONTEXT_VEUID = 36, + CONTEXT_VSUID = 37, + CONTEXT_VGID = 38, + CONTEXT_VEGID = 39, + CONTEXT_VSGID = 40, }; /* @@ -240,6 +251,29 @@ const struct ctx_opts { { "preemptible", CONTEXT_PREEMPTIBLE }, { "need_reschedule", CONTEXT_NEED_RESCHEDULE }, { "migratable", CONTEXT_MIGRATABLE }, + { "callstack-kernel", CONTEXT_CALLSTACK_KERNEL }, +#if HAVE_MODULES_USERSPACE_CALLSTACK_CONTEXT + { "callstack-user", CONTEXT_CALLSTACK_USER }, +#endif + { "cgroup_ns", CONTEXT_CGROUP_NS }, + { "ipc_ns", CONTEXT_IPC_NS }, + { "mnt_ns", CONTEXT_MNT_NS }, + { "net_ns", CONTEXT_NET_NS }, + { "pid_ns", CONTEXT_PID_NS }, + { "user_ns", CONTEXT_USER_NS }, + { "uts_ns", CONTEXT_UTS_NS }, + { "uid", CONTEXT_UID }, + { "euid", CONTEXT_EUID }, + { "suid", CONTEXT_SUID }, + { "gid", CONTEXT_GID }, + { "egid", CONTEXT_EGID }, + { "sgid", CONTEXT_SGID }, + { "vuid", CONTEXT_VUID }, + { "veuid", CONTEXT_VEUID }, + { "vsuid", CONTEXT_VSUID }, + { "vgid", CONTEXT_VGID }, + { "vegid", CONTEXT_VEGID }, + { "vsgid", CONTEXT_VSGID }, /* Perf options */ @@ -535,7 +569,7 @@ int mi_open(void) ret = fileno(stdout); if (ret < 0) { - PERROR("Unable to retrive fileno of stdout"); + PERROR("Unable to retrieve fileno of stdout"); ret = CMD_ERROR; goto end; }