Commit | Line | Data |
---|---|---|
dd330053 | 1 | /* |
c0c0989a | 2 | * SPDX-License-Identifier: LGPL-2.1-or-later |
dd330053 | 3 | * |
c0c0989a | 4 | * Copyright (C) 2011-2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
dd330053 MD |
5 | */ |
6 | ||
dd330053 MD |
7 | #define _LGPL_SOURCE |
8 | #include <dlfcn.h> | |
9 | #include <sys/types.h> | |
10 | #include <stdio.h> | |
11 | ||
12 | #define TRACEPOINT_DEFINE | |
13 | #define TRACEPOINT_CREATE_PROBES | |
baca05dc | 14 | #define TP_IP_PARAM func_addr |
dd330053 MD |
15 | #include "lttng-ust-cyg-profile-fast.h" |
16 | ||
17 | void __cyg_profile_func_enter(void *this_fn, void *call_site) | |
18 | __attribute__((no_instrument_function)); | |
19 | ||
20 | void __cyg_profile_func_exit(void *this_fn, void *call_site) | |
21 | __attribute__((no_instrument_function)); | |
22 | ||
2208d8b5 | 23 | void __cyg_profile_func_enter(void *this_fn, void *call_site __attribute__((unused))) |
dd330053 MD |
24 | { |
25 | tracepoint(lttng_ust_cyg_profile_fast, func_entry, this_fn); | |
26 | } | |
27 | ||
2208d8b5 | 28 | void __cyg_profile_func_exit(void *this_fn, void *call_site __attribute__((unused))) |
dd330053 | 29 | { |
baca05dc | 30 | tracepoint(lttng_ust_cyg_profile_fast, func_exit, this_fn); |
dd330053 | 31 | } |