printf("Creating tracing session (%s): ", argv[1]);
if ((ret = lttng_create_session("test", argv[1])) < 0) {
- printf("error creating the session : %s\n", lttng_get_readable_code(ret));
+ printf("error creating the session : %s\n", lttng_strerror(ret));
goto create_fail;
}
PRINT_OK();
printf("Creating session handle: ");
if ((handle = lttng_create_handle("test", &dom)) == NULL) {
- printf("error creating handle: %s\n", lttng_get_readable_code(ret));
+ printf("error creating handle: %s\n", lttng_strerror(ret));
goto handle_fail;
}
PRINT_OK();
printf("Enabling all kernel events: ");
if ((ret = lttng_enable_event(handle, &event, channel_name)) < 0) {
- printf("error enabling event: %s\n", lttng_get_readable_code(ret));
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
}
PRINT_OK();
printf("Start tracing: ");
if ((ret = lttng_start_tracing(handle)) < 0) {
- printf("error starting tracing: %s\n", lttng_get_readable_code(ret));
+ printf("error starting tracing: %s\n", lttng_strerror(ret));
goto start_fail;
}
PRINT_OK();
printf("Stop tracing: ");
if ((ret = lttng_stop_tracing(handle)) < 0) {
- printf("error stopping tracing: %s\n", lttng_get_readable_code(ret));
+ printf("error stopping tracing: %s\n", lttng_strerror(ret));
goto stop_fail;
}
PRINT_OK();
printf("Destroy tracing session: ");
if ((ret = lttng_destroy_session(handle)) < 0) {
- printf("error destroying session: %s\n", lttng_get_readable_code(ret));
+ printf("error destroying session: %s\n", lttng_strerror(ret));
}
PRINT_OK();
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_get_readable_code(ret));
+ printf("error creating the session : %s\n", lttng_strerror(ret));
goto create_fail;
}
PRINT_OK();
printf("Creating session handle: ");
if ((handle = lttng_create_handle(session_name, &dom)) == NULL) {
- printf("error creating handle: %s\n", lttng_get_readable_code(ret));
+ printf("error creating handle: %s\n", lttng_strerror(ret));
goto handle_fail;
}
PRINT_OK();
printf("Enabling %s kernel channel: ", channel.name);
if ((ret = lttng_enable_channel(handle, &channel)) < 0) {
- printf("error enable channel: %s\n", lttng_get_readable_code(ret));
+ printf("error enable channel: %s\n", lttng_strerror(ret));
goto enable_fail;
}
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_get_readable_code(ret));
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
}
PRINT_OK();
printf("Enabling %s kernel event: ", sched_process_exit.name);
if ((ret = lttng_enable_event(handle, &sched_process_exit, channel.name)) < 0) {
- printf("error enabling event: %s\n", lttng_get_readable_code(ret));
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
}
PRINT_OK();
printf("Enabling %s kernel event: ", sched_process_free.name);
if ((ret = lttng_enable_event(handle, &sched_process_free, channel.name)) < 0) {
- printf("error enabling event: %s\n", lttng_get_readable_code(ret));
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
}
PRINT_OK();
printf("Disabling %s kernel event: ", sched_switch.name);
if ((ret = lttng_disable_event(handle, sched_switch.name, channel.name)) < 0) {
- printf("error enabling event: %s\n", lttng_get_readable_code(ret));
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
}
PRINT_OK();
printf("Disabling %s kernel event: ", sched_process_free.name);
if ((ret = lttng_disable_event(handle, sched_process_free.name, channel.name)) < 0) {
- printf("error enabling event: %s\n", lttng_get_readable_code(ret));
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
}
PRINT_OK();
printf("Renabling %s kernel event: ", sched_switch.name);
if ((ret = lttng_enable_event(handle, &sched_switch, channel.name)) < 0) {
- printf("error enabling event: %s\n", lttng_get_readable_code(ret));
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
}
PRINT_OK();
printf("Renabling %s kernel event: ", sched_process_free.name);
if ((ret = lttng_enable_event(handle, &sched_process_free, channel.name)) < 0) {
- printf("error enabling event: %s\n", lttng_get_readable_code(ret));
+ printf("error enabling event: %s\n", lttng_strerror(ret));
goto enable_fail;
}
PRINT_OK();
printf("Start tracing: ");
if ((ret = lttng_start_tracing(handle)) < 0) {
- printf("error starting tracing: %s\n", lttng_get_readable_code(ret));
+ printf("error starting tracing: %s\n", lttng_strerror(ret));
goto start_fail;
}
PRINT_OK();
printf("Stop tracing: ");
if ((ret = lttng_stop_tracing(handle)) < 0) {
- printf("error stopping tracing: %s\n", lttng_get_readable_code(ret));
+ printf("error stopping tracing: %s\n", lttng_strerror(ret));
goto stop_fail;
}
PRINT_OK();
printf("Destroy tracing session: ");
if ((ret = lttng_destroy_session(handle)) < 0) {
- printf("error destroying session: %s\n", lttng_get_readable_code(ret));
+ printf("error destroying session: %s\n", lttng_strerror(ret));
}
PRINT_OK();