/*
- * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _LTT_KERNEL_CTL_H
#define _LTT_KERNEL_CTL_H
+#include "lttng/lttng-error.h"
+#include "lttng/tracker.h"
#include "session.h"
#include "snapshot.h"
#include "trace-kernel.h"
* dynamic reallocation is performed.
*/
#define KERNEL_EVENT_INIT_LIST_SIZE 64
-#define KERNEL_TRACKER_IDS_INIT_LIST_SIZE 64
int kernel_add_channel_context(struct ltt_kernel_channel *chan,
struct ltt_kernel_context *ctx);
int kernel_disable_event(struct ltt_kernel_event *event);
int kernel_enable_event(struct ltt_kernel_event *event);
int kernel_enable_channel(struct ltt_kernel_channel *chan);
-int kernel_track_id(enum lttng_tracker_type tracker_type,
+enum lttng_error_code kernel_process_attr_tracker_set_tracking_policy(
+ struct ltt_kernel_session *session,
+ enum lttng_process_attr process_attr,
+ enum lttng_tracking_policy policy);
+enum lttng_error_code kernel_process_attr_tracker_inclusion_set_add_value(
struct ltt_kernel_session *session,
- const struct lttng_tracker_id *id);
-int kernel_untrack_id(enum lttng_tracker_type tracker_type,
+ enum lttng_process_attr process_attr,
+ const struct process_attr_value *value);
+enum lttng_error_code kernel_process_attr_tracker_inclusion_set_remove_value(
struct ltt_kernel_session *session,
- const struct lttng_tracker_id *id);
+ enum lttng_process_attr process_attr,
+ const struct process_attr_value *value);
+const struct process_attr_tracker *kernel_get_process_attr_tracker(
+ struct ltt_kernel_session *session,
+ enum lttng_process_attr process_attr);
int kernel_open_metadata(struct ltt_kernel_session *session);
int kernel_open_metadata_stream(struct ltt_kernel_session *session);
int kernel_open_channel_stream(struct ltt_kernel_channel *channel);
enum lttng_error_code kernel_clear_session(struct ltt_session *session);
int init_kernel_workarounds(void);
-ssize_t kernel_list_tracker_ids(enum lttng_tracker_type tracker_type,
- struct ltt_kernel_session *session,
- struct lttng_tracker_id ***_ids);
int kernel_supports_ring_buffer_snapshot_sample_positions(void);
int kernel_supports_ring_buffer_packet_sequence_number(void);
+int kernel_supports_event_notifiers(void);
int init_kernel_tracer(void);
void cleanup_kernel_tracer(void);
bool kernel_tracer_is_initialized(void);
enum lttng_error_code kernel_create_channel_subdirectories(
const struct ltt_kernel_session *ksess);
+enum lttng_error_code kernel_create_event_notifier_group_notification_fd(
+ int *event_notifier_group_notification_fd);
+enum lttng_error_code kernel_destroy_event_notifier_group_notification_fd(
+ int event_notifier_group_notification_fd);
+
+enum lttng_error_code kernel_register_event_notifier(
+ struct lttng_trigger *trigger,
+ const struct lttng_credentials *cmd_creds);
+enum lttng_error_code kernel_unregister_event_notifier(
+ const struct lttng_trigger *trigger);
+
+int kernel_get_notification_fd(void);
+
#endif /* _LTT_KERNEL_CTL_H */