2 * Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-or-later
18 #include <sys/types.h>
22 #include "foobar_provider.h"
26 int main(int argc
, char *argv
[])
29 void (*bar_function
)();
34 * This SDT tracepoint has an argument. Argument extraction is not supported
35 * at the moment, but tracing of the tracepoint should work.
37 FOOBAR_TP_WITH_ARG(42);
39 /* Call a function containing an SDT tracepoint in shared object. */
43 * Load a shared object and call a function containing an SDT
46 handle
= dlopen("libbar.so", RTLD_LAZY
);
48 fprintf(stderr
, "Can't dlopen libbar.so");
51 bar_function
= (void (*)())dlsym(handle
, "bar_function");
55 /* This tracepoint has 2 call sites in this binary. */
59 * This function is defined in libfoo and in libzzz. For a test, libzzz is
60 * LD_PRELOADed and should override this function.
62 overridable_function();
65 * This function is calling a SDT tracepoint that is guarded by a
This page took 0.030723 seconds and 4 git commands to generate.