summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/latencytop
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-kernel/latencytop
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-kernel/latencytop')
-rw-r--r--meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch49
-rw-r--r--meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch39
-rw-r--r--meta/recipes-kernel/latencytop/latencytop_0.5.bb28
3 files changed, 116 insertions, 0 deletions
diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
new file mode 100644
index 0000000000..7848ccf2ae
--- /dev/null
+++ b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-fsync.patch
@@ -0,0 +1,49 @@
1linux: sysfs: use tracing_on as tracing_enabled is deprecated
2
3tracing_enabled use in the kernel is being deprecated as per commit
46752ab4a9c30 [tracing: Deprecate tracing_enabled for tracing_on] in
5the linux mainline kernel. tracing_enabled use will generate a warning
6and may no longer function as expected, therefore move to use tracing_on.
7
8Upstream-Status: Pending
9
10Signed-off-by: Dennis Hall <dennis.hall@windriver.com>
11
12Index: latencytop-0.5/fsync.c
13===================================================================
14--- latencytop-0.5.orig/fsync.c 2012-08-03 10:45:49.000000000 -0400
15+++ latencytop-0.5/fsync.c 2012-08-03 10:48:39.000000000 -0400
16@@ -149,19 +149,19 @@
17 * cd /sys/kernel/debug/tracing
18 * echo fsync > current_tracer
19 * echo ftrace_printk > iter_ctrl
20- * echo 1 > tracing_enabled
21+ * echo 1 > tracing_on
22 */
23 ret = system("/bin/mount -t debugfs none /sys/kernel/debug/");
24 if (!ret)
25 return -1;
26 write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
27 write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
28- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
29+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
30 }
31
32 int disable_fsync_tracer(void)
33 {
34- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
35+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
36 }
37
38
39@@ -339,8 +339,8 @@
40 if (curduration > 5)
41 curduration = 5;
42 /* clear the ftrace buffer */
43- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "0");
44- write_to_file("/sys/kernel/debug/tracing/tracing_enabled", "1");
45+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
46+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
47 key = select(1, &rfds, NULL, NULL, &end);
48 parse_ftrace();
49 print_global_list();
diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
new file mode 100644
index 0000000000..0cf217fa0b
--- /dev/null
+++ b/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
@@ -0,0 +1,39 @@
1diff --git a/Makefile.orig b/Makefile
2index 16a2369..fa797a2 100644
3--- a/Makefile.orig
4+++ b/Makefile
5@@ -1,10 +1,11 @@
6-# FIXME: Use autoconf ?
7-HAS_GTK_GUI = 1
8+# Upstream-Status: Inappropriate [configuration]
9+# Signed-off-by: Jack Mitchell <jack.mitchell@dbbroadcast.co.uk>
10
11 DESTDIR =
12 SBINDIR = /usr/sbin
13 XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
14-LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw
15+LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses
16+CC ?= gcc
17
18 OBJS= latencytop.o text_display.o translate.o fsync.o
19
20@@ -26,16 +27,17 @@ endif
21
22 # We write explicity this "implicit rule"
23 %.o : %.c
24- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@
25+ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@
26
27 latencytop: $(OBJS) latencytop.h Makefile
28- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop
29+ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop
30
31 clean:
32 rm -f *~ latencytop DEADJOE *.o
33
34 install: latencytop
35 mkdir -p $(DESTDIR)/usr/share/latencytop
36+ mkdir -p $(DESTDIR)/$(SBINDIR)
37 install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans
38 install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/
39 install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/
diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
new file mode 100644
index 0000000000..e910a96f43
--- /dev/null
+++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
@@ -0,0 +1,28 @@
1SUMMARY = "Linux tool for measuring and fixing latency"
2HOMEPAGE = "http://www.latencytop.org/"
3
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://latencytop.c;endline=23;md5=ee9ea9b1415356e5734adad4a87dc7fa"
6
7DEPENDS = "virtual/libintl ncurses glib-2.0"
8
9PR = "r3"
10
11SRC_URI = "http://www.latencytop.org/download/latencytop-${PV}.tar.gz \
12 file://latencytop-makefile.patch \
13 file://latencytop-fsync.patch"
14
15SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
16SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
17
18PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
19
20PACKAGECONFIG[x11] = ",,gtk+"
21
22EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}"
23
24CFLAGS += "${LDFLAGS}"
25
26do_install() {
27 oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X}
28}