Move liblttng-ust-cyg-profile to 'src/lib/'
[lttng-ust.git] / src / lib / lttng-ust-cyg-profile / lttng-ust-cyg-profile-fast.c
diff --git a/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c b/src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile-fast.c
new file mode 100644 (file)
index 0000000..bee7ac0
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
+ * Copyright (C) 2011-2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#define _LGPL_SOURCE
+#include <dlfcn.h>
+#include <sys/types.h>
+#include <stdio.h>
+
+#define TRACEPOINT_DEFINE
+#define TRACEPOINT_CREATE_PROBES
+#define TP_IP_PARAM func_addr
+#include "lttng-ust-cyg-profile-fast.h"
+
+void __cyg_profile_func_enter(void *this_fn, void *call_site)
+       __attribute__((no_instrument_function));
+
+void __cyg_profile_func_exit(void *this_fn, void *call_site)
+       __attribute__((no_instrument_function));
+
+void __cyg_profile_func_enter(void *this_fn, void *call_site __attribute__((unused)))
+{
+       tracepoint(lttng_ust_cyg_profile_fast, func_entry, this_fn);
+}
+
+void __cyg_profile_func_exit(void *this_fn, void *call_site __attribute__((unused)))
+{
+       tracepoint(lttng_ust_cyg_profile_fast, func_exit, this_fn);
+}
This page took 0.025351 seconds and 4 git commands to generate.