blktrace: new package

Add blktrace, a tool for generating traces of the I/O traffic on block
devices.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
This commit is contained in:
Tom Zanussi 2010-11-23 00:01:10 -06:00 committed by Saul Wold
parent 34660ef990
commit 998ceaeaf1
4 changed files with 82 additions and 1 deletions

View File

@ -177,4 +177,5 @@ SRCDATE_yaffs2-utils-native ??= "20071107"
SRCDATE_yaffs2-utils ??= "20071107"
SRCREV_pn-zaurusd ??= "358"
SRCREV_pn-zypper ??= "9eb0e248e06c8d20ad054be2439149d9ede37531"
SRCREV_pn-blktrace ??= "1e09f6e9012826fca69fa07222b7bc53c3e629ee"

View File

@ -46,7 +46,9 @@ RDEPENDS_task-poky-tools-profile = "\
RRECOMMENDS_task-poky-tools-profile = "\
perf \
trace-cmd \
kernel-module-oprofile"
kernel-module-oprofile \
blktrace
"
# exmap-console
# exmap-server

View File

@ -0,0 +1,53 @@
Index: git/Makefile
===================================================================
--- git.orig/Makefile 2010-11-22 11:20:14.303472770 -0600
+++ git/Makefile 2010-11-22 14:11:19.152635423 -0600
@@ -1,5 +1,3 @@
-CC = gcc
-CFLAGS = -Wall -O2 -g -W
ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
LIBS = -lpthread
@@ -11,13 +9,13 @@
all: $(ALL)
btt/btt:
- $(MAKE) -C btt
+ CC="${CC}" CFLAGS="${CFLAGS}" $(MAKE) -C btt CC="${CC}" CFLAGS="${CFLAGS}"
btreplay/btrecord:
- $(MAKE) -C btreplay
+ CC="${CC}" CFLAGS="${CFLAGS}" $(MAKE) -C btreplay CC="${CC}" CFLAGS="${CFLAGS}"
btreplay/btreplay:
- $(MAKE) -C btreplay
+ CC="${CC}" CFLAGS="${CFLAGS}" $(MAKE) -C btreplay CC="${CC}" CFLAGS="${CFLAGS}"
%.o: %.c
$(CC) -o $*.o -c $(ALL_CFLAGS) $<
Index: git/btreplay/Makefile
===================================================================
--- git.orig/btreplay/Makefile 2010-11-22 11:21:12.972679035 -0600
+++ git/btreplay/Makefile 2010-11-22 14:07:01.492839945 -0600
@@ -5,8 +5,6 @@
# NDEBUG - Defined: no asserts, Undefined: asserts
#
-CC = gcc
-CFLAGS = -Wall -W -O2 -g
INCS = -I. -I.. -I../btt
OCFLAGS = -UCOUNT_IOS -UDEBUG -DNDEBUG
XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Index: git/btt/Makefile
===================================================================
--- git.orig/btt/Makefile 2010-11-22 11:21:01.833758370 -0600
+++ git/btt/Makefile 2010-11-22 14:07:15.783258253 -0600
@@ -5,8 +5,6 @@
# NDEBUG - Defined: no asserts, Undefined: asserts
#
-CC = gcc
-CFLAGS = -Wall -W -O2 -g
INCS = -I. -I..
XCFLAGS = -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
override CFLAGS += $(INCS) $(XCFLAGS)

View File

@ -0,0 +1,25 @@
DESCRIPTION = "blktrace - generate traces of the I/O traffic on block devices"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
DEPENDS = "libaio"
PR = r0
PV = "1.0.1+git${SRCPV}"
SRC_URI = "git://git.kernel.dk/blktrace.git;protocol=git \
file://blktrace-makefile.patch"
SRC_URI[md5sum] = "588aa9ab8a14d1766ab3f061d728ed89"
SRC_URI[sha256sum] = "f3cb6a3df1b3dc67369c7c4da3444a7897aa8a18e55937b368e0a6aa2f64b3aa"
S = "${WORKDIR}/git"
do_compile() {
oe_runmake ARCH="${ARCH}" CC="${CC}" LD="${LD}" prefix=${prefix}
}
do_install() {
oe_runmake ARCH="${ARCH}" CC="${CC}" LD="${LD}" \
prefix=${prefix} DESTDIR=${D} install
}