Revert
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 22 Nov 2017 19:42:46 +0000 (14:42 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Wed, 22 Nov 2017 19:42:46 +0000 (14:42 -0500)
This is not needed, we can simply use the "lttng" bin for testing.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
lttng_ivc/apps/lttng-ctl/channels_ctl/Makefile [deleted file]
lttng_ivc/apps/lttng-ctl/channels_ctl/app [deleted file]
lttng_ivc/apps/lttng-ctl/channels_ctl/app.c [deleted file]
lttng_ivc/apps/lttng-ctl/events_ctl/Makefile [deleted file]
lttng_ivc/apps/lttng-ctl/events_ctl/app [deleted file]
lttng_ivc/apps/lttng-ctl/events_ctl/app.c [deleted file]

diff --git a/lttng_ivc/apps/lttng-ctl/channels_ctl/Makefile b/lttng_ivc/apps/lttng-ctl/channels_ctl/Makefile
deleted file mode 100644 (file)
index 2cbe921..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (C) 2017  Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
-#
-# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-#
-# Permission is hereby granted to use or copy this program for any
-# purpose,  provided the above notices are retained on all copies.
-# Permission to modify the code and to distribute modified code is
-# granted, provided the above notices are retained, and a notice that
-# the code was modified is included with the above copyright notice.
-
-LIBS = -llttng-ctl
-LOCAL_CPPFLAGS += -I.
-
-all: app
-
-.PHONY: app
-
-app: app.o
-       $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LIBS)
-
-app.o: app.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(LTTNG_CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
-
-
diff --git a/lttng_ivc/apps/lttng-ctl/channels_ctl/app b/lttng_ivc/apps/lttng-ctl/channels_ctl/app
deleted file mode 100755 (executable)
index 18aa4a8..0000000
Binary files a/lttng_ivc/apps/lttng-ctl/channels_ctl/app and /dev/null differ
diff --git a/lttng_ivc/apps/lttng-ctl/channels_ctl/app.c b/lttng_ivc/apps/lttng-ctl/channels_ctl/app.c
deleted file mode 100644 (file)
index 05a8d4e..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdbool.h>
-#include <inttypes.h>
-#include <lttng/lttng.h>
-
-static enum lttng_domain_type get_domain_type(const char *domain)
-{
-       if (!strcmp("UST", domain)) {
-               return LTTNG_DOMAIN_UST;
-       } else if (!strcmp("KERNEL", domain)) {
-               return LTTNG_DOMAIN_KERNEL;
-       } else {
-               printf("Domain not supported\n");
-               assert(0);
-       }
-}
-
-static int process_channel(struct lttng_channel *channel)
-{
-       int ret;
-       uint64_t uint64 = 0;
-       int64_t int64 = 0;
-
-
-       ret = lttng_channel_get_discarded_event_count(channel, &uint64);
-       if (ret < 0) {
-               ret = 1;
-               goto end;
-       }
-       printf("discarded_event_count: %" PRIu64 "\n", uint64);
-
-       ret = lttng_channel_get_lost_packet_count(channel, &uint64);
-       if (ret < 0) {
-               ret = 1;
-               goto end;
-       }
-       printf("lost packet: %" PRIu64 "\n", uint64);
-
-#ifdef LTTNG_2_10
-       ret = lttng_channel_get_monitor_timer_interval(channel, &uint64);
-       if (ret < 0) {
-               ret = 1;
-               goto end;
-       }
-       printf("monitor timer interval: %" PRIu64 "\n", uint64);
-
-       ret = lttng_channel_get_blocking_timeout(channel, &int64);
-       if (ret < 0) {
-               ret = 1;
-               goto end;
-       }
-       printf("blocking timeout: %" PRId64 "\n", int64);
-
-       /* Setter */
-       ret = lttng_channel_set_blocking_timeout(channel, 100);
-       if (ret < 0) {
-               ret = 1;
-               goto end;
-       }
-
-       ret = lttng_channel_set_monitor_timer_interval(channel, 100);
-       if (ret < 0) {
-               ret = 1;
-               goto end;
-       }
-#endif /* LTTNG_2_10 */
-
-end:
-       return ret;
-}
-
-int main(int argc, char **argv)
-{
-int ret;
-bool found;
-
-if (argc < 4) {
-printf("missing parameters, session name, channel name, domain type\n");
-return 1;
-}
-
-const char *session_name = argv[1];
-const char *channel_name = argv[2];
-const char *domain_str = argv[3];
-
-/* Domain related variables */
-enum lttng_domain_type domain_type = LTTNG_DOMAIN_NONE;
-struct lttng_domain *domains = NULL;
-struct lttng_domain domain;
-int domain_index = -1;
-
-/* Channel related variables */
-struct lttng_channel *channels = NULL;
-int channel_index = -1;
-
-struct lttng_handle *handle = NULL;
-
-/* Find the domain we are interested in */
-domain_type = get_domain_type(domain_str);
-ret = lttng_list_domains(session_name, &domains);
-for (int i = 0; i < ret; i++) {
-       if (domains[i].type == domain_type) {
-                       domain_index = i;
-               }
-       }
-
-       if (domain_index < 0) {
-               printf("domain not found for session %s\n", session_name);
-               ret = 1;
-               goto end;
-       }
-
-       /* Get the handle */
-
-       handle = lttng_create_handle(session_name, &domains[domain_index]);
-
-       /* Find the channel we are interested in */
-       ret = lttng_list_channels(handle, &channels);
-       for (int i = 0; i < ret; i++) {
-               if (!strcmp(channels[i].name, channel_name)) {
-                       channel_index = i;
-               }
-       }
-
-       if (channel_index < 0) {
-               printf("channel not found for session %s\n", session_name);
-               ret = 1;
-               goto end;
-       }
-
-       ret = process_channel(&channels[channel_index]);
-
-end:
-       free(channels);
-       free(domains);
-       if (handle) {
-               lttng_destroy_handle(handle);
-       }
-       return 0;
-}
diff --git a/lttng_ivc/apps/lttng-ctl/events_ctl/Makefile b/lttng_ivc/apps/lttng-ctl/events_ctl/Makefile
deleted file mode 100644 (file)
index 2cbe921..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (C) 2017  Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
-#
-# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
-# OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
-#
-# Permission is hereby granted to use or copy this program for any
-# purpose,  provided the above notices are retained on all copies.
-# Permission to modify the code and to distribute modified code is
-# granted, provided the above notices are retained, and a notice that
-# the code was modified is included with the above copyright notice.
-
-LIBS = -llttng-ctl
-LOCAL_CPPFLAGS += -I.
-
-all: app
-
-.PHONY: app
-
-app: app.o
-       $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LIBS)
-
-app.o: app.c
-       $(CC) $(CPPFLAGS) $(LOCAL_CPPFLAGS) $(LTTNG_CPPFLAGS) $(CFLAGS) -c -o $@ $<
-
-
-
diff --git a/lttng_ivc/apps/lttng-ctl/events_ctl/app b/lttng_ivc/apps/lttng-ctl/events_ctl/app
deleted file mode 100755 (executable)
index 0873364..0000000
Binary files a/lttng_ivc/apps/lttng-ctl/events_ctl/app and /dev/null differ
diff --git a/lttng_ivc/apps/lttng-ctl/events_ctl/app.c b/lttng_ivc/apps/lttng-ctl/events_ctl/app.c
deleted file mode 100644 (file)
index 563fa65..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdbool.h>
-#include <lttng/lttng.h>
-
-static enum lttng_domain_type get_domain_type(const char *domain)
-{
-       if (!strcmp("UST", domain)) {
-               return LTTNG_DOMAIN_UST;
-       } else if (!strcmp("KERNEL", domain)) {
-               return LTTNG_DOMAIN_KERNEL;
-       } else {
-               printf("Domain not supported\n");
-               assert(0);
-       }
-}
-
-static int process_event(struct lttng_event *event)
-{
-       int ret = -1;
-
-       /* Exclusion related lttng-ctl call */
-       ret = lttng_event_get_exclusion_name_count(event);
-       if (ret < 0) {
-               ret = 1;
-               goto end;
-       }
-       if (ret > 0) {
-               int count = ret;
-               for (int i = 0; i < count ; i++) {
-                       const char *name;
-                       ret = lttng_event_get_exclusion_name(event, i , &name);
-                       if (ret) {
-                               ret = 1;
-                               goto end;
-                       }
-                       printf("exclusion name: %s\n", name);
-               }
-       }
-
-       /* Filet expression related lttng-ctl call */
-       const char *filter_str;
-       ret = lttng_event_get_filter_expression(event, &filter_str);
-       if (ret) {
-               ret = 1;
-               goto end;
-       }
-
-       printf("filter expression: %s\n", filter_str);
-end:
-       return ret;
-}
-
-int main(int argc, char **argv)
-{
-       int ret;
-       bool found;
-
-       if (argc < 4) {
-               printf("missing parameters, session name, channel name, domain type\n");
-               return 1;
-       }
-
-       const char *session_name = argv[1];
-       const char *channel_name = argv[2];
-       const char *domain_str = argv[3];
-
-       /* Domain related variables */
-       enum lttng_domain_type domain_type = LTTNG_DOMAIN_NONE;
-       struct lttng_domain *domains = NULL;
-       struct lttng_domain domain;
-       int domain_index = -1;
-
-       /* Channel related variables */
-       struct lttng_channel *channels = NULL;
-       int channel_index = -1;
-
-       /* Event related variables */
-       struct lttng_event *events = NULL;
-
-
-       struct lttng_handle *handle = NULL;
-
-       /* Find the domain we are interested in */
-       domain_type = get_domain_type(domain_str);
-       ret = lttng_list_domains(session_name, &domains);
-       for (int i = 0; i < ret; i++) {
-               if (domains[i].type == domain_type) {
-                       domain_index = i;
-               }
-       }
-
-       if (domain_index < 0) {
-               printf("domain not found for session %s\n", session_name);
-               ret = 1;
-               goto end;
-       }
-
-       /* Get the handle */
-
-       handle = lttng_create_handle(session_name, &domains[domain_index]);
-
-       /* Find the channel we are interested in */
-       ret = lttng_list_channels(handle, &channels);
-       for (int i = 0; i < ret; i++) {
-               if (!strcmp(channels[i].name, channel_name)) {
-                       channel_index = i;
-               }
-       }
-
-       if (channel_index < 0) {
-               printf("channel not found for session %s\n", session_name);
-               ret = 1;
-               goto end;
-       }
-
-       /* List events */
-       ret = lttng_list_events(handle, channel_name, &events);
-       if (ret <= 0) {
-               printf("No events found for channel %s in session %s\n", channel_name, session_name);
-       }
-
-       for (int i = 0; i < ret; i++) {
-               ret = process_event(&events[i]);
-               if (ret) {
-                       printf("Error while processing event \n");
-                       ret = 1;
-                       goto end;
-               }
-       }
-
-end:
-       free(events);
-       free(channels);
-       free(domains);
-       if (handle) {
-               lttng_destroy_handle(handle);
-       }
-       return 0;
-}
This page took 0.029027 seconds and 5 git commands to generate.