X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=benchmark%2Fbench-sessions.c;h=440b26e787874ebbe92c06450d2afac8c3576647;hb=7bb1478af7d1567a6842d0fc73c46315b65bbaf7;hp=609500828f89113b120d7aeba1817be5e66a7c8b;hpb=8915fb60ff20357b2fa21891e57aa46d83fd3d65;p=lttng-tools.git diff --git a/benchmark/bench-sessions.c b/benchmark/bench-sessions.c index 609500828..440b26e78 100644 --- a/benchmark/bench-sessions.c +++ b/benchmark/bench-sessions.c @@ -25,7 +25,7 @@ #include #include -#include "ltt-sessiond/session.h" +#include #include "utils.h" #include "benchmark.h" @@ -65,6 +65,7 @@ int main(int argc, char **argv) int ret, i, nb_iter; char **names; double value, total = 0; + struct ltt_session *session; if (getuid() != 0) { printf("Aborting test. Must be uid 0 to drop_caches\n"); @@ -88,7 +89,7 @@ int main(int argc, char **argv) names[i] = get_random_string(); ret = system("echo 3 >/proc/sys/vm/drop_caches"); tracepoint(create_session_start); - ret = session_create(names[i], PATH1); + ret = session_create(names[i], PATH1, getuid(), getgid()); tracepoint(create_session_end); if (ret < 0) { printf("Create session went wrong. Aborting\n"); @@ -104,9 +105,10 @@ int main(int argc, char **argv) fprintf(fp, "--- Destroy tracing session ---\n"); for (i = 0; i < nb_iter; i++) { + session = session_find_by_name(names[i]); ret = system("echo 3 >/proc/sys/vm/drop_caches"); tracepoint(destroy_session_start); - ret = session_destroy(names[i]); + ret = session_destroy(session); tracepoint(destroy_session_end); if (ret < 0) { printf("Destroy session went wrong. Aborting\n");