X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=a4fea821a07d35cb45670879cbab3ad2d00da711;hb=7e0de2192e89732f6dea0b72992096a028ca02d1;hp=63bf4648b5b6f1ade155fdaaa92917515d6814cd;hpb=b0a1c7415575acbf66a625c338ea9cf6fa9df27c;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 63bf4648b..a4fea821a 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.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 @@ -45,6 +35,10 @@ #include "notification-thread-commands.h" #include "rotate.h" +struct lttng_ht *ust_app_ht; +struct lttng_ht *ust_app_ht_by_sock; +struct lttng_ht *ust_app_ht_by_notify_sock; + static int ust_app_flush_app_session(struct ust_app *app, struct ust_app_session *ua_sess); @@ -1025,7 +1019,7 @@ error_free: * Alloc new UST app channel. */ static -struct ust_app_channel *alloc_ust_app_channel(char *name, +struct ust_app_channel *alloc_ust_app_channel(const char *name, struct ust_app_session *ua_sess, struct lttng_ust_channel_attr *attr) { @@ -5002,7 +4996,7 @@ end: /* * The caller must ensure that the application is compatible and is tracked - * by the PID tracker. + * by the process attribute trackers. */ static void ust_app_synchronize(struct ltt_ust_session *usess, @@ -5122,11 +5116,14 @@ void ust_app_global_update(struct ltt_ust_session *usess, struct ust_app *app) if (!app->compatible) { return; } - if (trace_ust_id_tracker_lookup(LTTNG_TRACKER_VPID, usess, app->pid) && + if (trace_ust_id_tracker_lookup(LTTNG_PROCESS_ATTR_VIRTUAL_PROCESS_ID, + usess, app->pid) && trace_ust_id_tracker_lookup( - LTTNG_TRACKER_VUID, usess, app->uid) && + LTTNG_PROCESS_ATTR_VIRTUAL_USER_ID, + usess, app->uid) && trace_ust_id_tracker_lookup( - LTTNG_TRACKER_VGID, usess, app->gid)) { + LTTNG_PROCESS_ATTR_VIRTUAL_GROUP_ID, + usess, app->gid)) { /* * Synchronize the application's internal tracing configuration * and start tracing.