2 * Copyright (C) 2017 Francis Deslauriers <francis.deslauriers@efficios.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28 #include <sys/types.h>
32 #include "foobar_provider.h"
36 int main(int argc
, char *argv
[])
39 void (*bar_function
)();
44 * This SDT tracepoint has an argument. Argument extraction is not support
45 * at the moment but tracing of the tracepoint should work.
47 FOOBAR_TP_WITH_ARG(42);
49 /* Call function containing an SDT tracepoint in shared object */
53 * Load a show shared object and call a function containing an SDT
56 handle
= dlopen("libbar.so", RTLD_LAZY
);
58 fprintf(stderr
, "Can't dlopen libbar.so");
61 bar_function
= (void (*)())dlsym(handle
, "bar_function");
65 /* This tracepoint has 2 callsites in this binary */
69 * This function is defined in libfoo AND in libzzz. For a test, libzzz is
70 * LD_PRELOADed and should override this function
72 overridable_function();
75 * This function is calling a SDT tracepoint that is guarded by a
This page took 0.036126 seconds and 5 git commands to generate.