c9c8036970638788acbce1c4d91f18c0249ad24a
2 * Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-or-later
12 #include "foobar_provider.h"
23 #include <sys/types.h>
25 int main(int argc
, char *argv
[])
28 void (*bar_function
)();
33 * This SDT tracepoint has an argument. Argument extraction is not supported
34 * at the moment, but tracing of the tracepoint should work.
36 FOOBAR_TP_WITH_ARG(42);
38 /* Call a function containing an SDT tracepoint in shared object. */
42 * Load a shared object and call a function containing an SDT
45 handle
= dlopen("libbar.so", RTLD_LAZY
);
47 fprintf(stderr
, "Can't dlopen libbar.so");
50 bar_function
= (void (*)()) dlsym(handle
, "bar_function");
54 /* This tracepoint has 2 call sites in this binary. */
58 * This function is defined in libfoo and in libzzz. For a test, libzzz is
59 * LD_PRELOADed and should override this function.
61 overridable_function();
64 * This function is calling a SDT tracepoint that is guarded by a
This page took 0.030523 seconds and 3 git commands to generate.