Commit | Line | Data |
---|---|---|
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 */ | |
23 | cycles_t time_sessiond_boot_start; | |
24 | cycles_t time_sessiond_boot_end; | |
25 | ||
26 | /* Session daemon thread manage kconsumerd time */ | |
27 | cycles_t time_sessiond_th_kcon_start; | |
28 | cycles_t time_sessiond_th_kcon_poll; | |
29 | ||
30 | /* Session daemon thread manage kernel time */ | |
31 | cycles_t time_sessiond_th_kern_start; | |
32 | cycles_t time_sessiond_th_kern_poll; | |
33 | ||
34 | /* Session daemon thread manage apps time */ | |
35 | cycles_t time_sessiond_th_apps_start; | |
36 | cycles_t time_sessiond_th_apps_poll; | |
37 | ||
62d53818 DG |
38 | /* Session daemon thread registration apps time */ |
39 | cycles_t time_sessiond_th_reg_start; | |
40 | cycles_t time_sessiond_th_reg_poll; | |
41 | ||
85c434ee DG |
42 | /* Session daemon thread registration apps time */ |
43 | cycles_t time_sessiond_th_dispatch_start; | |
44 | cycles_t time_sessiond_th_dispatch_block; | |
45 | ||
b25a8868 DG |
46 | /* Session daemon thread manage client time */ |
47 | cycles_t time_sessiond_th_cli_start; | |
48 | cycles_t time_sessiond_th_cli_poll; | |
49 | ||
3c6bae61 DG |
50 | /* Create tracing session values */ |
51 | cycles_t time_create_session_start; | |
52 | cycles_t time_create_session_end; | |
53 | ||
54 | /* Destroy tracing session values */ | |
55 | cycles_t time_destroy_session_start; | |
56 | cycles_t time_destroy_session_end; | |
57 | ||
62d53818 DG |
58 | /* |
59 | * UST registration time | |
60 | * | |
61 | * Start time is taken *after* the poll() has detected activity on the apps | |
62 | * socket and right *before* the accept(). There is a malloc() after that | |
63 | * accept and then we recv() the request from the client. We need to measure | |
64 | * the complete process. | |
65 | */ | |
66 | cycles_t time_ust_register_start; | |
67 | /* | |
68 | * The stop time is measured right after the futex() wake up. | |
69 | */ | |
70 | cycles_t time_ust_register_stop; | |
71 | ||
01e65450 DG |
72 | /* |
73 | * * UST unregister time | |
74 | * */ | |
75 | cycles_t time_ust_unregister_start; | |
76 | cycles_t time_ust_unregister_stop; | |
77 | ||
62d53818 DG |
78 | /* |
79 | * UST dispatch registration request time | |
80 | * | |
81 | * Start time taken *after* the dequeue which is a blocking call. | |
82 | */ | |
83 | cycles_t time_ust_dispatch_register_start; | |
84 | /* | |
85 | * Stop time taken *before* the futex() wait so at this point, the registration | |
86 | * was sent to the manage apps thread. | |
87 | */ | |
88 | cycles_t time_ust_dispatch_register_stop; | |
89 | ||
90 | /* | |
91 | * UST managing registration time | |
62d53818 | 92 | */ |
85c434ee DG |
93 | /* read() from pipe */ |
94 | cycles_t time_ust_register_read_start; | |
95 | cycles_t time_ust_register_read_stop; | |
96 | /* register_traceable_app() time */ | |
97 | cycles_t time_ust_register_add_start; | |
98 | cycles_t time_ust_register_add_stop; | |
99 | /* send register done command */ | |
100 | cycles_t time_ust_register_done_start; | |
101 | cycles_t time_ust_register_done_stop; | |
62d53818 DG |
102 | |
103 | /* | |
104 | * UST notification time (using the shm/futex scheme). Those times were break | |
105 | * down in seperate time for each big action step. | |
106 | * | |
107 | * Start time taken *before* we create/get the SHM mmap. | |
108 | */ | |
109 | cycles_t time_ust_notify_apps_start; | |
110 | /* | |
111 | * Stop time taken after waiting all processes (futex_wait_update()). | |
112 | */ | |
113 | cycles_t time_ust_notify_apps_stop; | |
114 | /* mmap() call */ | |
115 | cycles_t time_ust_notify_mmap_start; | |
116 | cycles_t time_ust_notify_mmap_stop; | |
117 | /* Permissions time (chmod/chown) */ | |
118 | cycles_t time_ust_notify_perms_start; | |
119 | cycles_t time_ust_notify_perms_stop; | |
120 | /* Fork process */ | |
121 | cycles_t time_ust_notify_fork_start; | |
122 | cycles_t time_ust_notify_fork_stop; | |
123 | /* shm_open call */ | |
124 | cycles_t time_ust_notify_shm_start; | |
125 | cycles_t time_ust_notify_shm_stop; | |
126 | ||
b25a8868 | 127 | #endif /* _MEASURES_H */ |