struct ust_trace *trace = container_of(kref,
struct ust_trace, kref);
ltt_channels_trace_free(trace->channels);
- kfree(trace);
+ free(trace);
}
static inline void prepare_chan_size_num(unsigned int *subbuf_size,
goto traces_error;
}
- new_trace = kzalloc(sizeof(struct ust_trace), GFP_KERNEL);
+ new_trace = zmalloc(sizeof(struct ust_trace));
if (!new_trace) {
ERR("Unable to allocate memory for trace %s", trace_name);
err = -ENOMEM;
}
strncpy(new_trace->trace_name, trace_name, NAME_MAX);
new_trace->channels = ltt_channels_trace_alloc(&new_trace->nr_channels,
- 0, 1);
+ ust_channels_overwrite_by_default,
+ ust_channels_request_collection_by_default, 1);
if (!new_trace->channels) {
ERR("Unable to allocate memory for chaninfo %s\n", trace_name);
err = -ENOMEM;
return 0;
trace_free:
- kfree(new_trace);
+ free(new_trace);
traces_error:
return err;
}
static void _ltt_trace_free(struct ust_trace *trace)
{
list_del(&trace->list);
- kfree(trace);
+ free(trace);
}
int ltt_trace_set_type(const char *trace_name, const char *trace_type)