551b42b5a7e33310dd783b6a897de180fa48ea2d
2 * Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
4 * SPDX-License-Identifier: LGPL-2.1-or-later
13 * The order of inclusion is important here: including sdt.h _before_ the probe
14 * declarations ensures that semaphore-protected SDT probes (which we don't support) are not
15 * generated. See SYSTEMTAP(2) for more details.
17 /* clang-format off */
19 #include "foobar_provider.h"
31 #include <sys/types.h>
33 int main(int argc
, char *argv
[])
36 void (*bar_function
)();
41 * This SDT tracepoint has an argument. Argument extraction is not supported
42 * at the moment, but tracing of the tracepoint should work.
44 FOOBAR_TP_WITH_ARG(42);
46 /* Call a function containing an SDT tracepoint in shared object. */
50 * Load a shared object and call a function containing an SDT
53 handle
= dlopen("libbar.so", RTLD_LAZY
);
55 fprintf(stderr
, "Can't dlopen libbar.so");
58 bar_function
= (void (*)()) dlsym(handle
, "bar_function");
62 /* This tracepoint has 2 call sites in this binary. */
66 * This function is defined in libfoo and in libzzz. For a test, libzzz is
67 * LD_PRELOADed and should override this function.
69 overridable_function();
72 * This function is calling a SDT tracepoint that is guarded by a
This page took 0.036279 seconds and 5 git commands to generate.