1 #ifndef _LTTNG_EVENTS_H
2 #define _LTTNG_EVENTS_H
7 * Holds LTTng per-session event registry.
9 * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; only
14 * version 2.1 of the License.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 #include <linux/version.h>
27 #include <linux/list.h>
28 #include <linux/kprobes.h>
29 #include <linux/kref.h>
30 #include <wrapper/uuid.h>
31 #include <lttng-abi.h>
32 #include <lttng-abi-old.h>
34 #define lttng_is_signed_type(type) (((type)(-1)) < 0)
38 struct lttng_metadata_cache
;
39 struct lib_ring_buffer_ctx
;
41 struct perf_event_attr
;
42 struct lib_ring_buffer_config
;
44 /* Type description */
55 enum lttng_string_encodings
{
56 lttng_encode_none
= 0,
57 lttng_encode_UTF8
= 1,
58 lttng_encode_ASCII
= 2,
67 struct lttng_enum_entry
{
68 unsigned long long start
, end
; /* start and end are inclusive */
72 #define __type_integer(_type, _size, _alignment, _signedness, \
73 _byte_order, _base, _encoding) \
75 .atype = atype_integer, \
78 .size = (_size) ? : sizeof(_type) * CHAR_BIT, \
79 .alignment = (_alignment) ? : lttng_alignof(_type) * CHAR_BIT, \
80 .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \
81 .reverse_byte_order = _byte_order != __BYTE_ORDER, \
83 .encoding = lttng_encode_##_encoding, \
87 struct lttng_integer_type {
88 unsigned int size
; /* in bits */
89 unsigned short alignment
; /* in bits */
90 unsigned int signedness
:1,
92 unsigned int base
; /* 2, 8, 10, 16, for pretty print */
93 enum lttng_string_encodings encoding
;
96 union _lttng_basic_type
{
97 struct lttng_integer_type integer
;
102 enum lttng_string_encodings encoding
;
106 struct lttng_basic_type
{
107 enum abstract_types atype
;
109 union _lttng_basic_type basic
;
114 enum abstract_types atype
;
116 union _lttng_basic_type basic
;
118 struct lttng_basic_type elem_type
;
119 unsigned int length
; /* num. elems. */
120 unsigned int elem_alignment
; /* alignment override */
123 struct lttng_basic_type length_type
;
124 struct lttng_basic_type elem_type
;
125 unsigned int elem_alignment
; /* alignment override */
132 struct lttng_type container_type
;
133 const struct lttng_enum_entry
*entries
;
137 /* Event field description */
139 struct lttng_event_field
{
141 struct lttng_type type
;
142 unsigned int nowrite
:1, /* do not write into trace */
143 user
:1; /* fetch from user-space */
146 union lttng_ctx_value
{
153 * We need to keep this perf counter field separately from struct
154 * lttng_ctx_field because cpu hotplug needs fixed-location addresses.
156 struct lttng_perf_counter_field
{
157 struct notifier_block nb
;
159 struct perf_event_attr
*attr
;
160 struct perf_event
**e
; /* per-cpu array */
163 struct lttng_probe_ctx
{
164 struct lttng_event
*event
;
165 uint8_t interruptible
;
168 struct lttng_ctx_field
{
169 struct lttng_event_field event_field
;
170 size_t (*get_size
)(size_t offset
);
171 void (*record
)(struct lttng_ctx_field
*field
,
172 struct lib_ring_buffer_ctx
*ctx
,
173 struct lttng_channel
*chan
);
174 void (*get_value
)(struct lttng_ctx_field
*field
,
175 struct lttng_probe_ctx
*lttng_probe_ctx
,
176 union lttng_ctx_value
*value
);
178 struct lttng_perf_counter_field
*perf_counter
;
180 void (*destroy
)(struct lttng_ctx_field
*field
);
184 struct lttng_ctx_field
*fields
;
185 unsigned int nr_fields
;
186 unsigned int allocated_fields
;
187 size_t largest_align
; /* in bytes */
190 struct lttng_event_desc
{
191 const char *name
; /* lttng-modules name */
192 const char *kname
; /* Linux kernel name (tracepoints) */
193 void *probe_callback
;
194 const struct lttng_event_ctx
*ctx
; /* context */
195 const struct lttng_event_field
*fields
; /* event payload */
196 unsigned int nr_fields
;
197 struct module
*owner
;
200 struct lttng_probe_desc
{
201 const char *provider
;
202 const struct lttng_event_desc
**event_desc
;
203 unsigned int nr_events
;
204 struct list_head head
; /* chain registered probes */
205 struct list_head lazy_init_head
;
206 int lazy
; /* lazy registration */
209 struct lttng_krp
; /* Kretprobe handling */
211 enum lttng_event_type
{
212 LTTNG_TYPE_EVENT
= 0,
213 LTTNG_TYPE_ENABLER
= 1,
216 struct lttng_filter_bytecode_node
{
217 struct list_head node
;
218 struct lttng_enabler
*enabler
;
220 * struct lttng_kernel_filter_bytecode has var. sized array, must be
223 struct lttng_kernel_filter_bytecode bc
;
227 * Filter return value masks.
229 enum lttng_filter_ret
{
230 LTTNG_FILTER_DISCARD
= 0,
231 LTTNG_FILTER_RECORD_FLAG
= (1ULL << 0),
232 /* Other bits are kept for future use. */
235 struct lttng_bytecode_runtime
{
236 /* Associated bytecode */
237 struct lttng_filter_bytecode_node
*bc
;
238 uint64_t (*filter
)(void *filter_data
, struct lttng_probe_ctx
*lttng_probe_ctx
,
239 const char *filter_stack_data
);
241 struct list_head node
; /* list of bytecode runtime in event */
245 * Objects in a linked-list of enablers, owned by an event.
247 struct lttng_enabler_ref
{
248 struct list_head node
; /* enabler ref list */
249 struct lttng_enabler
*ref
; /* backward ref */
253 * lttng_event structure is referred to by the tracing fast path. It must be
257 enum lttng_event_type evtype
; /* First field. */
259 struct lttng_channel
*chan
;
261 const struct lttng_event_desc
*desc
;
263 struct lttng_ctx
*ctx
;
264 enum lttng_kernel_instrumentation instrumentation
;
271 struct lttng_krp
*lttng_krp
;
278 struct list_head list
; /* Event list in session */
279 unsigned int metadata_dumped
:1;
281 /* Backward references: list of lttng_enabler_ref (ref to enablers) */
282 struct list_head enablers_ref_head
;
283 struct hlist_node hlist
; /* session ht of events */
284 int registered
; /* has reg'd tracepoint probe */
285 /* list of struct lttng_bytecode_runtime, sorted by seqnum */
286 struct list_head bytecode_runtime_head
;
287 int has_enablers_without_bytecode
;
290 enum lttng_enabler_type
{
291 LTTNG_ENABLER_WILDCARD
,
296 * Enabler field, within whatever object is enabling an event. Target of
297 * backward reference.
299 struct lttng_enabler
{
300 enum lttng_event_type evtype
; /* First field. */
302 enum lttng_enabler_type type
;
304 struct list_head node
; /* per-session list of enablers */
305 /* head list of struct lttng_ust_filter_bytecode_node */
306 struct list_head filter_bytecode_head
;
308 struct lttng_kernel_event event_param
;
309 struct lttng_channel
*chan
;
310 struct lttng_ctx
*ctx
;
311 unsigned int enabled
:1;
314 struct lttng_channel_ops
{
315 struct channel
*(*channel_create
)(const char *name
,
316 struct lttng_channel
*lttng_chan
,
318 size_t subbuf_size
, size_t num_subbuf
,
319 unsigned int switch_timer_interval
,
320 unsigned int read_timer_interval
);
321 void (*channel_destroy
)(struct channel
*chan
);
322 struct lib_ring_buffer
*(*buffer_read_open
)(struct channel
*chan
);
323 int (*buffer_has_read_closed_stream
)(struct channel
*chan
);
324 void (*buffer_read_close
)(struct lib_ring_buffer
*buf
);
325 int (*event_reserve
)(struct lib_ring_buffer_ctx
*ctx
,
327 void (*event_commit
)(struct lib_ring_buffer_ctx
*ctx
);
328 void (*event_write
)(struct lib_ring_buffer_ctx
*ctx
, const void *src
,
330 void (*event_write_from_user
)(struct lib_ring_buffer_ctx
*ctx
,
331 const void *src
, size_t len
);
332 void (*event_memset
)(struct lib_ring_buffer_ctx
*ctx
,
334 void (*event_strcpy
)(struct lib_ring_buffer_ctx
*ctx
, const char *src
,
336 void (*event_strcpy_from_user
)(struct lib_ring_buffer_ctx
*ctx
,
337 const char __user
*src
, size_t len
);
339 * packet_avail_size returns the available size in the current
340 * packet. Note that the size returned is only a hint, since it
341 * may change due to concurrent writes.
343 size_t (*packet_avail_size
)(struct channel
*chan
);
344 wait_queue_head_t
*(*get_writer_buf_wait_queue
)(struct channel
*chan
, int cpu
);
345 wait_queue_head_t
*(*get_hp_wait_queue
)(struct channel
*chan
);
346 int (*is_finalized
)(struct channel
*chan
);
347 int (*is_disabled
)(struct channel
*chan
);
348 int (*timestamp_begin
) (const struct lib_ring_buffer_config
*config
,
349 struct lib_ring_buffer
*bufb
,
350 uint64_t *timestamp_begin
);
351 int (*timestamp_end
) (const struct lib_ring_buffer_config
*config
,
352 struct lib_ring_buffer
*bufb
,
353 uint64_t *timestamp_end
);
354 int (*events_discarded
) (const struct lib_ring_buffer_config
*config
,
355 struct lib_ring_buffer
*bufb
,
356 uint64_t *events_discarded
);
357 int (*content_size
) (const struct lib_ring_buffer_config
*config
,
358 struct lib_ring_buffer
*bufb
,
359 uint64_t *content_size
);
360 int (*packet_size
) (const struct lib_ring_buffer_config
*config
,
361 struct lib_ring_buffer
*bufb
,
362 uint64_t *packet_size
);
363 int (*stream_id
) (const struct lib_ring_buffer_config
*config
,
364 struct lib_ring_buffer
*bufb
,
365 uint64_t *stream_id
);
366 int (*current_timestamp
) (const struct lib_ring_buffer_config
*config
,
367 struct lib_ring_buffer
*bufb
,
369 int (*sequence_number
) (const struct lib_ring_buffer_config
*config
,
370 struct lib_ring_buffer
*bufb
,
372 int (*instance_id
) (const struct lib_ring_buffer_config
*config
,
373 struct lib_ring_buffer
*bufb
,
377 struct lttng_transport
{
379 struct module
*owner
;
380 struct list_head node
;
381 struct lttng_channel_ops ops
;
384 struct lttng_syscall_filter
;
386 #define LTTNG_EVENT_HT_BITS 12
387 #define LTTNG_EVENT_HT_SIZE (1U << LTTNG_EVENT_HT_BITS)
389 struct lttng_event_ht
{
390 struct hlist_head table
[LTTNG_EVENT_HT_SIZE
];
393 struct lttng_channel
{
395 struct channel
*chan
; /* Channel buffers */
397 struct lttng_ctx
*ctx
;
398 /* Event ID management */
399 struct lttng_session
*session
;
400 struct file
*file
; /* File associated to channel */
401 unsigned int free_event_id
; /* Next event ID to allocate */
402 struct list_head list
; /* Channel list */
403 struct lttng_channel_ops
*ops
;
404 struct lttng_transport
*transport
;
405 struct lttng_event
**sc_table
; /* for syscall tracing */
406 struct lttng_event
**compat_sc_table
;
407 struct lttng_event
**sc_exit_table
; /* for syscall exit tracing */
408 struct lttng_event
**compat_sc_exit_table
;
409 struct lttng_event
*sc_unknown
; /* for unknown syscalls */
410 struct lttng_event
*sc_compat_unknown
;
411 struct lttng_event
*sc_exit_unknown
;
412 struct lttng_event
*compat_sc_exit_unknown
;
413 struct lttng_syscall_filter
*sc_filter
;
414 int header_type
; /* 0: unset, 1: compact, 2: large */
415 enum channel_type channel_type
;
416 unsigned int metadata_dumped
:1,
417 sys_enter_registered
:1,
418 sys_exit_registered
:1,
420 tstate
:1; /* Transient enable state */
423 struct lttng_metadata_stream
{
424 void *priv
; /* Ring buffer private data */
425 struct lttng_metadata_cache
*metadata_cache
;
426 unsigned int metadata_in
; /* Bytes read from the cache */
427 unsigned int metadata_out
; /* Bytes consumed from stream */
428 int finalized
; /* Has channel been finalized */
429 wait_queue_head_t read_wait
; /* Reader buffer-level wait queue */
430 struct list_head list
; /* Stream list */
431 struct lttng_transport
*transport
;
432 uint64_t version
; /* Current version of the metadata cache */
437 * struct lttng_pid_tracker declared in header due to deferencing of *v
438 * in RCU_INITIALIZER(v).
440 #define LTTNG_PID_HASH_BITS 6
441 #define LTTNG_PID_TABLE_SIZE (1 << LTTNG_PID_HASH_BITS)
443 struct lttng_pid_tracker
{
444 struct hlist_head pid_hash
[LTTNG_PID_TABLE_SIZE
];
447 struct lttng_pid_hash_node
{
448 struct hlist_node hlist
;
452 struct lttng_session
{
453 int active
; /* Is trace session active ? */
454 int been_active
; /* Has trace session been active ? */
455 struct file
*file
; /* File associated to session */
456 struct list_head chan
; /* Channel list head */
457 struct list_head events
; /* Event list head */
458 struct list_head list
; /* Session list */
459 unsigned int free_chan_id
; /* Next chan ID to allocate */
460 uuid_le uuid
; /* Trace session unique ID */
461 struct lttng_metadata_cache
*metadata_cache
;
462 struct lttng_pid_tracker
*pid_tracker
;
463 unsigned int metadata_dumped
:1,
464 tstate
:1; /* Transient enable state */
465 /* List of enablers */
466 struct list_head enablers_head
;
467 /* Hash table of events */
468 struct lttng_event_ht events_ht
;
471 struct lttng_metadata_cache
{
472 char *data
; /* Metadata cache */
473 unsigned int cache_alloc
; /* Metadata allocated size (bytes) */
474 unsigned int metadata_written
; /* Number of bytes written in metadata cache */
475 struct kref refcount
; /* Metadata cache usage */
476 struct list_head metadata_stream
; /* Metadata stream list */
477 uuid_le uuid
; /* Trace session unique ID (copy) */
478 struct mutex lock
; /* Produce/consume lock */
479 uint64_t version
; /* Current version of the metadata */
482 void lttng_lock_sessions(void);
483 void lttng_unlock_sessions(void);
485 struct list_head
*lttng_get_probe_list_head(void);
487 struct lttng_enabler
*lttng_enabler_create(enum lttng_enabler_type type
,
488 struct lttng_kernel_event
*event_param
,
489 struct lttng_channel
*chan
);
491 int lttng_enabler_enable(struct lttng_enabler
*enabler
);
492 int lttng_enabler_disable(struct lttng_enabler
*enabler
);
493 int lttng_fix_pending_events(void);
494 int lttng_session_active(void);
496 struct lttng_session
*lttng_session_create(void);
497 int lttng_session_enable(struct lttng_session
*session
);
498 int lttng_session_disable(struct lttng_session
*session
);
499 void lttng_session_destroy(struct lttng_session
*session
);
500 int lttng_session_metadata_regenerate(struct lttng_session
*session
);
501 void metadata_cache_destroy(struct kref
*kref
);
503 struct lttng_channel
*lttng_channel_create(struct lttng_session
*session
,
504 const char *transport_name
,
506 size_t subbuf_size
, size_t num_subbuf
,
507 unsigned int switch_timer_interval
,
508 unsigned int read_timer_interval
,
509 enum channel_type channel_type
);
510 struct lttng_channel
*lttng_global_channel_create(struct lttng_session
*session
,
511 int overwrite
, void *buf_addr
,
512 size_t subbuf_size
, size_t num_subbuf
,
513 unsigned int switch_timer_interval
,
514 unsigned int read_timer_interval
);
516 void lttng_metadata_channel_destroy(struct lttng_channel
*chan
);
517 struct lttng_event
*lttng_event_create(struct lttng_channel
*chan
,
518 struct lttng_kernel_event
*event_param
,
520 const struct lttng_event_desc
*event_desc
,
521 enum lttng_kernel_instrumentation itype
);
522 struct lttng_event
*_lttng_event_create(struct lttng_channel
*chan
,
523 struct lttng_kernel_event
*event_param
,
525 const struct lttng_event_desc
*event_desc
,
526 enum lttng_kernel_instrumentation itype
);
527 struct lttng_event
*lttng_event_compat_old_create(struct lttng_channel
*chan
,
528 struct lttng_kernel_old_event
*old_event_param
,
530 const struct lttng_event_desc
*internal_desc
);
532 int lttng_channel_enable(struct lttng_channel
*channel
);
533 int lttng_channel_disable(struct lttng_channel
*channel
);
534 int lttng_event_enable(struct lttng_event
*event
);
535 int lttng_event_disable(struct lttng_event
*event
);
537 void lttng_transport_register(struct lttng_transport
*transport
);
538 void lttng_transport_unregister(struct lttng_transport
*transport
);
540 void synchronize_trace(void);
541 int lttng_abi_init(void);
542 int lttng_abi_compat_old_init(void);
543 void lttng_abi_exit(void);
544 void lttng_abi_compat_old_exit(void);
546 int lttng_probe_register(struct lttng_probe_desc
*desc
);
547 void lttng_probe_unregister(struct lttng_probe_desc
*desc
);
548 const struct lttng_event_desc
*lttng_event_get(const char *name
);
549 void lttng_event_put(const struct lttng_event_desc
*desc
);
550 int lttng_probes_init(void);
551 void lttng_probes_exit(void);
553 int lttng_metadata_output_channel(struct lttng_metadata_stream
*stream
,
554 struct channel
*chan
);
556 int lttng_pid_tracker_get_node_pid(const struct lttng_pid_hash_node
*node
);
557 struct lttng_pid_tracker
*lttng_pid_tracker_create(void);
558 void lttng_pid_tracker_destroy(struct lttng_pid_tracker
*lpf
);
559 bool lttng_pid_tracker_lookup(struct lttng_pid_tracker
*lpf
, int pid
);
560 int lttng_pid_tracker_add(struct lttng_pid_tracker
*lpf
, int pid
);
561 int lttng_pid_tracker_del(struct lttng_pid_tracker
*lpf
, int pid
);
563 int lttng_session_track_pid(struct lttng_session
*session
, int pid
);
564 int lttng_session_untrack_pid(struct lttng_session
*session
, int pid
);
566 int lttng_session_list_tracker_pids(struct lttng_session
*session
);
568 void lttng_clock_ref(void);
569 void lttng_clock_unref(void);
571 #if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
572 int lttng_syscalls_register(struct lttng_channel
*chan
, void *filter
);
573 int lttng_syscalls_unregister(struct lttng_channel
*chan
);
574 int lttng_syscall_filter_enable(struct lttng_channel
*chan
,
576 int lttng_syscall_filter_disable(struct lttng_channel
*chan
,
578 long lttng_channel_syscall_mask(struct lttng_channel
*channel
,
579 struct lttng_kernel_syscall_mask __user
*usyscall_mask
);
581 static inline int lttng_syscalls_register(struct lttng_channel
*chan
, void *filter
)
586 static inline int lttng_syscalls_unregister(struct lttng_channel
*chan
)
591 static inline int lttng_syscall_filter_enable(struct lttng_channel
*chan
,
597 static inline int lttng_syscall_filter_disable(struct lttng_channel
*chan
,
603 static inline long lttng_channel_syscall_mask(struct lttng_channel
*channel
,
604 struct lttng_kernel_syscall_mask __user
*usyscall_mask
)
610 void lttng_filter_sync_state(struct lttng_bytecode_runtime
*runtime
);
611 int lttng_enabler_attach_bytecode(struct lttng_enabler
*enabler
,
612 struct lttng_kernel_filter_bytecode __user
*bytecode
);
613 void lttng_enabler_event_link_bytecode(struct lttng_event
*event
,
614 struct lttng_enabler
*enabler
);
616 extern struct lttng_ctx
*lttng_static_ctx
;
618 int lttng_context_init(void);
619 void lttng_context_exit(void);
620 struct lttng_ctx_field
*lttng_append_context(struct lttng_ctx
**ctx
);
621 void lttng_context_update(struct lttng_ctx
*ctx
);
622 int lttng_find_context(struct lttng_ctx
*ctx
, const char *name
);
623 int lttng_get_context_index(struct lttng_ctx
*ctx
, const char *name
);
624 void lttng_remove_context_field(struct lttng_ctx
**ctx
,
625 struct lttng_ctx_field
*field
);
626 void lttng_destroy_context(struct lttng_ctx
*ctx
);
627 int lttng_add_pid_to_ctx(struct lttng_ctx
**ctx
);
628 int lttng_add_cpu_id_to_ctx(struct lttng_ctx
**ctx
);
629 int lttng_add_procname_to_ctx(struct lttng_ctx
**ctx
);
630 int lttng_add_prio_to_ctx(struct lttng_ctx
**ctx
);
631 int lttng_add_nice_to_ctx(struct lttng_ctx
**ctx
);
632 int lttng_add_vpid_to_ctx(struct lttng_ctx
**ctx
);
633 int lttng_add_tid_to_ctx(struct lttng_ctx
**ctx
);
634 int lttng_add_vtid_to_ctx(struct lttng_ctx
**ctx
);
635 int lttng_add_ppid_to_ctx(struct lttng_ctx
**ctx
);
636 int lttng_add_vppid_to_ctx(struct lttng_ctx
**ctx
);
637 int lttng_add_hostname_to_ctx(struct lttng_ctx
**ctx
);
638 int lttng_add_interruptible_to_ctx(struct lttng_ctx
**ctx
);
639 int lttng_add_need_reschedule_to_ctx(struct lttng_ctx
**ctx
);
640 #if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT)
641 int lttng_add_preemptible_to_ctx(struct lttng_ctx
**ctx
);
644 int lttng_add_preemptible_to_ctx(struct lttng_ctx
**ctx
)
649 #ifdef CONFIG_PREEMPT_RT_FULL
650 int lttng_add_migratable_to_ctx(struct lttng_ctx
**ctx
);
653 int lttng_add_migratable_to_ctx(struct lttng_ctx
**ctx
)
658 #if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
659 int lttng_add_perf_counter_to_ctx(uint32_t type
,
662 struct lttng_ctx
**ctx
);
665 int lttng_add_perf_counter_to_ctx(uint32_t type
,
668 struct lttng_ctx
**ctx
)
674 int lttng_logger_init(void);
675 void lttng_logger_exit(void);
677 extern int lttng_statedump_start(struct lttng_session
*session
);
679 #ifdef CONFIG_KPROBES
680 int lttng_kprobes_register(const char *name
,
681 const char *symbol_name
,
684 struct lttng_event
*event
);
685 void lttng_kprobes_unregister(struct lttng_event
*event
);
686 void lttng_kprobes_destroy_private(struct lttng_event
*event
);
689 int lttng_kprobes_register(const char *name
,
690 const char *symbol_name
,
693 struct lttng_event
*event
)
699 void lttng_kprobes_unregister(struct lttng_event
*event
)
704 void lttng_kprobes_destroy_private(struct lttng_event
*event
)
709 #ifdef CONFIG_KRETPROBES
710 int lttng_kretprobes_register(const char *name
,
711 const char *symbol_name
,
714 struct lttng_event
*event_entry
,
715 struct lttng_event
*event_exit
);
716 void lttng_kretprobes_unregister(struct lttng_event
*event
);
717 void lttng_kretprobes_destroy_private(struct lttng_event
*event
);
718 int lttng_kretprobes_event_enable_state(struct lttng_event
*event
,
722 int lttng_kretprobes_register(const char *name
,
723 const char *symbol_name
,
726 struct lttng_event
*event_entry
,
727 struct lttng_event
*event_exit
)
733 void lttng_kretprobes_unregister(struct lttng_event
*event
)
738 void lttng_kretprobes_destroy_private(struct lttng_event
*event
)
743 int lttng_kretprobes_event_enable_state(struct lttng_event
*event
,
750 #ifdef CONFIG_DYNAMIC_FTRACE
751 int lttng_ftrace_register(const char *name
,
752 const char *symbol_name
,
753 struct lttng_event
*event
);
754 void lttng_ftrace_unregister(struct lttng_event
*event
);
755 void lttng_ftrace_destroy_private(struct lttng_event
*event
);
758 int lttng_ftrace_register(const char *name
,
759 const char *symbol_name
,
760 struct lttng_event
*event
)
766 void lttng_ftrace_unregister(struct lttng_event
*event
)
771 void lttng_ftrace_destroy_private(struct lttng_event
*event
)
776 int lttng_calibrate(struct lttng_kernel_calibrate
*calibrate
);
778 extern const struct file_operations lttng_tracepoint_list_fops
;
779 extern const struct file_operations lttng_syscall_list_fops
;
781 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
782 #define TRACEPOINT_HAS_DATA_ARG
785 #endif /* _LTTNG_EVENTS_H */