goto error;
}
- ret = event_kernel_disable_tracepoint(ksess, kchan, event_name);
+ ret = event_kernel_disable_tracepoint(kchan, event_name);
if (ret != LTTNG_OK) {
goto error;
}
goto error;
}
- ret = event_kernel_disable_all(ksess, kchan);
+ ret = event_kernel_disable_all(kchan);
if (ret != LTTNG_OK) {
goto error;
}
goto error;
}
- ret = event_kernel_enable_tracepoint(session->kernel_session, kchan,
- event);
+ ret = event_kernel_enable_tracepoint(kchan, event);
if (ret != LTTNG_OK) {
if (channel_created) {
/* Let's not leak a useless channel. */
switch (event_type) {
case LTTNG_EVENT_SYSCALL:
- ret = event_kernel_enable_all_syscalls(session->kernel_session,
- kchan, kernel_tracer_fd);
+ ret = event_kernel_enable_all_syscalls(kchan, kernel_tracer_fd);
break;
case LTTNG_EVENT_TRACEPOINT:
/*
* This call enables all LTTNG_KERNEL_TRACEPOINTS and
* events already registered to the channel.
*/
- ret = event_kernel_enable_all_tracepoints(session->kernel_session,
- kchan, kernel_tracer_fd);
+ ret = event_kernel_enable_all_tracepoints(kchan, kernel_tracer_fd);
break;
case LTTNG_EVENT_ALL:
/* Enable syscalls and tracepoints */
- ret = event_kernel_enable_all(session->kernel_session,
- kchan, kernel_tracer_fd);
+ ret = event_kernel_enable_all(kchan, kernel_tracer_fd);
break;
default:
ret = LTTNG_ERR_KERN_ENABLE_FAIL;
/*
* Disable kernel tracepoint event for a channel from the kernel session.
*/
-int event_kernel_disable_tracepoint(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, char *event_name)
+int event_kernel_disable_tracepoint(struct ltt_kernel_channel *kchan,
+ char *event_name)
{
int ret;
struct ltt_kernel_event *kevent;
/*
* Disable kernel tracepoint events for a channel from the kernel session.
*/
-int event_kernel_disable_all_tracepoints(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan)
+int event_kernel_disable_all_tracepoints(struct ltt_kernel_channel *kchan)
{
int ret;
struct ltt_kernel_event *kevent;
/*
* Disable kernel syscall events for a channel from the kernel session.
*/
-int event_kernel_disable_all_syscalls(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan)
+int event_kernel_disable_all_syscalls(struct ltt_kernel_channel *kchan)
{
ERR("Cannot disable syscall tracing for existing session. Please destroy session instead.");
return LTTNG_OK; /* Return OK so disable all succeeds */
/*
* Disable all kernel event for a channel from the kernel session.
*/
-int event_kernel_disable_all(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan)
+int event_kernel_disable_all(struct ltt_kernel_channel *kchan)
{
int ret;
- assert(ksession);
assert(kchan);
- ret = event_kernel_disable_all_tracepoints(ksession, kchan);
+ ret = event_kernel_disable_all_tracepoints(kchan);
if (ret != LTTNG_OK)
return ret;
- ret = event_kernel_disable_all_syscalls(ksession, kchan);
+ ret = event_kernel_disable_all_syscalls(kchan);
return ret;
}
/*
* Enable kernel tracepoint event for a channel from the kernel session.
*/
-int event_kernel_enable_tracepoint(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, struct lttng_event *event)
+int event_kernel_enable_tracepoint(struct ltt_kernel_channel *kchan,
+ struct lttng_event *event)
{
int ret;
struct ltt_kernel_event *kevent;
/*
* Enable all kernel tracepoint events of a channel of the kernel session.
*/
-int event_kernel_enable_all_tracepoints(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, int kernel_tracer_fd)
+int event_kernel_enable_all_tracepoints(struct ltt_kernel_channel *kchan,
+ int kernel_tracer_fd)
{
int size, i, ret;
struct ltt_kernel_event *kevent;
/*
* Enable all kernel tracepoint events of a channel of the kernel session.
*/
-int event_kernel_enable_all_syscalls(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, int kernel_tracer_fd)
+int event_kernel_enable_all_syscalls(struct ltt_kernel_channel *kchan,
+ int kernel_tracer_fd)
{
int ret;
struct lttng_event event;
/*
* Enable all kernel events of a channel of the kernel session.
*/
-int event_kernel_enable_all(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, int kernel_tracer_fd)
+int event_kernel_enable_all(struct ltt_kernel_channel *kchan,
+ int kernel_tracer_fd)
{
int tp_ret;
- assert(ksession);
assert(kchan);
- tp_ret = event_kernel_enable_all_tracepoints(ksession, kchan,
- kernel_tracer_fd);
+ tp_ret = event_kernel_enable_all_tracepoints(kchan, kernel_tracer_fd);
if (tp_ret != LTTNG_OK) {
goto end;
}
* tracepoints did not fail. Future work will allow us to send back
* multiple errors to the client in one API call.
*/
- (void) event_kernel_enable_all_syscalls(ksession, kchan, kernel_tracer_fd);
+ (void) event_kernel_enable_all_syscalls(kchan, kernel_tracer_fd);
end:
return tp_ret;
#include "trace-kernel.h"
-int event_kernel_disable_tracepoint(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, char *event_name);
-int event_kernel_disable_all_syscalls(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan);
-int event_kernel_disable_all_tracepoints(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan);
-int event_kernel_disable_all(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan);
+int event_kernel_disable_tracepoint(struct ltt_kernel_channel *kchan,
+ char *event_name);
+int event_kernel_disable_all_syscalls(struct ltt_kernel_channel *kchan);
+int event_kernel_disable_all_tracepoints(struct ltt_kernel_channel *kchan);
+int event_kernel_disable_all(struct ltt_kernel_channel *kchan);
-int event_kernel_enable_tracepoint(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, struct lttng_event *event);
-int event_kernel_enable_all_tracepoints(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, int kernel_tracer_fd);
-int event_kernel_enable_all_syscalls(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, int kernel_tracer_fd);
-int event_kernel_enable_all(struct ltt_kernel_session *ksession,
- struct ltt_kernel_channel *kchan, int kernel_tracer_fd);
+int event_kernel_enable_tracepoint(struct ltt_kernel_channel *kchan,
+ struct lttng_event *event);
+int event_kernel_enable_all_tracepoints(struct ltt_kernel_channel *kchan,
+ int kernel_tracer_fd);
+int event_kernel_enable_all_syscalls(struct ltt_kernel_channel *kchan,
+ int kernel_tracer_fd);
+int event_kernel_enable_all(struct ltt_kernel_channel *kchan,
+ int kernel_tracer_fd);
int event_ust_enable_tracepoint(struct ltt_ust_session *usess, int domain,
struct ltt_ust_channel *uchan, struct lttng_event *event,