}
printf("Creating tracing session (%s): ", argv[1]);
- if ((ret = lttng_create_session(session_name, argv[1])) < 0) {
- printf("error creating the session : %s\n", lttng_strerror(ret));
+ if ((ret = lttng_create_session(session_name, argv[1])) < 0) {
+ printf("error creating the session : %s\n", lttng_strerror(ret));
goto create_fail;
- }
+ }
PRINT_OK();
printf("Creating session handle: ");
PRINT_OK();
printf("Enabling all kernel events: ");
- if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) {
- printf("error enabling event: %s\n", lttng_strerror(ret));
+ if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) {
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
- }
+ }
PRINT_OK();
printf("Start tracing: ");
- if ((ret = lttng_start_tracing(session_name)) < 0) {
- printf("error starting tracing: %s\n", lttng_strerror(ret));
+ if ((ret = lttng_start_tracing(session_name)) < 0) {
+ printf("error starting tracing: %s\n", lttng_strerror(ret));
goto start_fail;
- }
+ }
PRINT_OK();
- sleep(2);
+ sleep(2);
printf("Stop tracing: ");
if ((ret = lttng_stop_tracing(session_name)) < 0) {
lttng_destroy_session(session_name);
lttng_destroy_handle(handle);
- return 1;
+ return 1;
}
}
printf("Creating tracing session (%s): ", argv[1]);
- if ((ret = lttng_create_session(session_name, argv[1])) < 0) {
- printf("error creating the session : %s\n", lttng_strerror(ret));
+ if ((ret = lttng_create_session(session_name, argv[1])) < 0) {
+ printf("error creating the session : %s\n", lttng_strerror(ret));
goto create_fail;
- }
+ }
PRINT_OK();
printf("Creating session handle: ");
}
printf("Enabling %s kernel event: ", sched_switch.name);
- if ((ret = lttng_enable_event(handle, &sched_switch, channel.name)) < 0) {
- printf("error enabling event: %s\n", lttng_strerror(ret));
+ if ((ret = lttng_enable_event(handle, &sched_switch, channel.name)) < 0) {
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
- }
+ }
PRINT_OK();
printf("Enabling %s kernel event: ", sched_process_exit.name);
lttng_destroy_session(session_name);
lttng_destroy_handle(handle);
- return 1;
+ return 1;
}
}
printf("Creating tracing session (%s): ", argv[1]);
- if ((ret = lttng_create_session(session_name, argv[1])) < 0) {
- printf("error creating the session : %s\n", lttng_strerror(ret));
+ if ((ret = lttng_create_session(session_name, argv[1])) < 0) {
+ printf("error creating the session : %s\n", lttng_strerror(ret));
goto create_fail;
- }
+ }
PRINT_OK();
printf("Creating session handle: ");
PRINT_OK();
printf("Enabling all UST events: ");
- if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) {
- printf("error enabling event: %s\n", lttng_strerror(ret));
+ if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) {
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
- }
+ }
PRINT_OK();
printf("Start tracing: ");
- if ((ret = lttng_start_tracing(session_name)) < 0) {
- printf("error starting tracing: %s\n", lttng_strerror(ret));
+ if ((ret = lttng_start_tracing(session_name)) < 0) {
+ printf("error starting tracing: %s\n", lttng_strerror(ret));
goto start_fail;
- }
+ }
PRINT_OK();
- sleep(2);
+ sleep(2);
printf("Stop tracing: ");
if ((ret = lttng_stop_tracing(session_name)) < 0) {
lttng_destroy_session(session_name);
lttng_destroy_handle(handle);
- return 1;
+ return 1;
}
}
printf("Creating tracing session (%s): ", argv[1]);
- if ((ret = lttng_create_session(session_name, argv[1])) < 0) {
- printf("error creating the session : %s\n", lttng_strerror(ret));
+ if ((ret = lttng_create_session(session_name, argv[1])) < 0) {
+ printf("error creating the session : %s\n", lttng_strerror(ret));
goto create_fail;
- }
+ }
PRINT_OK();
printf("Creating session handle: ");
PRINT_OK();
printf("Enabling %s UST event: ", ev1.name);
- if ((ret = lttng_enable_event(handle, &ev1, channel.name)) < 0) {
- printf("error enabling event: %s\n", lttng_strerror(ret));
+ if ((ret = lttng_enable_event(handle, &ev1, channel.name)) < 0) {
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
- }
+ }
PRINT_OK();
printf("Enabling %s UST event: ", ev2.name);
lttng_destroy_session(session_name);
lttng_destroy_handle(handle);
- return 1;
+ return 1;
}