instrumentation_string = config_event_type_tracepoint;
break;
case LTTNG_KERNEL_KPROBE:
- instrumentation_string = config_event_type_kprobe;
+ instrumentation_string = config_event_type_probe;
break;
case LTTNG_KERNEL_UPROBE:
instrumentation_string = config_event_type_userspace_probe;
break;
case LTTNG_KERNEL_FUNCTION:
- instrumentation_string = config_event_type_function;
+ instrumentation_string = config_event_type_function_entry;
break;
case LTTNG_KERNEL_KRETPROBE:
- instrumentation_string = config_event_type_kretprobe;
+ instrumentation_string = config_event_type_function;
break;
case LTTNG_KERNEL_NOOP:
instrumentation_string = config_event_type_noop;
{
int ret = 0;
const char *probe_name, *provider_name, *binary_path;
- struct lttng_userspace_probe_location *userspace_probe_location;
- struct lttng_userspace_probe_location_lookup_method *lookup_method;
+ const struct lttng_userspace_probe_location *userspace_probe_location;
+ const struct lttng_userspace_probe_location_lookup_method *lookup_method;
enum lttng_userspace_probe_location_lookup_method_type lookup_type;
/* Get userspace probe location from the event. */
{
int ret = 0;
const char *function_name, *binary_path;
- struct lttng_userspace_probe_location *userspace_probe_location;
- struct lttng_userspace_probe_location_lookup_method *lookup_method;
+ const struct lttng_userspace_probe_location *userspace_probe_location;
+ const struct lttng_userspace_probe_location_lookup_method *lookup_method;
enum lttng_userspace_probe_location_lookup_method_type lookup_type;
/* Get userspace probe location from the event. */
ret = config_writer_open_element(writer,
config_element_rotation_schedules);
+ if (ret) {
+ goto end;
+ }
if (session->rotate_timer_period) {
ret = save_session_rotation_schedule(writer,
LTTNG_ROTATION_SCHEDULE_TYPE_PERIODIC,
if (!session_access_ok(session,
LTTNG_SOCK_GET_UID_CRED(creds),
- LTTNG_SOCK_GET_GID_CRED(creds))) {
+ LTTNG_SOCK_GET_GID_CRED(creds)) || session->destroyed) {
ret = LTTNG_ERR_EPERM;
goto end;
}
session_lock(session);
ret = save_session(session, attr, creds);
session_unlock(session);
+ session_put(session);
if (ret) {
goto end;
}
struct ltt_session_list *list = session_get_list();
cds_list_for_each_entry(session, &list->head, list) {
+ if (!session_get(session)) {
+ continue;
+ }
session_lock(session);
ret = save_session(session, attr, creds);
session_unlock(session);
-
+ session_put(session);
/* Don't abort if we don't have the required permissions. */
if (ret && ret != LTTNG_ERR_EPERM) {
goto end;