2 * Copyright (C) 2012 - Christian Babeux <christian.babeux@efficios.com>
3 * Copyright (C) 2014 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License, version 2 only, as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 51
16 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 * Check if the specified environment variable is set.
29 * Return 1 if set, otherwise 0.
32 int check_env_var(const char *env
)
35 char *env_val
= getenv(env
);
36 if (env_val
&& (strncmp(env_val
, "1", 1) == 0)) {
47 unsigned int sleep_time
= STALL_TIME
;
49 while (sleep_time
> 0) {
50 sleep_time
= sleep(sleep_time
);
56 int __testpoint_sessiond_thread_manage_clients(void)
58 const char *var
= "LTTNG_SESSIOND_THREAD_MANAGE_CLIENTS_STALL";
60 if (check_env_var(var
)) {
67 int __testpoint_sessiond_thread_registration_apps(void)
69 const char *var
= "LTTNG_SESSIOND_THREAD_REG_APPS_STALL";
71 if (check_env_var(var
)) {
78 int __testpoint_sessiond_thread_manage_apps(void)
80 const char *var
= "LTTNG_SESSIOND_THREAD_MANAGE_APPS_STALL";
82 if (check_env_var(var
)) {
89 int __testpoint_sessiond_thread_manage_kernel(void)
91 const char *var
= "LTTNG_SESSIOND_THREAD_MANAGE_KERNEL_STALL";
93 if (check_env_var(var
)) {
100 int __testpoint_sessiond_thread_manage_consumer(void)
102 const char *var
= "LTTNG_SESSIOND_THREAD_MANAGE_CONSUMER_STALL";
104 if (check_env_var(var
)) {
111 int __testpoint_sessiond_thread_ht_cleanup(void)
113 const char *var
= "LTTNG_SESSIOND_THREAD_HT_CLEANUP_STALL";
115 if (check_env_var(var
)) {
122 int __testpoint_sessiond_thread_app_manage_notify(void)
124 const char *var
= "LTTNG_SESSIOND_THREAD_APP_MANAGE_NOTIFY_STALL";
126 if (check_env_var(var
)) {
133 int __testpoint_sessiond_thread_app_reg_dispatch(void)
135 const char *var
= "LTTNG_SESSIOND_THREAD_APP_REG_DISPATCH_STALL";
137 if (check_env_var(var
)) {
144 /* Consumer daemon */
146 int __testpoint_consumerd_thread_channel(void)
148 const char *var
= "LTTNG_CONSUMERD_THREAD_CHANNEL_STALL";
150 if (check_env_var(var
)) {
157 int __testpoint_consumerd_thread_metadata(void)
159 const char *var
= "LTTNG_CONSUMERD_THREAD_METADATA_STALL";
161 if (check_env_var(var
)) {
168 int __testpoint_consumerd_thread_data(void)
170 const char *var
= "LTTNG_CONSUMERD_THREAD_DATA_STALL";
172 if (check_env_var(var
)) {
179 int __testpoint_consumerd_thread_sessiond(void)
181 const char *var
= "LTTNG_CONSUMERD_THREAD_SESSIOND_STALL";
183 if (check_env_var(var
)) {
190 int __testpoint_consumerd_thread_metadata_timer(void)
192 const char *var
= "LTTNG_CONSUMERD_THREAD_METADATA_TIMER_STALL";
194 if (check_env_var(var
)) {
203 int __testpoint_relayd_thread_dispatcher(void)
205 const char *var
= "LTTNG_RELAYD_THREAD_DISPATCHER_STALL";
207 if (check_env_var(var
)) {
214 int __testpoint_relayd_thread_worker(void)
216 const char *var
= "LTTNG_RELAYD_THREAD_WORKER_STALL";
218 if (check_env_var(var
)) {
225 int __testpoint_relayd_thread_listener(void)
227 const char *var
= "LTTNG_RELAYD_THREAD_LISTENER_STALL";
229 if (check_env_var(var
)) {
236 int __testpoint_relayd_thread_live_dispatcher(void)
238 const char *var
= "LTTNG_RELAYD_THREAD_LIVE_DISPATCHER_STALL";
240 if (check_env_var(var
)) {
247 int __testpoint_relayd_thread_live_worker(void)
249 const char *var
= "LTTNG_RELAYD_THREAD_LIVE_WORKER_STALL";
251 if (check_env_var(var
)) {
258 int __testpoint_relayd_thread_live_listener(void)
260 const char *var
= "LTTNG_RELAYD_THREAD_LIVE_LISTENER_STALL";
262 if (check_env_var(var
)) {
This page took 0.034874 seconds and 4 git commands to generate.