Add benchmark points
[lttng-tools.git] / benchmark / measures.h
CommitLineData
b25a8868
DG
1/*
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; only version 2
7 * of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#ifndef _MEASURES_H
20#define _MEASURES_H
21
22/* Session daemon main() time */
23cycles_t time_sessiond_boot_start;
24cycles_t time_sessiond_boot_end;
25
26/* Session daemon thread manage kconsumerd time */
27cycles_t time_sessiond_th_kcon_start;
28cycles_t time_sessiond_th_kcon_poll;
29
30/* Session daemon thread manage kernel time */
31cycles_t time_sessiond_th_kern_start;
32cycles_t time_sessiond_th_kern_poll;
33
34/* Session daemon thread manage apps time */
35cycles_t time_sessiond_th_apps_start;
36cycles_t time_sessiond_th_apps_poll;
37
62d53818
DG
38/* Session daemon thread registration apps time */
39cycles_t time_sessiond_th_reg_start;
40cycles_t time_sessiond_th_reg_poll;
41
85c434ee
DG
42/* Session daemon thread registration apps time */
43cycles_t time_sessiond_th_dispatch_start;
44cycles_t time_sessiond_th_dispatch_block;
45
b25a8868
DG
46/* Session daemon thread manage client time */
47cycles_t time_sessiond_th_cli_start;
48cycles_t time_sessiond_th_cli_poll;
49
3c6bae61
DG
50/* Create tracing session values */
51cycles_t time_create_session_start;
52cycles_t time_create_session_end;
53
54/* Destroy tracing session values */
55cycles_t time_destroy_session_start;
56cycles_t time_destroy_session_end;
57
902c9922
DG
58/* Enable an UST channel values */
59cycles_t time_enable_ust_channel_start;
60cycles_t time_enable_ust_channel_end;
61
62/* Enable an UST event values */
63cycles_t time_enable_ust_event_start;
64cycles_t time_enable_ust_event_end;
65
66/* Start UST tracing */
67cycles_t time_start_ust_start;
68cycles_t time_start_ust_end;
69
62d53818
DG
70/*
71 * UST registration time
72 *
73 * Start time is taken *after* the poll() has detected activity on the apps
74 * socket and right *before* the accept(). There is a malloc() after that
75 * accept and then we recv() the request from the client. We need to measure
76 * the complete process.
77 */
78cycles_t time_ust_register_start;
79/*
80 * The stop time is measured right after the futex() wake up.
81 */
82cycles_t time_ust_register_stop;
83
01e65450
DG
84/*
85 * * UST unregister time
86 * */
87cycles_t time_ust_unregister_start;
88cycles_t time_ust_unregister_stop;
89
62d53818
DG
90/*
91 * UST dispatch registration request time
92 *
93 * Start time taken *after* the dequeue which is a blocking call.
94 */
95cycles_t time_ust_dispatch_register_start;
96/*
97 * Stop time taken *before* the futex() wait so at this point, the registration
98 * was sent to the manage apps thread.
99 */
100cycles_t time_ust_dispatch_register_stop;
101
102/*
103 * UST managing registration time
62d53818 104 */
85c434ee
DG
105/* read() from pipe */
106cycles_t time_ust_register_read_start;
107cycles_t time_ust_register_read_stop;
108/* register_traceable_app() time */
109cycles_t time_ust_register_add_start;
110cycles_t time_ust_register_add_stop;
111/* send register done command */
112cycles_t time_ust_register_done_start;
113cycles_t time_ust_register_done_stop;
62d53818
DG
114
115/*
116 * UST notification time (using the shm/futex scheme). Those times were break
117 * down in seperate time for each big action step.
118 *
119 * Start time taken *before* we create/get the SHM mmap.
120 */
121cycles_t time_ust_notify_apps_start;
122/*
123 * Stop time taken after waiting all processes (futex_wait_update()).
124 */
125cycles_t time_ust_notify_apps_stop;
126/* mmap() call */
127cycles_t time_ust_notify_mmap_start;
128cycles_t time_ust_notify_mmap_stop;
129/* Permissions time (chmod/chown) */
130cycles_t time_ust_notify_perms_start;
131cycles_t time_ust_notify_perms_stop;
132/* Fork process */
133cycles_t time_ust_notify_fork_start;
134cycles_t time_ust_notify_fork_stop;
135/* shm_open call */
136cycles_t time_ust_notify_shm_start;
137cycles_t time_ust_notify_shm_stop;
138
b25a8868 139#endif /* _MEASURES_H */
This page took 0.029101 seconds and 4 git commands to generate.