Add the sched_switch convert tool to visualise context switches.

Signed-off-by: Remy Bohmer <li...@bohmer.net>
---
 patches/sched_switch-0.1/fix-cross-compile.patch |   26 ++++++++
 patches/sched_switch-0.1/series                  |    1 +
 rules/sched_switch.in                            |   12 ++++
 rules/sched_switch.make                          |   69 ++++++++++++++++++++++
 4 files changed, 108 insertions(+), 0 deletions(-)
 create mode 100644 patches/sched_switch-0.1/fix-cross-compile.patch
 create mode 100644 patches/sched_switch-0.1/series
 create mode 100644 rules/sched_switch.in
 create mode 100644 rules/sched_switch.make

diff --git a/patches/sched_switch-0.1/fix-cross-compile.patch 
b/patches/sched_switch-0.1/fix-cross-compile.patch
new file mode 100644
index 0000000..d4939e0
--- /dev/null
+++ b/patches/sched_switch-0.1/fix-cross-compile.patch
@@ -0,0 +1,26 @@
+Fix cross compilation
+
+Signed-off-by: Remy Bohmer <li...@bohmer.net>
+---
+ Makefile |   14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+Index: sched_switch-0.1/Makefile
+===================================================================
+--- sched_switch-0.1.orig/Makefile
++++ sched_switch-0.1/Makefile
+@@ -1 +1,13 @@
+-sched_switch:
++DESTDIR =
++BINDIR = /usr/bin
++
++sched_switch: sched_switch.c Makefile
++      $(CC) sched_switch.c $(CFLAGS)  $(CPPFLAGS) $(LDFLAGS) $(XCFLAGS) -o 
sched_switch
++
++.PHONY: clean
++clean:
++      rm -f sched_switch
++
++.PHONY: install
++install: sched_switch
++      install -m 0755 sched_switch $(DESTDIR)$(BINDIR)/
diff --git a/patches/sched_switch-0.1/series b/patches/sched_switch-0.1/series
new file mode 100644
index 0000000..0190994
--- /dev/null
+++ b/patches/sched_switch-0.1/series
@@ -0,0 +1 @@
+fix-cross-compile.patch
diff --git a/rules/sched_switch.in b/rules/sched_switch.in
new file mode 100644
index 0000000..01d26be
--- /dev/null
+++ b/rules/sched_switch.in
@@ -0,0 +1,12 @@
+## SECTION=shell_and_console
+
+config SCHED_SWITCH
+       tristate
+       prompt "sched switch"
+       help
+         This is a tool that convert the kernel tracer 'sched_switch' data to
+         VCD (value change dump) data.
+         It makes a graphical visualization tool of the task switches that can 
be
+         visualised with GTK-wave
+         See 
http://www.osadl.org/Visualize-the-temporal-relationship-of-L.taks-visualizer.0.html
+
diff --git a/rules/sched_switch.make b/rules/sched_switch.make
new file mode 100644
index 0000000..77c70f2
--- /dev/null
+++ b/rules/sched_switch.make
@@ -0,0 +1,69 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2010 by Remy Bohmer <li...@bohmer.net>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_SCHED_SWITCH) += sched_switch
+
+#
+# Paths and names
+#
+SCHED_SWITCH_VERSION   := 0.1
+SCHED_SWITCH           := sched_switch-$(SCHED_SWITCH_VERSION)
+SCHED_SWITCH_SUFFIX    := tgz
+SCHED_SWITCH_URL       := 
http://www.osadl.org/uploads/media/$(SCHED_SWITCH).$(SCHED_SWITCH_SUFFIX)
+SCHED_SWITCH_SOURCE    := $(SRCDIR)/$(SCHED_SWITCH).$(SCHED_SWITCH_SUFFIX)
+SCHED_SWITCH_DIR       := $(BUILDDIR)/$(SCHED_SWITCH)
+SCHED_SWITCH_LICENSE   := GPLv2
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(SCHED_SWITCH_SOURCE):
+       @$(call targetinfo)
+       @$(call get, SCHED_SWITCH)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+SCHED_SWITCH_CONF_TOOL := NO
+SCHED_SWITCH_COMPILE_ENV:= $(CROSS_ENV_FLAGS)
+SCHED_SWITCH_MAKE_OPT  := $(CROSS_ENV_CC)
+SCHED_SWITCH_INSTALL_OPT:= \
+       $(SCHED_SWITCH_MAKE_OPT) \
+       DESTDIR=$(SCHED_SWITCH_PKGDIR) \
+       install
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/sched_switch.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init,  sched_switch)
+       @$(call install_fixup, sched_switch,PACKAGE,sched-switch)
+       @$(call install_fixup, sched_switch,PRIORITY,optional)
+       @$(call install_fixup, sched_switch,VERSION,$(SCHED_SWITCH_VERSION))
+       @$(call install_fixup, sched_switch,SECTION,base)
+       @$(call install_fixup, sched_switch,AUTHOR,"Remy Bohmer 
<li...@bohmer.net>")
+       @$(call install_fixup, sched_switch,DEPENDS,)
+       @$(call install_fixup, sched_switch,DESCRIPTION,missing)
+
+       @$(call install_copy, sched_switch, 0, 0, 0755, -, 
/usr/bin/sched_switch)
+
+       @$(call install_finish, sched_switch)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
1.7.0.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to