aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2018-02-15 09:38:17 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-02-15 09:38:17 -0500
commit4507c3047471f112a6f5a7a6ef75f6e966833531 (patch)
tree0429f56d465264de4b889d90ec4fbac33f67d5f7
parentff093a2ccfba19c51428c8ff8b9ae89e207f4413 (diff)
downloadmeta-realtime-rocko.tar.gz
meta-realtime-rocko.tar.bz2
meta-realtime-rocko.zip
latencytop: import latencytop from oe-corerocko
latencytop doesn't really belong in oe-core. And although there isn't much development on latencytop, the package isn't broken, so we can maintain it here. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch64
-rw-r--r--recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch49
-rw-r--r--recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch43
-rw-r--r--recipes-kernel/latencytop/latencytop_0.5.bb32
4 files changed, 188 insertions, 0 deletions
diff --git a/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch b/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
new file mode 100644
index 0000000..b248133
--- /dev/null
+++ b/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
@@ -0,0 +1,64 @@
+From db112739dc4f608a968b8104b382955dc3d96ca3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Sep 2015 07:40:10 +0000
+Subject: [PATCH] Rectify the function signatures to fix prototype mismatches
+
+clang is less forgiving when it comes to coding standards, correct the
+function signatures to reflect the function logic
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ fsync.c | 7 ++++---
+ latencytop.h | 2 +-
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/fsync.c b/fsync.c
+index 82dff0e..5cefba9 100644
+--- a/fsync.c
++++ b/fsync.c
+@@ -51,7 +51,7 @@ struct fsync_files {
+ static GList *fsync_data;
+
+
+-static chain_file(struct fsync_process *proc, char *filename)
++static void chain_file(struct fsync_process *proc, char *filename)
+ {
+ struct fsync_files *file;
+ GList *item;
+@@ -75,7 +75,7 @@ static chain_file(struct fsync_process *proc, char *filename)
+ proc->files = g_list_append(proc->files, file);
+ }
+
+-static report_file(char *process, char *file)
++static void report_file(char *process, char *file)
+ {
+ struct fsync_process *proc;
+ GList *item;
+@@ -157,9 +157,10 @@ int enable_fsync_tracer(void)
+ write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
+ write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
++ return ret;
+ }
+
+-int disable_fsync_tracer(void)
++void disable_fsync_tracer(void)
+ {
+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
+ }
+diff --git a/latencytop.h b/latencytop.h
+index 5394d73..9d107a8 100644
+--- a/latencytop.h
++++ b/latencytop.h
+@@ -54,5 +54,5 @@ extern char *translate(char *line);
+ extern void init_translations(char *filename);
+ extern int fsync_display(int duration);
+ extern int enable_fsync_tracer(void);
+-extern int disable_fsync_tracer(void);
++extern void disable_fsync_tracer(void);
+ extern void update_list(void);
+--
+2.5.1
+
diff --git a/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch b/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
new file mode 100644
index 0000000..7848ccf
--- /dev/null
+++ b/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
@@ -0,0 +1,49 @@
+linux: sysfs: use tracing_on as tracing_enabled is deprecated
+
+tracing_enabled use in the kernel is being deprecated as per commit
+6752ab4a9c30 [tracing: Deprecate tracing_enabled for tracing_on] in
+the linux mainline kernel. tracing_enabled use will generate a warning
+and may no longer function as expected, therefore move to use tracing_on.
+
+Upstream-Status: Pending
+
+Signed-off-by: Dennis Hall <dennis.hall@windriver.com>
+
+Index: latencytop-0.5/fsync.c
+===================================================================
+--- latencytop-0.5.orig/fsync.c 2012-08-03 10:45:49.000000000 -0400
++++ latencytop-0.5/fsync.c 2012-08-03 10:48:39.000000000 -0400
+@@ -149,19 +149,19 @@
+ * cd /sys/kernel/debug/tracing
+ * echo fsync > current_tracer
+ * echo ftrace_printk > iter_ctrl
+- * echo 1 > tracing_enabled
++ * echo 1 > tracing_on
+ */
+ ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
+ if (!ret)
+ return -1;
+ write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
+ write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
+- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
++ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
+ }
+
+ int disable_fsync_tracer(void)
+ {
+- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
++ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
+ }
+
+
+@@ -339,8 +339,8 @@
+ if (curduration > 5)
+ curduration = 5;
+ /* clear the ftrace buffer */
+- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
+- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
++ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
++ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
+ key = select(1, &rfds, NULL, NULL, &end);
+ parse_ftrace();
+ print_global_list();
diff --git a/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
new file mode 100644
index 0000000..7147fda
--- /dev/null
+++ b/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
@@ -0,0 +1,43 @@
+
+Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
+Upstream-Status: Pending
+
+diff --git a/Makefile.orig b/Makefile
+index 16a2369..fa797a2 100644
+--- a/Makefile.orig
++++ b/Makefile
+@@ -1,10 +1,11 @@
+-# FIXME: Use autoconf ?
+-HAS_GTK_GUI = 1
++#
++#
+
+ DESTDIR =
+ SBINDIR = /usr/sbin
+ XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
+-LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw
++LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses $(LDFLAGS)
++CC ?= gcc
+
+ OBJS= latencytop.o text_display.o translate.o fsync.o
+
+@@ -26,16 +27,17 @@ endif
+
+ # We write explicity this "implicit rule"
+ %.o : %.c
+- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@
++ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@
+
+ latencytop: $(OBJS) latencytop.h Makefile
+- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop
++ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop
+
+ clean:
+ rm -f *~ latencytop DEADJOE *.o
+
+ install: latencytop
+ mkdir -p $(DESTDIR)/usr/share/latencytop
++ mkdir -p $(DESTDIR)/$(SBINDIR)
+ install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans
+ install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/
+ install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/
diff --git a/recipes-kernel/latencytop/latencytop_0.5.bb b/recipes-kernel/latencytop/latencytop_0.5.bb
new file mode 100644
index 0000000..eb19471
--- /dev/null
+++ b/recipes-kernel/latencytop/latencytop_0.5.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Linux tool for measuring and fixing latency"
+HOMEPAGE = "http://www.latencytop.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa"
+
+inherit pkgconfig
+
+DEPENDS = "virtual/libintl ncurses glib-2.0"
+
+PR = "r3"
+
+SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \
+ file://latencytop-makefile.patch \
+ file://latencytop-fsync.patch \
+ file://0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch \
+"
+
+SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
+SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+
+PACKAGECONFIG[x11] = ",,gtk+"
+
+EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}"
+
+#CFLAGS += "${LDFLAGS}"
+
+do_install() {
+ oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X}
+}