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 */
53 atype_array_compound
, /* Array of compound types. */
54 atype_sequence_compound
, /* Sequence of compound types. */
58 enum lttng_string_encodings
{
59 lttng_encode_none
= 0,
60 lttng_encode_UTF8
= 1,
61 lttng_encode_ASCII
= 2,
70 struct lttng_enum_entry
{
71 unsigned long long start
, end
; /* start and end are inclusive */
75 #define __type_integer(_type, _size, _alignment, _signedness, \
76 _byte_order, _base, _encoding) \
78 .atype = atype_integer, \
81 .size = (_size) ? : sizeof(_type) * CHAR_BIT, \
82 .alignment = (_alignment) ? : lttng_alignof(_type) * CHAR_BIT, \
83 .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \
84 .reverse_byte_order = _byte_order != __BYTE_ORDER, \
86 .encoding = lttng_encode_##_encoding, \
90 struct lttng_integer_type {
91 unsigned int size
; /* in bits */
92 unsigned short alignment
; /* in bits */
93 unsigned int signedness
:1,
95 unsigned int base
; /* 2, 8, 10, 16, for pretty print */
96 enum lttng_string_encodings encoding
;
99 union _lttng_basic_type
{
100 struct lttng_integer_type integer
;
105 enum lttng_string_encodings encoding
;
109 struct lttng_basic_type
{
110 enum abstract_types atype
;
112 union _lttng_basic_type basic
;
117 enum abstract_types atype
;
119 union _lttng_basic_type basic
;
121 struct lttng_basic_type elem_type
;
122 unsigned int length
; /* num. elems. */
123 unsigned int elem_alignment
; /* alignment override */
126 struct lttng_basic_type length_type
;
127 struct lttng_basic_type elem_type
;
128 unsigned int elem_alignment
; /* alignment override */
132 struct lttng_event_field
*fields
; /* Array of fields. */
135 struct lttng_type
*elem_type
;
136 unsigned int length
; /* num. elems. */
139 struct lttng_type
*elem_type
;
140 const char *length_name
;
147 struct lttng_type container_type
;
148 const struct lttng_enum_entry
*entries
;
152 /* Event field description */
154 struct lttng_event_field
{
156 struct lttng_type type
;
157 unsigned int nowrite
:1, /* do not write into trace */
158 user
:1; /* fetch from user-space */
161 union lttng_ctx_value
{
168 * We need to keep this perf counter field separately from struct
169 * lttng_ctx_field because cpu hotplug needs fixed-location addresses.
171 struct lttng_perf_counter_field
{
172 struct notifier_block nb
;
174 struct perf_event_attr
*attr
;
175 struct perf_event
**e
; /* per-cpu array */
178 struct lttng_probe_ctx
{
179 struct lttng_event
*event
;
180 uint8_t interruptible
;
183 struct lttng_ctx_field
{
184 struct lttng_event_field event_field
;
185 size_t (*get_size
)(size_t offset
);
186 void (*record
)(struct lttng_ctx_field
*field
,
187 struct lib_ring_buffer_ctx
*ctx
,
188 struct lttng_channel
*chan
);
189 void (*get_value
)(struct lttng_ctx_field
*field
,
190 struct lttng_probe_ctx
*lttng_probe_ctx
,
191 union lttng_ctx_value
*value
);
193 struct lttng_perf_counter_field
*perf_counter
;
195 void (*destroy
)(struct lttng_ctx_field
*field
);
199 struct lttng_ctx_field
*fields
;
200 unsigned int nr_fields
;
201 unsigned int allocated_fields
;
202 size_t largest_align
; /* in bytes */
205 struct lttng_event_desc
{
206 const char *name
; /* lttng-modules name */
207 const char *kname
; /* Linux kernel name (tracepoints) */
208 void *probe_callback
;
209 const struct lttng_event_ctx
*ctx
; /* context */
210 const struct lttng_event_field
*fields
; /* event payload */
211 unsigned int nr_fields
;
212 struct module
*owner
;
215 struct lttng_probe_desc
{
216 const char *provider
;
217 const struct lttng_event_desc
**event_desc
;
218 unsigned int nr_events
;
219 struct list_head head
; /* chain registered probes */
220 struct list_head lazy_init_head
;
221 int lazy
; /* lazy registration */
224 struct lttng_krp
; /* Kretprobe handling */
226 enum lttng_event_type
{
227 LTTNG_TYPE_EVENT
= 0,
228 LTTNG_TYPE_ENABLER
= 1,
231 struct lttng_filter_bytecode_node
{
232 struct list_head node
;
233 struct lttng_enabler
*enabler
;
235 * struct lttng_kernel_filter_bytecode has var. sized array, must be
238 struct lttng_kernel_filter_bytecode bc
;
242 * Filter return value masks.
244 enum lttng_filter_ret
{
245 LTTNG_FILTER_DISCARD
= 0,
246 LTTNG_FILTER_RECORD_FLAG
= (1ULL << 0),
247 /* Other bits are kept for future use. */
250 struct lttng_bytecode_runtime
{
251 /* Associated bytecode */
252 struct lttng_filter_bytecode_node
*bc
;
253 uint64_t (*filter
)(void *filter_data
, struct lttng_probe_ctx
*lttng_probe_ctx
,
254 const char *filter_stack_data
);
256 struct list_head node
; /* list of bytecode runtime in event */
260 * Objects in a linked-list of enablers, owned by an event.
262 struct lttng_enabler_ref
{
263 struct list_head node
; /* enabler ref list */
264 struct lttng_enabler
*ref
; /* backward ref */
268 * lttng_event structure is referred to by the tracing fast path. It must be
272 enum lttng_event_type evtype
; /* First field. */
274 struct lttng_channel
*chan
;
276 const struct lttng_event_desc
*desc
;
278 struct lttng_ctx
*ctx
;
279 enum lttng_kernel_instrumentation instrumentation
;
286 struct lttng_krp
*lttng_krp
;
293 struct list_head list
; /* Event list in session */
294 unsigned int metadata_dumped
:1;
296 /* Backward references: list of lttng_enabler_ref (ref to enablers) */
297 struct list_head enablers_ref_head
;
298 struct hlist_node hlist
; /* session ht of events */
299 int registered
; /* has reg'd tracepoint probe */
300 /* list of struct lttng_bytecode_runtime, sorted by seqnum */
301 struct list_head bytecode_runtime_head
;
302 int has_enablers_without_bytecode
;
305 enum lttng_enabler_type
{
306 LTTNG_ENABLER_WILDCARD
,
311 * Enabler field, within whatever object is enabling an event. Target of
312 * backward reference.
314 struct lttng_enabler
{
315 enum lttng_event_type evtype
; /* First field. */
317 enum lttng_enabler_type type
;
319 struct list_head node
; /* per-session list of enablers */
320 /* head list of struct lttng_ust_filter_bytecode_node */
321 struct list_head filter_bytecode_head
;
323 struct lttng_kernel_event event_param
;
324 struct lttng_channel
*chan
;
325 struct lttng_ctx
*ctx
;
326 unsigned int enabled
:1;
329 struct lttng_channel_ops
{
330 struct channel
*(*channel_create
)(const char *name
,
331 struct lttng_channel
*lttng_chan
,
333 size_t subbuf_size
, size_t num_subbuf
,
334 unsigned int switch_timer_interval
,
335 unsigned int read_timer_interval
);
336 void (*channel_destroy
)(struct channel
*chan
);
337 struct lib_ring_buffer
*(*buffer_read_open
)(struct channel
*chan
);
338 int (*buffer_has_read_closed_stream
)(struct channel
*chan
);
339 void (*buffer_read_close
)(struct lib_ring_buffer
*buf
);
340 int (*event_reserve
)(struct lib_ring_buffer_ctx
*ctx
,
342 void (*event_commit
)(struct lib_ring_buffer_ctx
*ctx
);
343 void (*event_write
)(struct lib_ring_buffer_ctx
*ctx
, const void *src
,
345 void (*event_write_from_user
)(struct lib_ring_buffer_ctx
*ctx
,
346 const void *src
, size_t len
);
347 void (*event_memset
)(struct lib_ring_buffer_ctx
*ctx
,
349 void (*event_strcpy
)(struct lib_ring_buffer_ctx
*ctx
, const char *src
,
351 void (*event_strcpy_from_user
)(struct lib_ring_buffer_ctx
*ctx
,
352 const char __user
*src
, size_t len
);
354 * packet_avail_size returns the available size in the current
355 * packet. Note that the size returned is only a hint, since it
356 * may change due to concurrent writes.
358 size_t (*packet_avail_size
)(struct channel
*chan
);
359 wait_queue_head_t
*(*get_writer_buf_wait_queue
)(struct channel
*chan
, int cpu
);
360 wait_queue_head_t
*(*get_hp_wait_queue
)(struct channel
*chan
);
361 int (*is_finalized
)(struct channel
*chan
);
362 int (*is_disabled
)(struct channel
*chan
);
363 int (*timestamp_begin
) (const struct lib_ring_buffer_config
*config
,
364 struct lib_ring_buffer
*bufb
,
365 uint64_t *timestamp_begin
);
366 int (*timestamp_end
) (const struct lib_ring_buffer_config
*config
,
367 struct lib_ring_buffer
*bufb
,
368 uint64_t *timestamp_end
);
369 int (*events_discarded
) (const struct lib_ring_buffer_config
*config
,
370 struct lib_ring_buffer
*bufb
,
371 uint64_t *events_discarded
);
372 int (*content_size
) (const struct lib_ring_buffer_config
*config
,
373 struct lib_ring_buffer
*bufb
,
374 uint64_t *content_size
);
375 int (*packet_size
) (const struct lib_ring_buffer_config
*config
,
376 struct lib_ring_buffer
*bufb
,
377 uint64_t *packet_size
);
378 int (*stream_id
) (const struct lib_ring_buffer_config
*config
,
379 struct lib_ring_buffer
*bufb
,
380 uint64_t *stream_id
);
381 int (*current_timestamp
) (const struct lib_ring_buffer_config
*config
,
382 struct lib_ring_buffer
*bufb
,
384 int (*sequence_number
) (const struct lib_ring_buffer_config
*config
,
385 struct lib_ring_buffer
*bufb
,
387 int (*instance_id
) (const struct lib_ring_buffer_config
*config
,
388 struct lib_ring_buffer
*bufb
,
392 struct lttng_transport
{
394 struct module
*owner
;
395 struct list_head node
;
396 struct lttng_channel_ops ops
;
399 struct lttng_syscall_filter
;
401 #define LTTNG_EVENT_HT_BITS 12
402 #define LTTNG_EVENT_HT_SIZE (1U << LTTNG_EVENT_HT_BITS)
404 struct lttng_event_ht
{
405 struct hlist_head table
[LTTNG_EVENT_HT_SIZE
];
408 struct lttng_channel
{
410 struct channel
*chan
; /* Channel buffers */
412 struct lttng_ctx
*ctx
;
413 /* Event ID management */
414 struct lttng_session
*session
;
415 struct file
*file
; /* File associated to channel */
416 unsigned int free_event_id
; /* Next event ID to allocate */
417 struct list_head list
; /* Channel list */
418 struct lttng_channel_ops
*ops
;
419 struct lttng_transport
*transport
;
420 struct lttng_event
**sc_table
; /* for syscall tracing */
421 struct lttng_event
**compat_sc_table
;
422 struct lttng_event
**sc_exit_table
; /* for syscall exit tracing */
423 struct lttng_event
**compat_sc_exit_table
;
424 struct lttng_event
*sc_unknown
; /* for unknown syscalls */
425 struct lttng_event
*sc_compat_unknown
;
426 struct lttng_event
*sc_exit_unknown
;
427 struct lttng_event
*compat_sc_exit_unknown
;
428 struct lttng_syscall_filter
*sc_filter
;
429 int header_type
; /* 0: unset, 1: compact, 2: large */
430 enum channel_type channel_type
;
431 unsigned int metadata_dumped
:1,
432 sys_enter_registered
:1,
433 sys_exit_registered
:1,
435 tstate
:1; /* Transient enable state */
438 struct lttng_metadata_stream
{
439 void *priv
; /* Ring buffer private data */
440 struct lttng_metadata_cache
*metadata_cache
;
441 unsigned int metadata_in
; /* Bytes read from the cache */
442 unsigned int metadata_out
; /* Bytes consumed from stream */
443 int finalized
; /* Has channel been finalized */
444 wait_queue_head_t read_wait
; /* Reader buffer-level wait queue */
445 struct list_head list
; /* Stream list */
446 struct lttng_transport
*transport
;
447 uint64_t version
; /* Current version of the metadata cache */
450 #define LTTNG_DYNAMIC_LEN_STACK_SIZE 128
452 struct lttng_dynamic_len_stack
{
453 size_t stack
[LTTNG_DYNAMIC_LEN_STACK_SIZE
];
457 DECLARE_PER_CPU(struct lttng_dynamic_len_stack
, lttng_dynamic_len_stack
);
460 * struct lttng_pid_tracker declared in header due to deferencing of *v
461 * in RCU_INITIALIZER(v).
463 #define LTTNG_PID_HASH_BITS 6
464 #define LTTNG_PID_TABLE_SIZE (1 << LTTNG_PID_HASH_BITS)
466 struct lttng_pid_tracker
{
467 struct hlist_head pid_hash
[LTTNG_PID_TABLE_SIZE
];
470 struct lttng_pid_hash_node
{
471 struct hlist_node hlist
;
475 struct lttng_session
{
476 int active
; /* Is trace session active ? */
477 int been_active
; /* Has trace session been active ? */
478 struct file
*file
; /* File associated to session */
479 struct list_head chan
; /* Channel list head */
480 struct list_head events
; /* Event list head */
481 struct list_head list
; /* Session list */
482 unsigned int free_chan_id
; /* Next chan ID to allocate */
483 uuid_le uuid
; /* Trace session unique ID */
484 struct lttng_metadata_cache
*metadata_cache
;
485 struct lttng_pid_tracker
*pid_tracker
;
486 unsigned int metadata_dumped
:1,
487 tstate
:1; /* Transient enable state */
488 /* List of enablers */
489 struct list_head enablers_head
;
490 /* Hash table of events */
491 struct lttng_event_ht events_ht
;
494 struct lttng_metadata_cache
{
495 char *data
; /* Metadata cache */
496 unsigned int cache_alloc
; /* Metadata allocated size (bytes) */
497 unsigned int metadata_written
; /* Number of bytes written in metadata cache */
498 struct kref refcount
; /* Metadata cache usage */
499 struct list_head metadata_stream
; /* Metadata stream list */
500 uuid_le uuid
; /* Trace session unique ID (copy) */
501 struct mutex lock
; /* Produce/consume lock */
502 uint64_t version
; /* Current version of the metadata */
505 void lttng_lock_sessions(void);
506 void lttng_unlock_sessions(void);
508 struct list_head
*lttng_get_probe_list_head(void);
510 struct lttng_enabler
*lttng_enabler_create(enum lttng_enabler_type type
,
511 struct lttng_kernel_event
*event_param
,
512 struct lttng_channel
*chan
);
514 int lttng_enabler_enable(struct lttng_enabler
*enabler
);
515 int lttng_enabler_disable(struct lttng_enabler
*enabler
);
516 int lttng_fix_pending_events(void);
517 int lttng_session_active(void);
519 struct lttng_session
*lttng_session_create(void);
520 int lttng_session_enable(struct lttng_session
*session
);
521 int lttng_session_disable(struct lttng_session
*session
);
522 void lttng_session_destroy(struct lttng_session
*session
);
523 int lttng_session_metadata_regenerate(struct lttng_session
*session
);
524 void metadata_cache_destroy(struct kref
*kref
);
526 struct lttng_channel
*lttng_channel_create(struct lttng_session
*session
,
527 const char *transport_name
,
529 size_t subbuf_size
, size_t num_subbuf
,
530 unsigned int switch_timer_interval
,
531 unsigned int read_timer_interval
,
532 enum channel_type channel_type
);
533 struct lttng_channel
*lttng_global_channel_create(struct lttng_session
*session
,
534 int overwrite
, void *buf_addr
,
535 size_t subbuf_size
, size_t num_subbuf
,
536 unsigned int switch_timer_interval
,
537 unsigned int read_timer_interval
);
539 void lttng_metadata_channel_destroy(struct lttng_channel
*chan
);
540 struct lttng_event
*lttng_event_create(struct lttng_channel
*chan
,
541 struct lttng_kernel_event
*event_param
,
543 const struct lttng_event_desc
*event_desc
,
544 enum lttng_kernel_instrumentation itype
);
545 struct lttng_event
*_lttng_event_create(struct lttng_channel
*chan
,
546 struct lttng_kernel_event
*event_param
,
548 const struct lttng_event_desc
*event_desc
,
549 enum lttng_kernel_instrumentation itype
);
550 struct lttng_event
*lttng_event_compat_old_create(struct lttng_channel
*chan
,
551 struct lttng_kernel_old_event
*old_event_param
,
553 const struct lttng_event_desc
*internal_desc
);
555 int lttng_channel_enable(struct lttng_channel
*channel
);
556 int lttng_channel_disable(struct lttng_channel
*channel
);
557 int lttng_event_enable(struct lttng_event
*event
);
558 int lttng_event_disable(struct lttng_event
*event
);
560 void lttng_transport_register(struct lttng_transport
*transport
);
561 void lttng_transport_unregister(struct lttng_transport
*transport
);
563 void synchronize_trace(void);
564 int lttng_abi_init(void);
565 int lttng_abi_compat_old_init(void);
566 void lttng_abi_exit(void);
567 void lttng_abi_compat_old_exit(void);
569 int lttng_probe_register(struct lttng_probe_desc
*desc
);
570 void lttng_probe_unregister(struct lttng_probe_desc
*desc
);
571 const struct lttng_event_desc
*lttng_event_get(const char *name
);
572 void lttng_event_put(const struct lttng_event_desc
*desc
);
573 int lttng_probes_init(void);
574 void lttng_probes_exit(void);
576 int lttng_metadata_output_channel(struct lttng_metadata_stream
*stream
,
577 struct channel
*chan
);
579 int lttng_pid_tracker_get_node_pid(const struct lttng_pid_hash_node
*node
);
580 struct lttng_pid_tracker
*lttng_pid_tracker_create(void);
581 void lttng_pid_tracker_destroy(struct lttng_pid_tracker
*lpf
);
582 bool lttng_pid_tracker_lookup(struct lttng_pid_tracker
*lpf
, int pid
);
583 int lttng_pid_tracker_add(struct lttng_pid_tracker
*lpf
, int pid
);
584 int lttng_pid_tracker_del(struct lttng_pid_tracker
*lpf
, int pid
);
586 int lttng_session_track_pid(struct lttng_session
*session
, int pid
);
587 int lttng_session_untrack_pid(struct lttng_session
*session
, int pid
);
589 int lttng_session_list_tracker_pids(struct lttng_session
*session
);
591 void lttng_clock_ref(void);
592 void lttng_clock_unref(void);
594 #if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
595 int lttng_syscalls_register(struct lttng_channel
*chan
, void *filter
);
596 int lttng_syscalls_unregister(struct lttng_channel
*chan
);
597 int lttng_syscall_filter_enable(struct lttng_channel
*chan
,
599 int lttng_syscall_filter_disable(struct lttng_channel
*chan
,
601 long lttng_channel_syscall_mask(struct lttng_channel
*channel
,
602 struct lttng_kernel_syscall_mask __user
*usyscall_mask
);
604 static inline int lttng_syscalls_register(struct lttng_channel
*chan
, void *filter
)
609 static inline int lttng_syscalls_unregister(struct lttng_channel
*chan
)
614 static inline int lttng_syscall_filter_enable(struct lttng_channel
*chan
,
620 static inline int lttng_syscall_filter_disable(struct lttng_channel
*chan
,
626 static inline long lttng_channel_syscall_mask(struct lttng_channel
*channel
,
627 struct lttng_kernel_syscall_mask __user
*usyscall_mask
)
633 void lttng_filter_sync_state(struct lttng_bytecode_runtime
*runtime
);
634 int lttng_enabler_attach_bytecode(struct lttng_enabler
*enabler
,
635 struct lttng_kernel_filter_bytecode __user
*bytecode
);
636 void lttng_enabler_event_link_bytecode(struct lttng_event
*event
,
637 struct lttng_enabler
*enabler
);
639 int lttng_probes_init(void);
641 extern struct lttng_ctx
*lttng_static_ctx
;
643 int lttng_context_init(void);
644 void lttng_context_exit(void);
645 struct lttng_ctx_field
*lttng_append_context(struct lttng_ctx
**ctx
);
646 void lttng_context_update(struct lttng_ctx
*ctx
);
647 int lttng_find_context(struct lttng_ctx
*ctx
, const char *name
);
648 int lttng_get_context_index(struct lttng_ctx
*ctx
, const char *name
);
649 void lttng_remove_context_field(struct lttng_ctx
**ctx
,
650 struct lttng_ctx_field
*field
);
651 void lttng_destroy_context(struct lttng_ctx
*ctx
);
652 int lttng_add_pid_to_ctx(struct lttng_ctx
**ctx
);
653 int lttng_add_cpu_id_to_ctx(struct lttng_ctx
**ctx
);
654 int lttng_add_procname_to_ctx(struct lttng_ctx
**ctx
);
655 int lttng_add_prio_to_ctx(struct lttng_ctx
**ctx
);
656 int lttng_add_nice_to_ctx(struct lttng_ctx
**ctx
);
657 int lttng_add_vpid_to_ctx(struct lttng_ctx
**ctx
);
658 int lttng_add_tid_to_ctx(struct lttng_ctx
**ctx
);
659 int lttng_add_vtid_to_ctx(struct lttng_ctx
**ctx
);
660 int lttng_add_ppid_to_ctx(struct lttng_ctx
**ctx
);
661 int lttng_add_vppid_to_ctx(struct lttng_ctx
**ctx
);
662 int lttng_add_hostname_to_ctx(struct lttng_ctx
**ctx
);
663 int lttng_add_interruptible_to_ctx(struct lttng_ctx
**ctx
);
664 int lttng_add_need_reschedule_to_ctx(struct lttng_ctx
**ctx
);
665 #if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT)
666 int lttng_add_preemptible_to_ctx(struct lttng_ctx
**ctx
);
669 int lttng_add_preemptible_to_ctx(struct lttng_ctx
**ctx
)
674 #ifdef CONFIG_PREEMPT_RT_FULL
675 int lttng_add_migratable_to_ctx(struct lttng_ctx
**ctx
);
678 int lttng_add_migratable_to_ctx(struct lttng_ctx
**ctx
)
683 #if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
684 int lttng_add_perf_counter_to_ctx(uint32_t type
,
687 struct lttng_ctx
**ctx
);
690 int lttng_add_perf_counter_to_ctx(uint32_t type
,
693 struct lttng_ctx
**ctx
)
699 int lttng_logger_init(void);
700 void lttng_logger_exit(void);
702 extern int lttng_statedump_start(struct lttng_session
*session
);
704 #ifdef CONFIG_KPROBES
705 int lttng_kprobes_register(const char *name
,
706 const char *symbol_name
,
709 struct lttng_event
*event
);
710 void lttng_kprobes_unregister(struct lttng_event
*event
);
711 void lttng_kprobes_destroy_private(struct lttng_event
*event
);
714 int lttng_kprobes_register(const char *name
,
715 const char *symbol_name
,
718 struct lttng_event
*event
)
724 void lttng_kprobes_unregister(struct lttng_event
*event
)
729 void lttng_kprobes_destroy_private(struct lttng_event
*event
)
734 #ifdef CONFIG_KRETPROBES
735 int lttng_kretprobes_register(const char *name
,
736 const char *symbol_name
,
739 struct lttng_event
*event_entry
,
740 struct lttng_event
*event_exit
);
741 void lttng_kretprobes_unregister(struct lttng_event
*event
);
742 void lttng_kretprobes_destroy_private(struct lttng_event
*event
);
743 int lttng_kretprobes_event_enable_state(struct lttng_event
*event
,
747 int lttng_kretprobes_register(const char *name
,
748 const char *symbol_name
,
751 struct lttng_event
*event_entry
,
752 struct lttng_event
*event_exit
)
758 void lttng_kretprobes_unregister(struct lttng_event
*event
)
763 void lttng_kretprobes_destroy_private(struct lttng_event
*event
)
768 int lttng_kretprobes_event_enable_state(struct lttng_event
*event
,
775 #ifdef CONFIG_DYNAMIC_FTRACE
776 int lttng_ftrace_register(const char *name
,
777 const char *symbol_name
,
778 struct lttng_event
*event
);
779 void lttng_ftrace_unregister(struct lttng_event
*event
);
780 void lttng_ftrace_destroy_private(struct lttng_event
*event
);
783 int lttng_ftrace_register(const char *name
,
784 const char *symbol_name
,
785 struct lttng_event
*event
)
791 void lttng_ftrace_unregister(struct lttng_event
*event
)
796 void lttng_ftrace_destroy_private(struct lttng_event
*event
)
801 int lttng_calibrate(struct lttng_kernel_calibrate
*calibrate
);
803 extern const struct file_operations lttng_tracepoint_list_fops
;
804 extern const struct file_operations lttng_syscall_list_fops
;
806 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
807 #define TRACEPOINT_HAS_DATA_ARG
810 #endif /* _LTTNG_EVENTS_H */