Merge lp:~ted/ubuntu-app-launch/lttng into lp:ubuntu-app-launch/14.04
- lttng
- Merge into trunk.14.04
Status: | Merged |
---|---|
Approved by: | Charles Kerr |
Approved revision: | 97 |
Merged at revision: | 90 |
Proposed branch: | lp:~ted/ubuntu-app-launch/lttng |
Merge into: | lp:ubuntu-app-launch/14.04 |
Diff against target: |
523 lines (+147/-12) 15 files modified
CMakeLists.txt (+23/-10) click-exec-trace.tp (+6/-0) click-exec.c (+11/-0) cmake/UseLttngGenTp.cmake (+24/-0) debian/control (+1/-0) desktop-exec-trace.tp (+5/-0) desktop-exec.c (+8/-0) desktop-single-trace.tp (+5/-0) desktop-single.c (+8/-0) exec-line-exec-trace.tp (+4/-0) exec-line-exec.c (+8/-0) second-exec-core.c (+25/-0) second-exec-trace.tp (+16/-0) second-exec.c (+2/-0) tests/CMakeLists.txt (+1/-2) |
To merge this branch: | bzr merge lp:~ted/ubuntu-app-launch/lttng |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Charles Kerr (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+197762@code.launchpad.net |
Commit message
Adding tracing support to application startup
Description of the change
Application startup is a discussion topic, we'd like to be able to measure it. Here's some tracepoints to make that easy.
PS Jenkins bot (ps-jenkins) wrote : | # |
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:96
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:97
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Charles Kerr (charlesk) : | # |
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2013-11-19 04:11:47 +0000 |
3 | +++ CMakeLists.txt 2013-12-05 17:08:25 +0000 |
4 | @@ -16,6 +16,7 @@ |
5 | include(UseGlibGeneration) |
6 | include(UseGdbusCodegen) |
7 | include(UseConstantBuilder) |
8 | +include(UseLttngGenTp) |
9 | |
10 | # Workaround for libexecdir on debian |
11 | if (EXISTS "/etc/debian_version") |
12 | @@ -50,6 +51,9 @@ |
13 | pkg_check_modules(DBUSTEST REQUIRED dbustest-1>=14.04.0) |
14 | include_directories(${DBUSTEST_INCLUDE_DIRS}) |
15 | |
16 | +pkg_check_modules(LTTNG REQUIRED lttng-ust) |
17 | +include_directories(${LTTNG_INCLUDE_DIRS}) |
18 | + |
19 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) |
20 | |
21 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -fPIC") |
22 | @@ -110,18 +114,20 @@ |
23 | # desktop-exec |
24 | #################### |
25 | |
26 | -add_executable(desktop-exec desktop-exec.c) |
27 | +add_lttng_gen_tp(NAME desktop-exec-trace) |
28 | +add_executable(desktop-exec desktop-exec.c desktop-exec-trace.c) |
29 | set_target_properties(desktop-exec PROPERTIES OUTPUT_NAME "desktop-exec") |
30 | -target_link_libraries(desktop-exec helpers ${APPARMOR_LIBRARIES}) |
31 | +target_link_libraries(desktop-exec helpers ${LTTNG_LIBRARIES}) |
32 | install(TARGETS desktop-exec RUNTIME DESTINATION "${pkglibexecdir}") |
33 | |
34 | #################### |
35 | # click-exec |
36 | #################### |
37 | |
38 | -add_executable(click-exec click-exec.c) |
39 | +add_lttng_gen_tp(NAME click-exec-trace) |
40 | +add_executable(click-exec click-exec.c click-exec-trace.c) |
41 | set_target_properties(click-exec PROPERTIES OUTPUT_NAME "click-exec") |
42 | -target_link_libraries(click-exec helpers) |
43 | +target_link_libraries(click-exec helpers ${LTTNG_LIBRARIES}) |
44 | install(TARGETS click-exec RUNTIME DESTINATION "${pkglibexecdir}") |
45 | |
46 | #################### |
47 | @@ -137,18 +143,21 @@ |
48 | # desktop-single |
49 | #################### |
50 | |
51 | -add_executable(desktop-single desktop-single.c) |
52 | +add_lttng_gen_tp(NAME desktop-single-trace) |
53 | +add_executable(desktop-single desktop-single.c desktop-single-trace.c) |
54 | set_target_properties(desktop-single PROPERTIES OUTPUT_NAME "desktop-single") |
55 | -target_link_libraries(desktop-single helpers) |
56 | +target_link_libraries(desktop-single helpers ${LTTNG_LIBRARIES}) |
57 | install(TARGETS desktop-single RUNTIME DESTINATION "${pkglibexecdir}") |
58 | |
59 | #################### |
60 | # exec-line-exec |
61 | #################### |
62 | |
63 | -add_executable(exec-line-exec exec-line-exec.c) |
64 | +add_lttng_gen_tp(NAME exec-line-exec-trace) |
65 | +include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
66 | +add_executable(exec-line-exec exec-line-exec.c "${CMAKE_CURRENT_BINARY_DIR}/exec-line-exec-trace.c") |
67 | set_target_properties(exec-line-exec PROPERTIES OUTPUT_NAME "exec-line-exec") |
68 | -target_link_libraries(exec-line-exec helpers) |
69 | +target_link_libraries(exec-line-exec helpers ${LTTNG_LIBRARIES}) |
70 | install(TARGETS exec-line-exec RUNTIME DESTINATION "${pkglibexecdir}") |
71 | |
72 | #################### |
73 | @@ -164,9 +173,13 @@ |
74 | # second-exec |
75 | ####################### |
76 | |
77 | -add_executable(second-exec second-exec.c second-exec-core.c second-exec-core.h) |
78 | +add_lttng_gen_tp(NAME second-exec-trace) |
79 | +add_library(second-exec-core STATIC second-exec-core.c second-exec-trace.c) |
80 | +target_link_libraries(second-exec-core helpers upstart-launcher ${LTTNG_LIBRARIES}) |
81 | + |
82 | +add_executable(second-exec second-exec.c) |
83 | set_target_properties(second-exec PROPERTIES OUTPUT_NAME "second-exec") |
84 | -target_link_libraries(second-exec helpers upstart-launcher) |
85 | +target_link_libraries(second-exec second-exec-core) |
86 | install(TARGETS second-exec RUNTIME DESTINATION "${pkglibexecdir}") |
87 | |
88 | #################### |
89 | |
90 | === added file 'click-exec-trace.tp' |
91 | --- click-exec-trace.tp 1970-01-01 00:00:00 +0000 |
92 | +++ click-exec-trace.tp 2013-12-05 17:08:25 +0000 |
93 | @@ -0,0 +1,6 @@ |
94 | + |
95 | +TRACEPOINT_EVENT(upstart_app_launch, click_start, TP_ARGS(0), TP_FIELDS()) |
96 | +TRACEPOINT_EVENT(upstart_app_launch, click_found_pkgdir, TP_ARGS(0), TP_FIELDS()) |
97 | +TRACEPOINT_EVENT(upstart_app_launch, click_configured_env, TP_ARGS(0), TP_FIELDS()) |
98 | +TRACEPOINT_EVENT(upstart_app_launch, click_read_manifest, TP_ARGS(0), TP_FIELDS()) |
99 | +TRACEPOINT_EVENT(upstart_app_launch, click_read_desktop, TP_ARGS(0), TP_FIELDS()) |
100 | |
101 | === modified file 'click-exec.c' |
102 | --- click-exec.c 2013-11-12 21:06:02 +0000 |
103 | +++ click-exec.c 2013-12-05 17:08:25 +0000 |
104 | @@ -19,6 +19,7 @@ |
105 | |
106 | #include <glib.h> |
107 | #include "helpers.h" |
108 | +#include "click-exec-trace.h" |
109 | |
110 | /* |
111 | |
112 | @@ -52,6 +53,8 @@ |
113 | return 1; |
114 | } |
115 | |
116 | + tracepoint(upstart_app_launch, click_start); |
117 | + |
118 | GError * error = NULL; |
119 | gchar * package = NULL; |
120 | /* 'Parse' the App ID */ |
121 | @@ -68,6 +71,8 @@ |
122 | g_spawn_command_line_sync(cmdline, &output, NULL, NULL, &error); |
123 | g_free(cmdline); |
124 | |
125 | + tracepoint(upstart_app_launch, click_found_pkgdir); |
126 | + |
127 | /* If we have an extra newline, we can delete it. */ |
128 | gchar * newline = g_strstr_len(output, -1, "\n"); |
129 | if (newline != NULL) { |
130 | @@ -92,6 +97,8 @@ |
131 | |
132 | set_confined_envvars(package, output); |
133 | |
134 | + tracepoint(upstart_app_launch, click_configured_env); |
135 | + |
136 | gchar * desktopfile = manifest_to_desktop(output, app_id); |
137 | g_free(output); |
138 | if (desktopfile == NULL) { |
139 | @@ -99,6 +106,8 @@ |
140 | return 1; |
141 | } |
142 | |
143 | + tracepoint(upstart_app_launch, click_read_manifest); |
144 | + |
145 | GKeyFile * keyfile = g_key_file_new(); |
146 | |
147 | g_key_file_load_from_file(keyfile, desktopfile, 0, &error); |
148 | @@ -115,6 +124,8 @@ |
149 | return 1; |
150 | } |
151 | |
152 | + tracepoint(upstart_app_launch, click_read_desktop); |
153 | + |
154 | g_debug("Setting 'APP_EXEC' to '%s'", exec); |
155 | set_upstart_variable("APP_EXEC", exec); |
156 | |
157 | |
158 | === added file 'cmake/UseLttngGenTp.cmake' |
159 | --- cmake/UseLttngGenTp.cmake 1970-01-01 00:00:00 +0000 |
160 | +++ cmake/UseLttngGenTp.cmake 2013-12-05 17:08:25 +0000 |
161 | @@ -0,0 +1,24 @@ |
162 | +cmake_minimum_required(VERSION 2.6) |
163 | +if(POLICY CMP0011) |
164 | + cmake_policy(SET CMP0011 NEW) |
165 | +endif(POLICY CMP0011) |
166 | + |
167 | +find_program(LTTNG_GEN_TP NAMES lttng-gen-tp DOC "lttng-gen-tp executable") |
168 | +if(NOT LTTNG_GEN_TP) |
169 | + message(FATAL_ERROR "Excutable lttng-gen-top not found") |
170 | +endif() |
171 | + |
172 | +function(add_lttng_gen_tp) |
173 | + set(_one_value NAME) |
174 | + cmake_parse_arguments (arg "" "${_one_value}" "" ${ARGN}) |
175 | + |
176 | + add_custom_command( |
177 | + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${arg_NAME}.h" "${CMAKE_CURRENT_BINARY_DIR}/${arg_NAME}.c" |
178 | + COMMAND "${LTTNG_GEN_TP}" |
179 | + -o "${arg_NAME}.h" |
180 | + -o "${arg_NAME}.c" |
181 | + "${CMAKE_CURRENT_SOURCE_DIR}/${arg_NAME}.tp" |
182 | + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
183 | + DEPENDS "${arg_NAME}.tp" |
184 | + ) |
185 | +endfunction(add_lttng_gen_tp) |
186 | |
187 | === modified file 'debian/control' |
188 | --- debian/control 2013-11-19 03:35:22 +0000 |
189 | +++ debian/control 2013-12-05 17:08:25 +0000 |
190 | @@ -12,6 +12,7 @@ |
191 | libglib2.0-dev, |
192 | libgtest-dev, |
193 | libjson-glib-dev, |
194 | + liblttng-ust-dev, |
195 | libnih-dbus-dev, |
196 | libnih-dev, |
197 | libupstart-dev, |
198 | |
199 | === added file 'desktop-exec-trace.tp' |
200 | --- desktop-exec-trace.tp 1970-01-01 00:00:00 +0000 |
201 | +++ desktop-exec-trace.tp 2013-12-05 17:08:25 +0000 |
202 | @@ -0,0 +1,5 @@ |
203 | + |
204 | +TRACEPOINT_EVENT(upstart_app_launch, desktop_start, TP_ARGS(0), TP_FIELDS()) |
205 | +TRACEPOINT_EVENT(upstart_app_launch, desktop_found, TP_ARGS(0), TP_FIELDS()) |
206 | +TRACEPOINT_EVENT(upstart_app_launch, desktop_finished, TP_ARGS(0), TP_FIELDS()) |
207 | + |
208 | |
209 | === modified file 'desktop-exec.c' |
210 | --- desktop-exec.c 2013-11-12 21:06:02 +0000 |
211 | +++ desktop-exec.c 2013-12-05 17:08:25 +0000 |
212 | @@ -24,6 +24,7 @@ |
213 | #include <gio/gio.h> |
214 | |
215 | #include "helpers.h" |
216 | +#include "desktop-exec-trace.h" |
217 | |
218 | int |
219 | main (int argc, char * argv[]) |
220 | @@ -40,6 +41,9 @@ |
221 | return 1; |
222 | } |
223 | |
224 | + g_setenv("LTTNG_UST_REGISTER_TIMEOUT", "0", FALSE); /* Set to zero if not set */ |
225 | + tracepoint(upstart_app_launch, desktop_start); |
226 | + |
227 | gchar * desktopfilename = NULL; |
228 | GKeyFile * keyfile = keyfile_for_appid(app_id, &desktopfilename); |
229 | |
230 | @@ -48,6 +52,8 @@ |
231 | return 1; |
232 | } |
233 | |
234 | + tracepoint(upstart_app_launch, desktop_found); |
235 | + |
236 | /* This string is quoted using desktop file quoting: |
237 | http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables */ |
238 | gchar * execline = desktop_to_exec(keyfile, app_id); |
239 | @@ -78,5 +84,7 @@ |
240 | g_free(desktopfilename); |
241 | } |
242 | |
243 | + tracepoint(upstart_app_launch, desktop_finished); |
244 | + |
245 | return 0; |
246 | } |
247 | |
248 | === added file 'desktop-single-trace.tp' |
249 | --- desktop-single-trace.tp 1970-01-01 00:00:00 +0000 |
250 | +++ desktop-single-trace.tp 2013-12-05 17:08:25 +0000 |
251 | @@ -0,0 +1,5 @@ |
252 | + |
253 | +TRACEPOINT_EVENT(upstart_app_launch, desktop_single_start, TP_ARGS(0), TP_FIELDS()) |
254 | +TRACEPOINT_EVENT(upstart_app_launch, desktop_single_found, TP_ARGS(0), TP_FIELDS()) |
255 | +TRACEPOINT_EVENT(upstart_app_launch, desktop_single_finished, TP_ARGS(0), TP_FIELDS()) |
256 | + |
257 | |
258 | === modified file 'desktop-single.c' |
259 | --- desktop-single.c 2013-09-23 17:15:15 +0000 |
260 | +++ desktop-single.c 2013-12-05 17:08:25 +0000 |
261 | @@ -18,6 +18,7 @@ |
262 | */ |
263 | |
264 | #include "helpers.h" |
265 | +#include "desktop-single-trace.h" |
266 | |
267 | int |
268 | main (int argc, char * argv[]) |
269 | @@ -28,6 +29,9 @@ |
270 | return 1; |
271 | } |
272 | |
273 | + g_setenv("LTTNG_UST_REGISTER_TIMEOUT", "0", FALSE); /* Set to zero if not set */ |
274 | + tracepoint(upstart_app_launch, desktop_single_start); |
275 | + |
276 | GKeyFile * keyfile = keyfile_for_appid(argv[1], NULL); |
277 | |
278 | if (keyfile == NULL) { |
279 | @@ -35,6 +39,8 @@ |
280 | return 1; |
281 | } |
282 | |
283 | + tracepoint(upstart_app_launch, desktop_single_found); |
284 | + |
285 | gboolean singleinstance = FALSE; |
286 | |
287 | if (g_key_file_has_key(keyfile, "Desktop Entry", "X-Ubuntu-Single-Instance", NULL)) { |
288 | @@ -52,6 +58,8 @@ |
289 | |
290 | g_key_file_free(keyfile); |
291 | |
292 | + tracepoint(upstart_app_launch, desktop_single_finished); |
293 | + |
294 | if (singleinstance) { |
295 | return 0; |
296 | } else { |
297 | |
298 | === added file 'exec-line-exec-trace.tp' |
299 | --- exec-line-exec-trace.tp 1970-01-01 00:00:00 +0000 |
300 | +++ exec-line-exec-trace.tp 2013-12-05 17:08:25 +0000 |
301 | @@ -0,0 +1,4 @@ |
302 | + |
303 | +TRACEPOINT_EVENT(upstart_app_launch, exec_start, TP_ARGS(0), TP_FIELDS()) |
304 | +TRACEPOINT_EVENT(upstart_app_launch, exec_parse_complete, TP_ARGS(0), TP_FIELDS()) |
305 | +TRACEPOINT_EVENT(upstart_app_launch, exec_pre_exec, TP_ARGS(0), TP_FIELDS()) |
306 | |
307 | === modified file 'exec-line-exec.c' |
308 | --- exec-line-exec.c 2013-09-23 19:42:54 +0000 |
309 | +++ exec-line-exec.c 2013-12-05 17:08:25 +0000 |
310 | @@ -24,6 +24,7 @@ |
311 | #include <glib.h> |
312 | #include <glib/gstdio.h> |
313 | |
314 | +#include "exec-line-exec-trace.h" |
315 | #include "helpers.h" |
316 | |
317 | int |
318 | @@ -38,6 +39,9 @@ |
319 | return 1; |
320 | } |
321 | |
322 | + g_setenv("LTTNG_UST_REGISTER_TIMEOUT", "0", FALSE); /* Set to zero if not set */ |
323 | + tracepoint(upstart_app_launch, exec_start); |
324 | + |
325 | /* URIs */ |
326 | const gchar * app_uris = g_getenv("APP_URIS"); |
327 | const gchar * app_desktop = g_getenv("APP_DESKTOP_FILE"); |
328 | @@ -65,6 +69,8 @@ |
329 | return 1; |
330 | } |
331 | |
332 | + tracepoint(upstart_app_launch, exec_parse_complete); |
333 | + |
334 | /* Surface flinger check */ |
335 | if (g_getenv("USING_SURFACE_FLINGER") != NULL && app_desktop != NULL) { |
336 | gchar * sf = g_strdup_printf("--desktop_file_hint=%s", app_desktop); |
337 | @@ -74,6 +80,8 @@ |
338 | /* Now exec */ |
339 | gchar ** nargv = (gchar**)g_array_free(newargv, FALSE); |
340 | |
341 | + tracepoint(upstart_app_launch, exec_pre_exec); |
342 | + |
343 | int execret = execvp(nargv[0], nargv); |
344 | |
345 | if (execret != 0) { |
346 | |
347 | === modified file 'second-exec-core.c' |
348 | --- second-exec-core.c 2013-12-05 12:01:19 +0000 |
349 | +++ second-exec-core.c 2013-12-05 17:08:25 +0000 |
350 | @@ -23,6 +23,7 @@ |
351 | #include "libupstart-app-launch/upstart-app-launch.h" |
352 | #include "helpers.h" |
353 | #include "second-exec-core.h" |
354 | +#include "second-exec-trace.h" |
355 | |
356 | /* Globals */ |
357 | GPid app_pid = 0; |
358 | @@ -39,6 +40,7 @@ |
359 | static gboolean |
360 | timer_cb (gpointer user_data) |
361 | { |
362 | + tracepoint(upstart_app_launch, second_exec_resume_timeout); |
363 | g_warning("Unity didn't respond in 500ms to resume the app"); |
364 | g_main_loop_quit(mainloop); |
365 | return G_SOURCE_REMOVE; |
366 | @@ -48,6 +50,7 @@ |
367 | static void |
368 | connection_count_dec (void) |
369 | { |
370 | + tracepoint(upstart_app_launch, second_exec_connection_complete); |
371 | connections_open--; |
372 | if (connections_open == 0) { |
373 | g_debug("Finished finding connections"); |
374 | @@ -71,6 +74,7 @@ |
375 | unity_resume_cb (GDBusConnection * connection, const gchar * sender, const gchar * path, const gchar * interface, const gchar * signal, GVariant * params, gpointer user_data) |
376 | { |
377 | g_debug("Unity Completed Resume"); |
378 | + tracepoint(upstart_app_launch, second_exec_resume_complete); |
379 | |
380 | if (timer != 0) { |
381 | g_source_remove(timer); |
382 | @@ -163,9 +167,12 @@ |
383 | { |
384 | GError * error = NULL; |
385 | |
386 | + tracepoint(upstart_app_launch, second_exec_app_contacted); |
387 | + |
388 | g_dbus_connection_call_finish(G_DBUS_CONNECTION(object), res, &error); |
389 | |
390 | if (error != NULL) { |
391 | + tracepoint(upstart_app_launch, second_exec_app_error); |
392 | /* Mostly just to free the error, but printing for debugging */ |
393 | g_debug("Unable to send Open: %s", error->message); |
394 | g_error_free(error); |
395 | @@ -179,6 +186,8 @@ |
396 | static void |
397 | contact_app (GDBusConnection * bus, const gchar * dbus_name) |
398 | { |
399 | + tracepoint(upstart_app_launch, second_exec_contact_app); |
400 | + |
401 | parse_uris(); |
402 | app_id_to_dbus_path(); |
403 | |
404 | @@ -209,6 +218,8 @@ |
405 | GError * error = NULL; |
406 | GVariant * vpid = NULL; |
407 | |
408 | + tracepoint(upstart_app_launch, second_exec_got_pid); |
409 | + |
410 | vpid = g_dbus_connection_call_finish(G_DBUS_CONNECTION(object), res, &error); |
411 | |
412 | if (error != NULL) { |
413 | @@ -265,6 +276,8 @@ |
414 | return; |
415 | } |
416 | |
417 | + tracepoint(upstart_app_launch, second_exec_got_dbus_names); |
418 | + |
419 | /* Next figure out what we're looking for (and if there is something to look for) */ |
420 | /* NOTE: We're getting the PID *after* the list of connections so |
421 | that some new process can't come in, be the same PID as it's |
422 | @@ -275,6 +288,8 @@ |
423 | return; |
424 | } |
425 | |
426 | + tracepoint(upstart_app_launch, second_exec_got_primary_pid); |
427 | + |
428 | /* Get the names */ |
429 | GVariant * names = g_variant_get_child_value(listnames, 0); |
430 | GVariantIter iter; |
431 | @@ -287,6 +302,8 @@ |
432 | continue; |
433 | } |
434 | |
435 | + tracepoint(upstart_app_launch, second_exec_request_pid); |
436 | + |
437 | /* Get the PIDs */ |
438 | g_dbus_connection_call(session, |
439 | "org.freedesktop.DBus", |
440 | @@ -315,6 +332,8 @@ |
441 | appid = app_id; |
442 | input_uris = appuris; |
443 | |
444 | + tracepoint(upstart_app_launch, second_exec_start); |
445 | + |
446 | /* DBus tell us! */ |
447 | GError * error = NULL; |
448 | GDBusConnection * session = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error); |
449 | @@ -338,6 +357,8 @@ |
450 | unity_resume_cb, mainloop, |
451 | NULL); /* user data destroy */ |
452 | |
453 | + tracepoint(upstart_app_launch, second_exec_emit_resume); |
454 | + |
455 | /* Send unfreeze to to Unity */ |
456 | g_dbus_connection_emit_signal(session, |
457 | NULL, /* destination */ |
458 | @@ -371,6 +392,8 @@ |
459 | } |
460 | g_debug("Finishing main loop"); |
461 | |
462 | + tracepoint(upstart_app_launch, second_exec_emit_focus); |
463 | + |
464 | /* Now that we're done sending the info to the app, we can ask |
465 | Unity to focus the application. */ |
466 | g_dbus_connection_emit_signal(session, |
467 | @@ -404,5 +427,7 @@ |
468 | dbus_path = NULL; |
469 | } |
470 | |
471 | + tracepoint(upstart_app_launch, second_exec_finish); |
472 | + |
473 | return TRUE; |
474 | } |
475 | |
476 | === added file 'second-exec-trace.tp' |
477 | --- second-exec-trace.tp 1970-01-01 00:00:00 +0000 |
478 | +++ second-exec-trace.tp 2013-12-05 17:08:25 +0000 |
479 | @@ -0,0 +1,16 @@ |
480 | + |
481 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_start, TP_ARGS(0), TP_FIELDS()) |
482 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_emit_resume, TP_ARGS(0), TP_FIELDS()) |
483 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_resume_complete, TP_ARGS(0), TP_FIELDS()) |
484 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_resume_timeout, TP_ARGS(0), TP_FIELDS()) |
485 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_emit_focus, TP_ARGS(0), TP_FIELDS()) |
486 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_finish, TP_ARGS(0), TP_FIELDS()) |
487 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_got_dbus_names, TP_ARGS(0), TP_FIELDS()) |
488 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_got_primary_pid, TP_ARGS(0), TP_FIELDS()) |
489 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_request_pid, TP_ARGS(0), TP_FIELDS()) |
490 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_got_pid, TP_ARGS(0), TP_FIELDS()) |
491 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_contact_app, TP_ARGS(0), TP_FIELDS()) |
492 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_app_contacted, TP_ARGS(0), TP_FIELDS()) |
493 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_app_error, TP_ARGS(0), TP_FIELDS()) |
494 | +TRACEPOINT_EVENT(upstart_app_launch, second_exec_connection_complete, TP_ARGS(0), TP_FIELDS()) |
495 | + |
496 | |
497 | === modified file 'second-exec.c' |
498 | --- second-exec.c 2013-09-27 16:07:51 +0000 |
499 | +++ second-exec.c 2013-12-05 17:08:25 +0000 |
500 | @@ -30,6 +30,8 @@ |
501 | const gchar * appid = g_getenv("APP_ID"); |
502 | const gchar * appuris = g_getenv("APP_URIS"); |
503 | |
504 | + g_setenv("LTTNG_UST_REGISTER_TIMEOUT", "0", FALSE); /* Set to zero if not set */ |
505 | + |
506 | if (second_exec(appid, appuris)) { |
507 | return 0; |
508 | } else { |
509 | |
510 | === modified file 'tests/CMakeLists.txt' |
511 | --- tests/CMakeLists.txt 2013-11-19 03:32:32 +0000 |
512 | +++ tests/CMakeLists.txt 2013-12-05 17:08:25 +0000 |
513 | @@ -24,9 +24,8 @@ |
514 | |
515 | add_executable (second-exec-test |
516 | second-exec-test.cc |
517 | - "${CMAKE_SOURCE_DIR}/second-exec-core.c" |
518 | upstart-app-launch-mock.c) |
519 | -target_link_libraries (second-exec-test helpers gtest ${GTEST_LIBS} ${LIBUPSTART_LIBRARIES} upstart-launcher) |
520 | +target_link_libraries (second-exec-test helpers gtest ${GTEST_LIBS} ${LIBUPSTART_LIBRARIES} upstart-launcher second-exec-core) |
521 | add_test (second-exec-test second-exec-test) |
522 | |
523 | # libUAL Test |
FAILED: Continuous integration, rev:95 jenkins. qa.ubuntu. com/job/ upstart- app-launch- ci/164/ jenkins. qa.ubuntu. com/job/ upstart- app-launch- trusty- amd64-ci/ 23/console jenkins. qa.ubuntu. com/job/ upstart- app-launch- trusty- armhf-ci/ 23/console jenkins. qa.ubuntu. com/job/ upstart- app-launch- trusty- i386-ci/ 23/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/upstart- app-launch- ci/164/ rebuild
http://