1 #ifndef _LTT_FACILITY_USER_GENERIC_H_
2 #define _LTT_FACILITY_USER_GENERIC_H_
5 #include <ltt/ltt-facility-id-user_generic.h>
6 #include <ltt/ltt-generic.h>
10 /* Event string structures */
11 static inline void lttng_write_string_user_generic_string_data(
22 /* Flush pending memcpy */
25 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
33 *to
+= ltt_align(*to
, align
); /* align output */
35 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
38 /* Contains variable sized fields : must explode the structure */
40 size
= strlen(obj
) + 1; /* Include final NULL char. */
42 memcpy(buffer
+*to_base
+*to
, obj
, size
);
45 /* Realign the *to_base on arch size, set *to to 0 */
46 *to
+= ltt_align(*to
, sizeof(void *));
47 *to_base
= *to_base
+*to
;
50 /* Put source *from just after the C string */
55 /* Event string logging function */
56 #ifndef LTT_TRACE_FAST
57 static inline int trace_user_generic_string(
58 const char * lttng_param_data
)
66 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
67 size_t *to_base
= &real_to_base
;
69 size_t *to
= &real_to
;
71 size_t *len
= &real_len
;
74 const void *real_from
;
75 const void **from
= &real_from
;
76 /* For each field, calculate the field size. */
77 /* size = *to_base + *to + *len */
78 /* Assume that the padding for alignment starts at a
79 * sizeof(void *) address. */
81 *from
= lttng_param_data
;
82 lttng_write_string_user_generic_string_data(buffer
, to_base
, to
, from
, len
, lttng_param_data
);
84 reserve_size
= *to_base
+ *to
+ *len
;
86 char stack_buffer
[reserve_size
];
87 buffer
= stack_buffer
;
89 *to_base
= *to
= *len
= 0;
91 *from
= lttng_param_data
;
92 lttng_write_string_user_generic_string_data(buffer
, to_base
, to
, from
, len
, lttng_param_data
);
94 /* Flush pending memcpy */
96 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
101 ret
= ltt_trace_generic(ltt_facility_user_generic_F583779E
, event_user_generic_string
, buffer
, reserve_size
, LTT_BLOCKING
);
108 #endif //!LTT_TRACE_FAST
110 #ifdef LTT_TRACE_FAST
111 static inline int trace_user_generic_string(
112 const char * lttng_param_data
)
119 struct ltt_trace_info
*trace
= thread_trace_info
;
120 struct ltt_buf
*ltt_buf
;
122 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
123 size_t *to_base
= &real_to_base
;
125 size_t *to
= &real_to
;
127 size_t *len
= &real_len
;
130 const void *real_from
;
131 const void **from
= &real_from
;
133 size_t before_hdr_pad
, after_hdr_pad
, header_size
;
135 if(!trace
) ltt_thread_init();
137 /* For each field, calculate the field size. */
138 /* size = *to_base + *to + *len */
139 /* Assume that the padding for alignment starts at a
140 * sizeof(void *) address. */
142 *from
= lttng_param_data
;
143 lttng_write_string_user_generic_string_data(buffer
, to_base
, to
, from
, len
, lttng_param_data
);
145 reserve_size
= *to_base
+ *to
+ *len
;
147 index
= ltt_get_index_from_facility(ltt_facility_user_generic_F583779E
,
148 event_user_generic_string
);
151 ltt_buf
= ltt_get_channel_from_index(trace
, index
);
153 buffer
= ltt_reserve_slot(trace
, ltt_buf
,
154 reserve_size
, &slot_size
, &tsc
,
155 &before_hdr_pad
, &after_hdr_pad
, &header_size
);
156 if(!buffer
) goto end
; /* buffer full */
158 *to_base
= *to
= *len
= 0;
160 ltt_write_event_header(trace
, ltt_buf
, buffer
,
161 ltt_facility_user_generic_F583779E
, event_user_generic_string
,
162 reserve_size
, before_hdr_pad
, tsc
);
163 *to_base
+= before_hdr_pad
+ after_hdr_pad
+ header_size
;
165 *from
= lttng_param_data
;
166 lttng_write_string_user_generic_string_data(buffer
, to_base
, to
, from
, len
, lttng_param_data
);
168 /* Flush pending memcpy */
170 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
175 ltt_commit_slot(ltt_buf
, buffer
, slot_size
);
183 #endif //LTT_TRACE_FAST
185 /* Event string_pointer structures */
186 static inline void lttng_write_string_user_generic_string_pointer_string(
197 /* Flush pending memcpy */
200 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
205 align
= sizeof(char);
208 *to
+= ltt_align(*to
, align
); /* align output */
210 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
213 /* Contains variable sized fields : must explode the structure */
215 size
= strlen(obj
) + 1; /* Include final NULL char. */
217 memcpy(buffer
+*to_base
+*to
, obj
, size
);
220 /* Realign the *to_base on arch size, set *to to 0 */
221 *to
+= ltt_align(*to
, sizeof(void *));
222 *to_base
= *to_base
+*to
;
225 /* Put source *from just after the C string */
230 /* Event string_pointer logging function */
231 #ifndef LTT_TRACE_FAST
232 static inline int trace_user_generic_string_pointer(
233 const char * lttng_param_string
,
234 const void * lttng_param_pointer
)
242 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
243 size_t *to_base
= &real_to_base
;
245 size_t *to
= &real_to
;
247 size_t *len
= &real_len
;
251 const void *real_from
;
252 const void **from
= &real_from
;
253 /* For each field, calculate the field size. */
254 /* size = *to_base + *to + *len */
255 /* Assume that the padding for alignment starts at a
256 * sizeof(void *) address. */
258 *from
= lttng_param_string
;
259 lttng_write_string_user_generic_string_pointer_string(buffer
, to_base
, to
, from
, len
, lttng_param_string
);
261 *from
= <tng_param_pointer
;
262 align
= sizeof(const void *);
265 *to
+= ltt_align(*to
, align
); /* align output */
267 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
270 *len
+= sizeof(const void *);
272 reserve_size
= *to_base
+ *to
+ *len
;
274 char stack_buffer
[reserve_size
];
275 buffer
= stack_buffer
;
277 *to_base
= *to
= *len
= 0;
279 *from
= lttng_param_string
;
280 lttng_write_string_user_generic_string_pointer_string(buffer
, to_base
, to
, from
, len
, lttng_param_string
);
282 /* Flush pending memcpy */
284 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
289 *from
= <tng_param_pointer
;
290 align
= sizeof(const void *);
293 *to
+= ltt_align(*to
, align
); /* align output */
295 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
298 *len
+= sizeof(const void *);
300 /* Flush pending memcpy */
302 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
307 ret
= ltt_trace_generic(ltt_facility_user_generic_F583779E
, event_user_generic_string_pointer
, buffer
, reserve_size
, LTT_BLOCKING
);
314 #endif //!LTT_TRACE_FAST
316 #ifdef LTT_TRACE_FAST
317 static inline int trace_user_generic_string_pointer(
318 const char * lttng_param_string
,
319 const void * lttng_param_pointer
)
326 struct ltt_trace_info
*trace
= thread_trace_info
;
327 struct ltt_buf
*ltt_buf
;
329 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
330 size_t *to_base
= &real_to_base
;
332 size_t *to
= &real_to
;
334 size_t *len
= &real_len
;
338 const void *real_from
;
339 const void **from
= &real_from
;
341 size_t before_hdr_pad
, after_hdr_pad
, header_size
;
343 if(!trace
) ltt_thread_init();
345 /* For each field, calculate the field size. */
346 /* size = *to_base + *to + *len */
347 /* Assume that the padding for alignment starts at a
348 * sizeof(void *) address. */
350 *from
= lttng_param_string
;
351 lttng_write_string_user_generic_string_pointer_string(buffer
, to_base
, to
, from
, len
, lttng_param_string
);
353 *from
= <tng_param_pointer
;
354 align
= sizeof(const void *);
357 *to
+= ltt_align(*to
, align
); /* align output */
359 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
362 *len
+= sizeof(const void *);
364 reserve_size
= *to_base
+ *to
+ *len
;
366 index
= ltt_get_index_from_facility(ltt_facility_user_generic_F583779E
,
367 event_user_generic_string_pointer
);
370 ltt_buf
= ltt_get_channel_from_index(trace
, index
);
372 buffer
= ltt_reserve_slot(trace
, ltt_buf
,
373 reserve_size
, &slot_size
, &tsc
,
374 &before_hdr_pad
, &after_hdr_pad
, &header_size
);
375 if(!buffer
) goto end
; /* buffer full */
377 *to_base
= *to
= *len
= 0;
379 ltt_write_event_header(trace
, ltt_buf
, buffer
,
380 ltt_facility_user_generic_F583779E
, event_user_generic_string_pointer
,
381 reserve_size
, before_hdr_pad
, tsc
);
382 *to_base
+= before_hdr_pad
+ after_hdr_pad
+ header_size
;
384 *from
= lttng_param_string
;
385 lttng_write_string_user_generic_string_pointer_string(buffer
, to_base
, to
, from
, len
, lttng_param_string
);
387 /* Flush pending memcpy */
389 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
394 *from
= <tng_param_pointer
;
395 align
= sizeof(const void *);
398 *to
+= ltt_align(*to
, align
); /* align output */
400 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
403 *len
+= sizeof(const void *);
405 /* Flush pending memcpy */
407 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
412 ltt_commit_slot(ltt_buf
, buffer
, slot_size
);
420 #endif //LTT_TRACE_FAST
422 /* Event slow_printf structures */
423 static inline void lttng_write_string_user_generic_slow_printf_string(
434 /* Flush pending memcpy */
437 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
442 align
= sizeof(char);
445 *to
+= ltt_align(*to
, align
); /* align output */
447 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
450 /* Contains variable sized fields : must explode the structure */
452 size
= strlen(obj
) + 1; /* Include final NULL char. */
454 memcpy(buffer
+*to_base
+*to
, obj
, size
);
457 /* Realign the *to_base on arch size, set *to to 0 */
458 *to
+= ltt_align(*to
, sizeof(void *));
459 *to_base
= *to_base
+*to
;
462 /* Put source *from just after the C string */
467 /* Event slow_printf logging function */
468 #ifndef LTT_TRACE_FAST
469 static inline int trace_user_generic_slow_printf_param_buffer(
478 reserve_size
= ltt_align(reserve_size
, sizeof(void *));
480 ret
= ltt_trace_generic(ltt_facility_user_generic_F583779E
, event_user_generic_slow_printf
, buffer
, reserve_size
, LTT_BLOCKING
);
487 #endif //!LTT_TRACE_FAST
489 #ifdef LTT_TRACE_FAST
490 static inline int trace_user_generic_slow_printf(
491 const char * lttng_param_string
)
498 struct ltt_trace_info
*trace
= thread_trace_info
;
499 struct ltt_buf
*ltt_buf
;
501 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
502 size_t *to_base
= &real_to_base
;
504 size_t *to
= &real_to
;
506 size_t *len
= &real_len
;
509 const void *real_from
;
510 const void **from
= &real_from
;
512 size_t before_hdr_pad
, after_hdr_pad
, header_size
;
514 if(!trace
) ltt_thread_init();
516 /* For each field, calculate the field size. */
517 /* size = *to_base + *to + *len */
518 /* Assume that the padding for alignment starts at a
519 * sizeof(void *) address. */
521 *from
= lttng_param_string
;
522 lttng_write_string_user_generic_slow_printf_string(buffer
, to_base
, to
, from
, len
, lttng_param_string
);
524 reserve_size
= *to_base
+ *to
+ *len
;
526 index
= ltt_get_index_from_facility(ltt_facility_user_generic_F583779E
,
527 event_user_generic_slow_printf
);
530 ltt_buf
= ltt_get_channel_from_index(trace
, index
);
532 buffer
= ltt_reserve_slot(trace
, ltt_buf
,
533 reserve_size
, &slot_size
, &tsc
,
534 &before_hdr_pad
, &after_hdr_pad
, &header_size
);
535 if(!buffer
) goto end
; /* buffer full */
537 *to_base
= *to
= *len
= 0;
539 ltt_write_event_header(trace
, ltt_buf
, buffer
,
540 ltt_facility_user_generic_F583779E
, event_user_generic_slow_printf
,
541 reserve_size
, before_hdr_pad
, tsc
);
542 *to_base
+= before_hdr_pad
+ after_hdr_pad
+ header_size
;
544 *from
= lttng_param_string
;
545 lttng_write_string_user_generic_slow_printf_string(buffer
, to_base
, to
, from
, len
, lttng_param_string
);
547 /* Flush pending memcpy */
549 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
554 ltt_commit_slot(ltt_buf
, buffer
, slot_size
);
562 #endif //LTT_TRACE_FAST
564 /* Event function_entry structures */
566 /* Event function_entry logging function */
567 #ifndef LTT_TRACE_FAST
568 static inline __attribute__((no_instrument_function
)) int trace_user_generic_function_entry(
569 const void * lttng_param_this_fn
,
570 const void * lttng_param_call_site
)
578 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
579 size_t *to_base
= &real_to_base
;
581 size_t *to
= &real_to
;
583 size_t *len
= &real_len
;
587 const void *real_from
;
588 const void **from
= &real_from
;
589 /* For each field, calculate the field size. */
590 /* size = *to_base + *to + *len */
591 /* Assume that the padding for alignment starts at a
592 * sizeof(void *) address. */
594 *from
= <tng_param_this_fn
;
595 align
= sizeof(const void *);
598 *to
+= ltt_align(*to
, align
); /* align output */
600 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
603 *len
+= sizeof(const void *);
605 *from
= <tng_param_call_site
;
606 align
= sizeof(const void *);
609 *to
+= ltt_align(*to
, align
); /* align output */
611 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
614 *len
+= sizeof(const void *);
616 reserve_size
= *to_base
+ *to
+ *len
;
618 char stack_buffer
[reserve_size
];
619 buffer
= stack_buffer
;
621 *to_base
= *to
= *len
= 0;
623 *from
= <tng_param_this_fn
;
624 align
= sizeof(const void *);
627 *to
+= ltt_align(*to
, align
); /* align output */
629 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
632 *len
+= sizeof(const void *);
634 /* Flush pending memcpy */
636 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
641 *from
= <tng_param_call_site
;
642 align
= sizeof(const void *);
645 *to
+= ltt_align(*to
, align
); /* align output */
647 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
650 *len
+= sizeof(const void *);
652 /* Flush pending memcpy */
654 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
659 ret
= ltt_trace_generic(ltt_facility_user_generic_F583779E
, event_user_generic_function_entry
, buffer
, reserve_size
, LTT_BLOCKING
);
666 #endif //!LTT_TRACE_FAST
668 #ifdef LTT_TRACE_FAST
669 static inline __attribute__((no_instrument_function
)) int trace_user_generic_function_entry(
670 const void * lttng_param_this_fn
,
671 const void * lttng_param_call_site
)
678 struct ltt_trace_info
*trace
= thread_trace_info
;
679 struct ltt_buf
*ltt_buf
;
681 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
682 size_t *to_base
= &real_to_base
;
684 size_t *to
= &real_to
;
686 size_t *len
= &real_len
;
690 const void *real_from
;
691 const void **from
= &real_from
;
693 size_t before_hdr_pad
, after_hdr_pad
, header_size
;
695 if(!trace
) ltt_thread_init();
697 /* For each field, calculate the field size. */
698 /* size = *to_base + *to + *len */
699 /* Assume that the padding for alignment starts at a
700 * sizeof(void *) address. */
702 *from
= <tng_param_this_fn
;
703 align
= sizeof(const void *);
706 *to
+= ltt_align(*to
, align
); /* align output */
708 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
711 *len
+= sizeof(const void *);
713 *from
= <tng_param_call_site
;
714 align
= sizeof(const void *);
717 *to
+= ltt_align(*to
, align
); /* align output */
719 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
722 *len
+= sizeof(const void *);
724 reserve_size
= *to_base
+ *to
+ *len
;
726 index
= ltt_get_index_from_facility(ltt_facility_user_generic_F583779E
,
727 event_user_generic_function_entry
);
730 ltt_buf
= ltt_get_channel_from_index(trace
, index
);
732 buffer
= ltt_reserve_slot(trace
, ltt_buf
,
733 reserve_size
, &slot_size
, &tsc
,
734 &before_hdr_pad
, &after_hdr_pad
, &header_size
);
735 if(!buffer
) goto end
; /* buffer full */
737 *to_base
= *to
= *len
= 0;
739 ltt_write_event_header(trace
, ltt_buf
, buffer
,
740 ltt_facility_user_generic_F583779E
, event_user_generic_function_entry
,
741 reserve_size
, before_hdr_pad
, tsc
);
742 *to_base
+= before_hdr_pad
+ after_hdr_pad
+ header_size
;
744 *from
= <tng_param_this_fn
;
745 align
= sizeof(const void *);
748 *to
+= ltt_align(*to
, align
); /* align output */
750 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
753 *len
+= sizeof(const void *);
755 /* Flush pending memcpy */
757 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
762 *from
= <tng_param_call_site
;
763 align
= sizeof(const void *);
766 *to
+= ltt_align(*to
, align
); /* align output */
768 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
771 *len
+= sizeof(const void *);
773 /* Flush pending memcpy */
775 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
780 ltt_commit_slot(ltt_buf
, buffer
, slot_size
);
788 #endif //LTT_TRACE_FAST
790 /* Event function_exit structures */
792 /* Event function_exit logging function */
793 #ifndef LTT_TRACE_FAST
794 static inline __attribute__((no_instrument_function
)) int trace_user_generic_function_exit(
795 const void * lttng_param_this_fn
,
796 const void * lttng_param_call_site
)
804 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
805 size_t *to_base
= &real_to_base
;
807 size_t *to
= &real_to
;
809 size_t *len
= &real_len
;
813 const void *real_from
;
814 const void **from
= &real_from
;
815 /* For each field, calculate the field size. */
816 /* size = *to_base + *to + *len */
817 /* Assume that the padding for alignment starts at a
818 * sizeof(void *) address. */
820 *from
= <tng_param_this_fn
;
821 align
= sizeof(const void *);
824 *to
+= ltt_align(*to
, align
); /* align output */
826 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
829 *len
+= sizeof(const void *);
831 *from
= <tng_param_call_site
;
832 align
= sizeof(const void *);
835 *to
+= ltt_align(*to
, align
); /* align output */
837 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
840 *len
+= sizeof(const void *);
842 reserve_size
= *to_base
+ *to
+ *len
;
844 char stack_buffer
[reserve_size
];
845 buffer
= stack_buffer
;
847 *to_base
= *to
= *len
= 0;
849 *from
= <tng_param_this_fn
;
850 align
= sizeof(const void *);
853 *to
+= ltt_align(*to
, align
); /* align output */
855 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
858 *len
+= sizeof(const void *);
860 /* Flush pending memcpy */
862 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
867 *from
= <tng_param_call_site
;
868 align
= sizeof(const void *);
871 *to
+= ltt_align(*to
, align
); /* align output */
873 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
876 *len
+= sizeof(const void *);
878 /* Flush pending memcpy */
880 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
885 ret
= ltt_trace_generic(ltt_facility_user_generic_F583779E
, event_user_generic_function_exit
, buffer
, reserve_size
, LTT_BLOCKING
);
892 #endif //!LTT_TRACE_FAST
894 #ifdef LTT_TRACE_FAST
895 static inline __attribute__((no_instrument_function
)) int trace_user_generic_function_exit(
896 const void * lttng_param_this_fn
,
897 const void * lttng_param_call_site
)
904 struct ltt_trace_info
*trace
= thread_trace_info
;
905 struct ltt_buf
*ltt_buf
;
907 size_t real_to_base
= 0; /* The buffer is allocated on arch_size alignment */
908 size_t *to_base
= &real_to_base
;
910 size_t *to
= &real_to
;
912 size_t *len
= &real_len
;
916 const void *real_from
;
917 const void **from
= &real_from
;
919 size_t before_hdr_pad
, after_hdr_pad
, header_size
;
921 if(!trace
) ltt_thread_init();
923 /* For each field, calculate the field size. */
924 /* size = *to_base + *to + *len */
925 /* Assume that the padding for alignment starts at a
926 * sizeof(void *) address. */
928 *from
= <tng_param_this_fn
;
929 align
= sizeof(const void *);
932 *to
+= ltt_align(*to
, align
); /* align output */
934 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
937 *len
+= sizeof(const void *);
939 *from
= <tng_param_call_site
;
940 align
= sizeof(const void *);
943 *to
+= ltt_align(*to
, align
); /* align output */
945 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
948 *len
+= sizeof(const void *);
950 reserve_size
= *to_base
+ *to
+ *len
;
952 index
= ltt_get_index_from_facility(ltt_facility_user_generic_F583779E
,
953 event_user_generic_function_exit
);
956 ltt_buf
= ltt_get_channel_from_index(trace
, index
);
958 buffer
= ltt_reserve_slot(trace
, ltt_buf
,
959 reserve_size
, &slot_size
, &tsc
,
960 &before_hdr_pad
, &after_hdr_pad
, &header_size
);
961 if(!buffer
) goto end
; /* buffer full */
963 *to_base
= *to
= *len
= 0;
965 ltt_write_event_header(trace
, ltt_buf
, buffer
,
966 ltt_facility_user_generic_F583779E
, event_user_generic_function_exit
,
967 reserve_size
, before_hdr_pad
, tsc
);
968 *to_base
+= before_hdr_pad
+ after_hdr_pad
+ header_size
;
970 *from
= <tng_param_this_fn
;
971 align
= sizeof(const void *);
974 *to
+= ltt_align(*to
, align
); /* align output */
976 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
979 *len
+= sizeof(const void *);
981 /* Flush pending memcpy */
983 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
988 *from
= <tng_param_call_site
;
989 align
= sizeof(const void *);
992 *to
+= ltt_align(*to
, align
); /* align output */
994 *len
+= ltt_align(*to
+*len
, align
); /* alignment, ok to do a memcpy of it */
997 *len
+= sizeof(const void *);
999 /* Flush pending memcpy */
1001 memcpy(buffer
+*to_base
+*to
, *from
, *len
);
1006 ltt_commit_slot(ltt_buf
, buffer
, slot_size
);
1014 #endif //LTT_TRACE_FAST
1016 #endif //_LTT_FACILITY_USER_GENERIC_H_