Fix: pass private data to context callbacks
[lttng-ust.git] / liblttng-ust-libc-wrapper / ust_libc.h
CommitLineData
c0c0989a
MJ
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 */
6
1622ba22 7#undef TRACEPOINT_PROVIDER
6d4658aa 8#define TRACEPOINT_PROVIDER lttng_ust_libc
1622ba22
MD
9
10#if !defined(_TRACEPOINT_UST_LIBC_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
11#define _TRACEPOINT_UST_LIBC_H
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
1622ba22
MD
17#include <lttng/tracepoint.h>
18
6d4658aa 19TRACEPOINT_EVENT(lttng_ust_libc, malloc,
52c95399 20 TP_ARGS(size_t, size, void *, ptr, void *, ip),
1622ba22
MD
21 TP_FIELDS(
22 ctf_integer(size_t, size, size)
f95b2888 23 ctf_integer_hex(void *, ptr, ptr)
5152f6df 24 ctf_unused(ip)
1622ba22
MD
25 )
26)
27
6d4658aa 28TRACEPOINT_EVENT(lttng_ust_libc, free,
52c95399 29 TP_ARGS(void *, ptr, void *, ip),
1622ba22 30 TP_FIELDS(
f95b2888 31 ctf_integer_hex(void *, ptr, ptr)
5152f6df 32 ctf_unused(ip)
f95b2888
SS
33 )
34)
35
6d4658aa 36TRACEPOINT_EVENT(lttng_ust_libc, calloc,
52c95399 37 TP_ARGS(size_t, nmemb, size_t, size, void *, ptr, void *, ip),
f95b2888
SS
38 TP_FIELDS(
39 ctf_integer(size_t, nmemb, nmemb)
40 ctf_integer(size_t, size, size)
41 ctf_integer_hex(void *, ptr, ptr)
5152f6df 42 ctf_unused(ip)
f95b2888
SS
43 )
44)
45
6d4658aa 46TRACEPOINT_EVENT(lttng_ust_libc, realloc,
52c95399 47 TP_ARGS(void *, in_ptr, size_t, size, void *, ptr, void *, ip),
f95b2888
SS
48 TP_FIELDS(
49 ctf_integer_hex(void *, in_ptr, in_ptr)
50 ctf_integer(size_t, size, size)
51 ctf_integer_hex(void *, ptr, ptr)
5152f6df 52 ctf_unused(ip)
1622ba22
MD
53 )
54)
55
6d4658aa 56TRACEPOINT_EVENT(lttng_ust_libc, memalign,
52c95399 57 TP_ARGS(size_t, alignment, size_t, size, void *, ptr, void *, ip),
9d34b226
SS
58 TP_FIELDS(
59 ctf_integer(size_t, alignment, alignment)
60 ctf_integer(size_t, size, size)
61 ctf_integer_hex(void *, ptr, ptr)
5152f6df 62 ctf_unused(ip)
9d34b226
SS
63 )
64)
65
6d4658aa 66TRACEPOINT_EVENT(lttng_ust_libc, posix_memalign,
52c95399 67 TP_ARGS(void *, out_ptr, size_t, alignment, size_t, size, int, result, void *, ip),
9d34b226
SS
68 TP_FIELDS(
69 ctf_integer_hex(void *, out_ptr, out_ptr)
70 ctf_integer(size_t, alignment, alignment)
71 ctf_integer(size_t, size, size)
72 ctf_integer(int, result, result)
5152f6df 73 ctf_unused(ip)
9d34b226
SS
74 )
75)
76
1622ba22
MD
77#endif /* _TRACEPOINT_UST_LIBC_H */
78
45f399e8
MD
79#undef TRACEPOINT_INCLUDE
80#define TRACEPOINT_INCLUDE "./ust_libc.h"
1622ba22
MD
81
82/* This part must be outside ifdef protection */
83#include <lttng/tracepoint-event.h>
84
133fa83a 85#ifdef __cplusplus
1622ba22
MD
86}
87#endif
This page took 0.032032 seconds and 4 git commands to generate.