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 <lttng-cpuhotplug.h>
31 #include <wrapper/uuid.h>
32 #include <lttng-abi.h>
33 #include <lttng-abi-old.h>
35 #define lttng_is_signed_type(type) (((type)(-1)) < 0)
39 struct lttng_metadata_cache
;
40 struct lib_ring_buffer_ctx
;
42 struct perf_event_attr
;
43 struct lib_ring_buffer_config
;
45 /* Type description */
56 enum lttng_string_encodings
{
57 lttng_encode_none
= 0,
58 lttng_encode_UTF8
= 1,
59 lttng_encode_ASCII
= 2,
68 struct lttng_enum_entry
{
69 unsigned long long start
, end
; /* start and end are inclusive */
73 #define __type_integer(_type, _size, _alignment, _signedness, \
74 _byte_order, _base, _encoding) \
76 .atype = atype_integer, \
79 .size = (_size) ? : sizeof(_type) * CHAR_BIT, \
80 .alignment = (_alignment) ? : lttng_alignof(_type) * CHAR_BIT, \
81 .signedness = (_signedness) >= 0 ? (_signedness) : lttng_is_signed_type(_type), \
82 .reverse_byte_order = _byte_order != __BYTE_ORDER, \
84 .encoding = lttng_encode_##_encoding, \
88 struct lttng_integer_type {
89 unsigned int size
; /* in bits */
90 unsigned short alignment
; /* in bits */
91 unsigned int signedness
:1,
93 unsigned int base
; /* 2, 8, 10, 16, for pretty print */
94 enum lttng_string_encodings encoding
;
97 union _lttng_basic_type
{
98 struct lttng_integer_type integer
;
103 enum lttng_string_encodings encoding
;
107 struct lttng_basic_type
{
108 enum abstract_types atype
;
110 union _lttng_basic_type basic
;
115 enum abstract_types atype
;
117 union _lttng_basic_type basic
;
119 struct lttng_basic_type elem_type
;
120 unsigned int length
; /* num. elems. */
121 unsigned int elem_alignment
; /* alignment override */
124 struct lttng_basic_type length_type
;
125 struct lttng_basic_type elem_type
;
126 unsigned int elem_alignment
; /* alignment override */
133 struct lttng_type container_type
;
134 const struct lttng_enum_entry
*entries
;
138 /* Event field description */
140 struct lttng_event_field
{
142 struct lttng_type type
;
143 unsigned int nowrite
:1, /* do not write into trace */
144 user
:1; /* fetch from user-space */
147 union lttng_ctx_value
{
154 * We need to keep this perf counter field separately from struct
155 * lttng_ctx_field because cpu hotplug needs fixed-location addresses.
157 struct lttng_perf_counter_field
{
158 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
159 struct lttng_cpuhp_node cpuhp_prepare
;
160 struct lttng_cpuhp_node cpuhp_online
;
162 struct notifier_block nb
;
165 struct perf_event_attr
*attr
;
166 struct perf_event
**e
; /* per-cpu array */
169 struct lttng_probe_ctx
{
170 struct lttng_event
*event
;
171 uint8_t interruptible
;
174 struct lttng_ctx_field
{
175 struct lttng_event_field event_field
;
176 size_t (*get_size
)(size_t offset
);
177 void (*record
)(struct lttng_ctx_field
*field
,
178 struct lib_ring_buffer_ctx
*ctx
,
179 struct lttng_channel
*chan
);
180 void (*get_value
)(struct lttng_ctx_field
*field
,
181 struct lttng_probe_ctx
*lttng_probe_ctx
,
182 union lttng_ctx_value
*value
);
184 struct lttng_perf_counter_field
*perf_counter
;
186 void (*destroy
)(struct lttng_ctx_field
*field
);
190 struct lttng_ctx_field
*fields
;
191 unsigned int nr_fields
;
192 unsigned int allocated_fields
;
193 size_t largest_align
; /* in bytes */
196 struct lttng_event_desc
{
197 const char *name
; /* lttng-modules name */
198 const char *kname
; /* Linux kernel name (tracepoints) */
199 void *probe_callback
;
200 const struct lttng_event_ctx
*ctx
; /* context */
201 const struct lttng_event_field
*fields
; /* event payload */
202 unsigned int nr_fields
;
203 struct module
*owner
;
206 struct lttng_probe_desc
{
207 const char *provider
;
208 const struct lttng_event_desc
**event_desc
;
209 unsigned int nr_events
;
210 struct list_head head
; /* chain registered probes */
211 struct list_head lazy_init_head
;
212 int lazy
; /* lazy registration */
215 struct lttng_krp
; /* Kretprobe handling */
217 enum lttng_event_type
{
218 LTTNG_TYPE_EVENT
= 0,
219 LTTNG_TYPE_ENABLER
= 1,
222 struct lttng_filter_bytecode_node
{
223 struct list_head node
;
224 struct lttng_enabler
*enabler
;
226 * struct lttng_kernel_filter_bytecode has var. sized array, must be
229 struct lttng_kernel_filter_bytecode bc
;
233 * Filter return value masks.
235 enum lttng_filter_ret
{
236 LTTNG_FILTER_DISCARD
= 0,
237 LTTNG_FILTER_RECORD_FLAG
= (1ULL << 0),
238 /* Other bits are kept for future use. */
241 struct lttng_bytecode_runtime
{
242 /* Associated bytecode */
243 struct lttng_filter_bytecode_node
*bc
;
244 uint64_t (*filter
)(void *filter_data
, struct lttng_probe_ctx
*lttng_probe_ctx
,
245 const char *filter_stack_data
);
247 struct list_head node
; /* list of bytecode runtime in event */
251 * Objects in a linked-list of enablers, owned by an event.
253 struct lttng_enabler_ref
{
254 struct list_head node
; /* enabler ref list */
255 struct lttng_enabler
*ref
; /* backward ref */
259 * lttng_event structure is referred to by the tracing fast path. It must be
263 enum lttng_event_type evtype
; /* First field. */
265 struct lttng_channel
*chan
;
267 const struct lttng_event_desc
*desc
;
269 struct lttng_ctx
*ctx
;
270 enum lttng_kernel_instrumentation instrumentation
;
277 struct lttng_krp
*lttng_krp
;
284 struct list_head list
; /* Event list in session */
285 unsigned int metadata_dumped
:1;
287 /* Backward references: list of lttng_enabler_ref (ref to enablers) */
288 struct list_head enablers_ref_head
;
289 struct hlist_node hlist
; /* session ht of events */
290 int registered
; /* has reg'd tracepoint probe */
291 /* list of struct lttng_bytecode_runtime, sorted by seqnum */
292 struct list_head bytecode_runtime_head
;
293 int has_enablers_without_bytecode
;
296 enum lttng_enabler_type
{
297 LTTNG_ENABLER_WILDCARD
,
302 * Enabler field, within whatever object is enabling an event. Target of
303 * backward reference.
305 struct lttng_enabler
{
306 enum lttng_event_type evtype
; /* First field. */
308 enum lttng_enabler_type type
;
310 struct list_head node
; /* per-session list of enablers */
311 /* head list of struct lttng_ust_filter_bytecode_node */
312 struct list_head filter_bytecode_head
;
314 struct lttng_kernel_event event_param
;
315 struct lttng_channel
*chan
;
316 struct lttng_ctx
*ctx
;
317 unsigned int enabled
:1;
320 struct lttng_channel_ops
{
321 struct channel
*(*channel_create
)(const char *name
,
322 struct lttng_channel
*lttng_chan
,
324 size_t subbuf_size
, size_t num_subbuf
,
325 unsigned int switch_timer_interval
,
326 unsigned int read_timer_interval
);
327 void (*channel_destroy
)(struct channel
*chan
);
328 struct lib_ring_buffer
*(*buffer_read_open
)(struct channel
*chan
);
329 int (*buffer_has_read_closed_stream
)(struct channel
*chan
);
330 void (*buffer_read_close
)(struct lib_ring_buffer
*buf
);
331 int (*event_reserve
)(struct lib_ring_buffer_ctx
*ctx
,
333 void (*event_commit
)(struct lib_ring_buffer_ctx
*ctx
);
334 void (*event_write
)(struct lib_ring_buffer_ctx
*ctx
, const void *src
,
336 void (*event_write_from_user
)(struct lib_ring_buffer_ctx
*ctx
,
337 const void *src
, size_t len
);
338 void (*event_memset
)(struct lib_ring_buffer_ctx
*ctx
,
340 void (*event_strcpy
)(struct lib_ring_buffer_ctx
*ctx
, const char *src
,
342 void (*event_strcpy_from_user
)(struct lib_ring_buffer_ctx
*ctx
,
343 const char __user
*src
, size_t len
);
345 * packet_avail_size returns the available size in the current
346 * packet. Note that the size returned is only a hint, since it
347 * may change due to concurrent writes.
349 size_t (*packet_avail_size
)(struct channel
*chan
);
350 wait_queue_head_t
*(*get_writer_buf_wait_queue
)(struct channel
*chan
, int cpu
);
351 wait_queue_head_t
*(*get_hp_wait_queue
)(struct channel
*chan
);
352 int (*is_finalized
)(struct channel
*chan
);
353 int (*is_disabled
)(struct channel
*chan
);
354 int (*timestamp_begin
) (const struct lib_ring_buffer_config
*config
,
355 struct lib_ring_buffer
*bufb
,
356 uint64_t *timestamp_begin
);
357 int (*timestamp_end
) (const struct lib_ring_buffer_config
*config
,
358 struct lib_ring_buffer
*bufb
,
359 uint64_t *timestamp_end
);
360 int (*events_discarded
) (const struct lib_ring_buffer_config
*config
,
361 struct lib_ring_buffer
*bufb
,
362 uint64_t *events_discarded
);
363 int (*content_size
) (const struct lib_ring_buffer_config
*config
,
364 struct lib_ring_buffer
*bufb
,
365 uint64_t *content_size
);
366 int (*packet_size
) (const struct lib_ring_buffer_config
*config
,
367 struct lib_ring_buffer
*bufb
,
368 uint64_t *packet_size
);
369 int (*stream_id
) (const struct lib_ring_buffer_config
*config
,
370 struct lib_ring_buffer
*bufb
,
371 uint64_t *stream_id
);
372 int (*current_timestamp
) (const struct lib_ring_buffer_config
*config
,
373 struct lib_ring_buffer
*bufb
,
375 int (*sequence_number
) (const struct lib_ring_buffer_config
*config
,
376 struct lib_ring_buffer
*bufb
,
378 int (*instance_id
) (const struct lib_ring_buffer_config
*config
,
379 struct lib_ring_buffer
*bufb
,
383 struct lttng_transport
{
385 struct module
*owner
;
386 struct list_head node
;
387 struct lttng_channel_ops ops
;
390 struct lttng_syscall_filter
;
392 #define LTTNG_EVENT_HT_BITS 12
393 #define LTTNG_EVENT_HT_SIZE (1U << LTTNG_EVENT_HT_BITS)
395 struct lttng_event_ht
{
396 struct hlist_head table
[LTTNG_EVENT_HT_SIZE
];
399 struct lttng_channel
{
401 struct channel
*chan
; /* Channel buffers */
403 struct lttng_ctx
*ctx
;
404 /* Event ID management */
405 struct lttng_session
*session
;
406 struct file
*file
; /* File associated to channel */
407 unsigned int free_event_id
; /* Next event ID to allocate */
408 struct list_head list
; /* Channel list */
409 struct lttng_channel_ops
*ops
;
410 struct lttng_transport
*transport
;
411 struct lttng_event
**sc_table
; /* for syscall tracing */
412 struct lttng_event
**compat_sc_table
;
413 struct lttng_event
**sc_exit_table
; /* for syscall exit tracing */
414 struct lttng_event
**compat_sc_exit_table
;
415 struct lttng_event
*sc_unknown
; /* for unknown syscalls */
416 struct lttng_event
*sc_compat_unknown
;
417 struct lttng_event
*sc_exit_unknown
;
418 struct lttng_event
*compat_sc_exit_unknown
;
419 struct lttng_syscall_filter
*sc_filter
;
420 int header_type
; /* 0: unset, 1: compact, 2: large */
421 enum channel_type channel_type
;
422 unsigned int metadata_dumped
:1,
423 sys_enter_registered
:1,
424 sys_exit_registered
:1,
426 tstate
:1; /* Transient enable state */
429 struct lttng_metadata_stream
{
430 void *priv
; /* Ring buffer private data */
431 struct lttng_metadata_cache
*metadata_cache
;
432 unsigned int metadata_in
; /* Bytes read from the cache */
433 unsigned int metadata_out
; /* Bytes consumed from stream */
434 int finalized
; /* Has channel been finalized */
435 wait_queue_head_t read_wait
; /* Reader buffer-level wait queue */
436 struct list_head list
; /* Stream list */
437 struct lttng_transport
*transport
;
438 uint64_t version
; /* Current version of the metadata cache */
443 * struct lttng_pid_tracker declared in header due to deferencing of *v
444 * in RCU_INITIALIZER(v).
446 #define LTTNG_PID_HASH_BITS 6
447 #define LTTNG_PID_TABLE_SIZE (1 << LTTNG_PID_HASH_BITS)
449 struct lttng_pid_tracker
{
450 struct hlist_head pid_hash
[LTTNG_PID_TABLE_SIZE
];
453 struct lttng_pid_hash_node
{
454 struct hlist_node hlist
;
458 struct lttng_session
{
459 int active
; /* Is trace session active ? */
460 int been_active
; /* Has trace session been active ? */
461 struct file
*file
; /* File associated to session */
462 struct list_head chan
; /* Channel list head */
463 struct list_head events
; /* Event list head */
464 struct list_head list
; /* Session list */
465 unsigned int free_chan_id
; /* Next chan ID to allocate */
466 uuid_le uuid
; /* Trace session unique ID */
467 struct lttng_metadata_cache
*metadata_cache
;
468 struct lttng_pid_tracker
*pid_tracker
;
469 unsigned int metadata_dumped
:1,
470 tstate
:1; /* Transient enable state */
471 /* List of enablers */
472 struct list_head enablers_head
;
473 /* Hash table of events */
474 struct lttng_event_ht events_ht
;
477 struct lttng_metadata_cache
{
478 char *data
; /* Metadata cache */
479 unsigned int cache_alloc
; /* Metadata allocated size (bytes) */
480 unsigned int metadata_written
; /* Number of bytes written in metadata cache */
481 struct kref refcount
; /* Metadata cache usage */
482 struct list_head metadata_stream
; /* Metadata stream list */
483 uuid_le uuid
; /* Trace session unique ID (copy) */
484 struct mutex lock
; /* Produce/consume lock */
485 uint64_t version
; /* Current version of the metadata */
488 void lttng_lock_sessions(void);
489 void lttng_unlock_sessions(void);
491 struct list_head
*lttng_get_probe_list_head(void);
493 struct lttng_enabler
*lttng_enabler_create(enum lttng_enabler_type type
,
494 struct lttng_kernel_event
*event_param
,
495 struct lttng_channel
*chan
);
497 int lttng_enabler_enable(struct lttng_enabler
*enabler
);
498 int lttng_enabler_disable(struct lttng_enabler
*enabler
);
499 int lttng_fix_pending_events(void);
500 int lttng_session_active(void);
502 struct lttng_session
*lttng_session_create(void);
503 int lttng_session_enable(struct lttng_session
*session
);
504 int lttng_session_disable(struct lttng_session
*session
);
505 void lttng_session_destroy(struct lttng_session
*session
);
506 int lttng_session_metadata_regenerate(struct lttng_session
*session
);
507 void metadata_cache_destroy(struct kref
*kref
);
509 struct lttng_channel
*lttng_channel_create(struct lttng_session
*session
,
510 const char *transport_name
,
512 size_t subbuf_size
, size_t num_subbuf
,
513 unsigned int switch_timer_interval
,
514 unsigned int read_timer_interval
,
515 enum channel_type channel_type
);
516 struct lttng_channel
*lttng_global_channel_create(struct lttng_session
*session
,
517 int overwrite
, void *buf_addr
,
518 size_t subbuf_size
, size_t num_subbuf
,
519 unsigned int switch_timer_interval
,
520 unsigned int read_timer_interval
);
522 void lttng_metadata_channel_destroy(struct lttng_channel
*chan
);
523 struct lttng_event
*lttng_event_create(struct lttng_channel
*chan
,
524 struct lttng_kernel_event
*event_param
,
526 const struct lttng_event_desc
*event_desc
,
527 enum lttng_kernel_instrumentation itype
);
528 struct lttng_event
*_lttng_event_create(struct lttng_channel
*chan
,
529 struct lttng_kernel_event
*event_param
,
531 const struct lttng_event_desc
*event_desc
,
532 enum lttng_kernel_instrumentation itype
);
533 struct lttng_event
*lttng_event_compat_old_create(struct lttng_channel
*chan
,
534 struct lttng_kernel_old_event
*old_event_param
,
536 const struct lttng_event_desc
*internal_desc
);
538 int lttng_channel_enable(struct lttng_channel
*channel
);
539 int lttng_channel_disable(struct lttng_channel
*channel
);
540 int lttng_event_enable(struct lttng_event
*event
);
541 int lttng_event_disable(struct lttng_event
*event
);
543 void lttng_transport_register(struct lttng_transport
*transport
);
544 void lttng_transport_unregister(struct lttng_transport
*transport
);
546 void synchronize_trace(void);
547 int lttng_abi_init(void);
548 int lttng_abi_compat_old_init(void);
549 void lttng_abi_exit(void);
550 void lttng_abi_compat_old_exit(void);
552 int lttng_probe_register(struct lttng_probe_desc
*desc
);
553 void lttng_probe_unregister(struct lttng_probe_desc
*desc
);
554 const struct lttng_event_desc
*lttng_event_get(const char *name
);
555 void lttng_event_put(const struct lttng_event_desc
*desc
);
556 int lttng_probes_init(void);
557 void lttng_probes_exit(void);
559 int lttng_metadata_output_channel(struct lttng_metadata_stream
*stream
,
560 struct channel
*chan
);
562 int lttng_pid_tracker_get_node_pid(const struct lttng_pid_hash_node
*node
);
563 struct lttng_pid_tracker
*lttng_pid_tracker_create(void);
564 void lttng_pid_tracker_destroy(struct lttng_pid_tracker
*lpf
);
565 bool lttng_pid_tracker_lookup(struct lttng_pid_tracker
*lpf
, int pid
);
566 int lttng_pid_tracker_add(struct lttng_pid_tracker
*lpf
, int pid
);
567 int lttng_pid_tracker_del(struct lttng_pid_tracker
*lpf
, int pid
);
569 int lttng_session_track_pid(struct lttng_session
*session
, int pid
);
570 int lttng_session_untrack_pid(struct lttng_session
*session
, int pid
);
572 int lttng_session_list_tracker_pids(struct lttng_session
*session
);
574 void lttng_clock_ref(void);
575 void lttng_clock_unref(void);
577 #if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
578 int lttng_syscalls_register(struct lttng_channel
*chan
, void *filter
);
579 int lttng_syscalls_unregister(struct lttng_channel
*chan
);
580 int lttng_syscall_filter_enable(struct lttng_channel
*chan
,
582 int lttng_syscall_filter_disable(struct lttng_channel
*chan
,
584 long lttng_channel_syscall_mask(struct lttng_channel
*channel
,
585 struct lttng_kernel_syscall_mask __user
*usyscall_mask
);
587 static inline int lttng_syscalls_register(struct lttng_channel
*chan
, void *filter
)
592 static inline int lttng_syscalls_unregister(struct lttng_channel
*chan
)
597 static inline int lttng_syscall_filter_enable(struct lttng_channel
*chan
,
603 static inline int lttng_syscall_filter_disable(struct lttng_channel
*chan
,
609 static inline long lttng_channel_syscall_mask(struct lttng_channel
*channel
,
610 struct lttng_kernel_syscall_mask __user
*usyscall_mask
)
616 void lttng_filter_sync_state(struct lttng_bytecode_runtime
*runtime
);
617 int lttng_enabler_attach_bytecode(struct lttng_enabler
*enabler
,
618 struct lttng_kernel_filter_bytecode __user
*bytecode
);
619 void lttng_enabler_event_link_bytecode(struct lttng_event
*event
,
620 struct lttng_enabler
*enabler
);
622 extern struct lttng_ctx
*lttng_static_ctx
;
624 int lttng_context_init(void);
625 void lttng_context_exit(void);
626 struct lttng_ctx_field
*lttng_append_context(struct lttng_ctx
**ctx
);
627 void lttng_context_update(struct lttng_ctx
*ctx
);
628 int lttng_find_context(struct lttng_ctx
*ctx
, const char *name
);
629 int lttng_get_context_index(struct lttng_ctx
*ctx
, const char *name
);
630 void lttng_remove_context_field(struct lttng_ctx
**ctx
,
631 struct lttng_ctx_field
*field
);
632 void lttng_destroy_context(struct lttng_ctx
*ctx
);
633 int lttng_add_pid_to_ctx(struct lttng_ctx
**ctx
);
634 int lttng_add_cpu_id_to_ctx(struct lttng_ctx
**ctx
);
635 int lttng_add_procname_to_ctx(struct lttng_ctx
**ctx
);
636 int lttng_add_prio_to_ctx(struct lttng_ctx
**ctx
);
637 int lttng_add_nice_to_ctx(struct lttng_ctx
**ctx
);
638 int lttng_add_vpid_to_ctx(struct lttng_ctx
**ctx
);
639 int lttng_add_tid_to_ctx(struct lttng_ctx
**ctx
);
640 int lttng_add_vtid_to_ctx(struct lttng_ctx
**ctx
);
641 int lttng_add_ppid_to_ctx(struct lttng_ctx
**ctx
);
642 int lttng_add_vppid_to_ctx(struct lttng_ctx
**ctx
);
643 int lttng_add_hostname_to_ctx(struct lttng_ctx
**ctx
);
644 int lttng_add_interruptible_to_ctx(struct lttng_ctx
**ctx
);
645 int lttng_add_need_reschedule_to_ctx(struct lttng_ctx
**ctx
);
646 #if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT)
647 int lttng_add_preemptible_to_ctx(struct lttng_ctx
**ctx
);
650 int lttng_add_preemptible_to_ctx(struct lttng_ctx
**ctx
)
655 #ifdef CONFIG_PREEMPT_RT_FULL
656 int lttng_add_migratable_to_ctx(struct lttng_ctx
**ctx
);
659 int lttng_add_migratable_to_ctx(struct lttng_ctx
**ctx
)
664 #if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
665 int lttng_add_perf_counter_to_ctx(uint32_t type
,
668 struct lttng_ctx
**ctx
);
669 int lttng_cpuhp_perf_counter_online(unsigned int cpu
,
670 struct lttng_cpuhp_node
*node
);
671 int lttng_cpuhp_perf_counter_dead(unsigned int cpu
,
672 struct lttng_cpuhp_node
*node
);
675 int lttng_add_perf_counter_to_ctx(uint32_t type
,
678 struct lttng_ctx
**ctx
)
683 int lttng_cpuhp_perf_counter_online(unsigned int cpu
,
684 struct lttng_cpuhp_node
*node
)
689 int lttng_cpuhp_perf_counter_dead(unsigned int cpu
,
690 struct lttng_cpuhp_node
*node
)
696 int lttng_logger_init(void);
697 void lttng_logger_exit(void);
699 extern int lttng_statedump_start(struct lttng_session
*session
);
701 #ifdef CONFIG_KPROBES
702 int lttng_kprobes_register(const char *name
,
703 const char *symbol_name
,
706 struct lttng_event
*event
);
707 void lttng_kprobes_unregister(struct lttng_event
*event
);
708 void lttng_kprobes_destroy_private(struct lttng_event
*event
);
711 int lttng_kprobes_register(const char *name
,
712 const char *symbol_name
,
715 struct lttng_event
*event
)
721 void lttng_kprobes_unregister(struct lttng_event
*event
)
726 void lttng_kprobes_destroy_private(struct lttng_event
*event
)
731 #ifdef CONFIG_KRETPROBES
732 int lttng_kretprobes_register(const char *name
,
733 const char *symbol_name
,
736 struct lttng_event
*event_entry
,
737 struct lttng_event
*event_exit
);
738 void lttng_kretprobes_unregister(struct lttng_event
*event
);
739 void lttng_kretprobes_destroy_private(struct lttng_event
*event
);
740 int lttng_kretprobes_event_enable_state(struct lttng_event
*event
,
744 int lttng_kretprobes_register(const char *name
,
745 const char *symbol_name
,
748 struct lttng_event
*event_entry
,
749 struct lttng_event
*event_exit
)
755 void lttng_kretprobes_unregister(struct lttng_event
*event
)
760 void lttng_kretprobes_destroy_private(struct lttng_event
*event
)
765 int lttng_kretprobes_event_enable_state(struct lttng_event
*event
,
772 #ifdef CONFIG_DYNAMIC_FTRACE
773 int lttng_ftrace_register(const char *name
,
774 const char *symbol_name
,
775 struct lttng_event
*event
);
776 void lttng_ftrace_unregister(struct lttng_event
*event
);
777 void lttng_ftrace_destroy_private(struct lttng_event
*event
);
780 int lttng_ftrace_register(const char *name
,
781 const char *symbol_name
,
782 struct lttng_event
*event
)
788 void lttng_ftrace_unregister(struct lttng_event
*event
)
793 void lttng_ftrace_destroy_private(struct lttng_event
*event
)
798 int lttng_calibrate(struct lttng_kernel_calibrate
*calibrate
);
800 extern const struct file_operations lttng_tracepoint_list_fops
;
801 extern const struct file_operations lttng_syscall_list_fops
;
803 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
804 #define TRACEPOINT_HAS_DATA_ARG
807 #endif /* _LTTNG_EVENTS_H */