X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt-events.h;h=ec70eceadc69986627e2b02031a3b41324185c86;hb=f91fd73b8982db34560bf3fe6da9fdf9a42901a9;hp=b9bb3bb95d8bba919729afabd17f135a76fe9791;hpb=53f1f0ca4eb1890673992697c19e4e1507ec4ac5;p=lttng-modules.git diff --git a/ltt-events.h b/ltt-events.h index b9bb3bb9..ec70ecea 100644 --- a/ltt-events.h +++ b/ltt-events.h @@ -7,6 +7,8 @@ * Copyright 2010 (c) - Mathieu Desnoyers * * Holds LTTng per-session event registry. + * + * Dual LGPL v2.1/GPL v2 license. */ #include @@ -126,7 +128,8 @@ struct lttng_ctx_field { union { struct { struct perf_event **e; /* per-cpu array */ - struct list_head head; + struct notifier_block nb; + int hp_enable; struct perf_event_attr *attr; } perf_counter; } u; @@ -271,11 +274,17 @@ void ltt_event_put(const struct lttng_event_desc *desc); int ltt_probes_init(void); void ltt_probes_exit(void); struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx); +void lttng_remove_context_field(struct lttng_ctx **ctx, + struct lttng_ctx_field *field); void lttng_destroy_context(struct lttng_ctx *ctx); int lttng_add_pid_to_ctx(struct lttng_ctx **ctx); int lttng_add_comm_to_ctx(struct lttng_ctx **ctx); int lttng_add_prio_to_ctx(struct lttng_ctx **ctx); int lttng_add_nice_to_ctx(struct lttng_ctx **ctx); +int lttng_add_perf_counter_to_ctx(uint32_t type, + uint64_t config, + const char *name, + struct lttng_ctx **ctx); #ifdef CONFIG_KPROBES int lttng_kprobes_register(const char *name,