#include "callsites.h"
#endif
-void exec_callsite()
+void exec_callsite(void);
+void exec_callsite(void)
{
#if HAS_CALLSITES
call_tracepoint();
#endif
}
+static
void print_list(void)
{
fprintf(stderr, "Test list (-t X):\n");
fprintf(stderr, "\t2: simulate the upgrade of a library containing the callsites using dlopen() and dlclose(). \n");
}
+#if HAS_CALLSITES
+static
int dl_open_all(int nb_libraries, char **libraries)
{
int i, ret = 0;
* Takes 2 paths to libraries, dlopen() the first, trace, dlopen() the second,
* and dlclose the first to simulate the upgrade of a library.
*/
+static
int upgrade_lib(int nb_libraries, char **libraries)
{
int i, ret = 0;
error:
return ret;
}
+#endif /* HAS_CALLSITES */
+#if !HAS_CALLSITES
/*
* Simulate the upgrade of a library containing a callsite.
* Receives two libraries containing callsites for the same tracepoint.
*/
+static
int upgrade_callsite(int nb_libraries, char **libraries)
{
int ret = 0;
error:
return ret;
}
+#endif /* !HAS_CALLSITES */
int main(int argc, const char **argv)
{
{ "test", 't', POPT_ARG_INT, &test, 0, "Test to run", NULL },
{ "list", 'l', 0, 0, 'l', "List of tests (-t X)", NULL },
POPT_AUTOHELP
- { NULL, 0, 0, NULL, 0 }
+ { NULL, 0, 0, NULL, 0, NULL, NULL }
};
optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);