summaryrefslogtreecommitdiff
path: root/sys-block/blktrace
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-26 15:48:02 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-26 15:48:02 +0000
commit38b7258d086dd5e263c3bbe3880c8c956676bc71 (patch)
tree6fce284d5bfddaf597a490ac66069d16c6a485db /sys-block/blktrace
parent0ebf740b9c9bc7c10ac41bea315ecc6c01c79166 (diff)
gentoo resync : 25.01.2018
Diffstat (limited to 'sys-block/blktrace')
-rw-r--r--sys-block/blktrace/Manifest5
-rw-r--r--sys-block/blktrace/blktrace-1.2.0.ebuild53
-rw-r--r--sys-block/blktrace/files/blktrace-1.2.0-ldflags.patch89
-rw-r--r--sys-block/blktrace/files/blktrace-1.2.0-overlapping-io-stats.patch68
-rw-r--r--sys-block/blktrace/files/blktrace-1.2.0-parallel-build.patch71
5 files changed, 286 insertions, 0 deletions
diff --git a/sys-block/blktrace/Manifest b/sys-block/blktrace/Manifest
index 7f583dfdf4a3..5a2cd72487ef 100644
--- a/sys-block/blktrace/Manifest
+++ b/sys-block/blktrace/Manifest
@@ -1,8 +1,13 @@
AUX blktrace-1.0.1-ldflags-parallel-make.patch 2951 BLAKE2B 478ad1fb6c00c6d7813318b34842ecf779946b2267d52c1c17e21430a52cae02f0268f30146b67486805ef770c03fdb8ec426854aa2e37e37a02627a62f69334 SHA512 b384b90d86e52d8a314efa2bee2ae67ed562d56b2c2412211e28cae9dabb448378fe083e0dfe30b6462c5e5d1d85ad7fda6c7d81e3ede0da5ba4c73606b36c7b
AUX blktrace-1.1.0-ldflags-parallel-make.patch 3043 BLAKE2B e6c3c6fd23795f18665ddc39ab55b351c1250cdb29bbbc171d8fcf4f0a0f2b2be94e7f697e2fd83d1dc56353aa98a8604fc540cb82e5c2800990dee0b9c01fbd SHA512 d119ef833ca50527a9f2705ff4a741a9d091625286253bf0d7440f695326eaa753232965bf69a6dad4ea24cf411ef2a992d4226e009d9b4fcadbec616c384fce
+AUX blktrace-1.2.0-ldflags.patch 2748 BLAKE2B 2e5bb94aeb829d6f187bb22c109f732fd442df20c1da4acc4cb31fff46d51e9dc37f0aa2c2bceac661c334c0f1727214fba4ee22455e4df2a58efb817d9eb1c3 SHA512 d0a411020f7ca01beea5c7915e1d934c93120d86111d789fd2c7719d10b116e56634b86fe5f37717e104c6493bbce2878df2abf9ddea8ba87089cb2f0a01c084
+AUX blktrace-1.2.0-overlapping-io-stats.patch 1973 BLAKE2B 2ba883a033f24b9c3b70bab6f4b1c0843452cb1ec63b5d3efda549b0ff99d01170e43b9bcb8ab9ccb3206792aac7f69bc1b1fee5e39378159d4c30463bc8abc3 SHA512 b72a7f6bb03105e7e10116c70bc79d4fe131f223cf5d56649850f777c59226a8c78d7f0dc758fba97891f2f29bde903e41c7bf5e04cae710058a3e38017c02b7
+AUX blktrace-1.2.0-parallel-build.patch 2300 BLAKE2B 87ff4b31b845aee1fe8f14a8a6d35d08d386969eee05c07b2e1b3de2fa2f039d49d699228ef01793cee935ecea5517c9603956866ac3f677eafbb153f9b5382f SHA512 fbb2b217b73072e408e1bad7e3b663935cb005c4ee5cf3dbb1d02cc17b55b511f5982e108545159d0968e8b6ec759441953fd127ad0beeb8661d51fcf9ba6ca1
DIST blktrace-1.0.3.tar.bz2 359325 BLAKE2B c776fe0445eadbb2d077435626e6ffdd330ba2f49d053bfd247ed7f421b9bd588d38acd32133ebac69e0fc63f165fe0e6b3324bf8313a14000cf02e3a5e735cf SHA512 f20a33b5309146304277a5f8a4c7f2c61e804b2caa5c62d00425ef26fcd1cd628521067b2502d05c368e10d2cd38a98c246030705ba358f835e8a6921444f9a5
DIST blktrace-1.1.0.tar.bz2 395445 BLAKE2B 8a19142991527813942e6377baa5de825572196e75ea43606f2ae2db73d9278c8178f104910ecd92593a70fe9c86c36ebd718e09599e88824f5faaddca5bd7cd SHA512 52ed3b66e1ec62c2204d44037d4d13218fd0229ae694493a21f1e83bfc8aeb029edc96b2be83f39cc3e79500abad56cd5a71c8c4e6dd836661777662f3628355
+DIST blktrace-1.2.0.tar.bz2 395193 BLAKE2B 8f8505f27985f0451f75ced0e438a88758482227e83ba8de235986ab3f116cf38d5aec340d1e7ce3dc3aa5a97c0bd4c46265687976e7326a54ea2e7cce4afc82 SHA512 ce82c8010ca5c2868746d8eb7c6a107fc7382c05df949eeff79e612f5b1a98301a5aa5ab39de0766ea1c074f95e378ba985401cbeba9a296e3182da7d7a23b86
EBUILD blktrace-1.0.3.ebuild 1341 BLAKE2B e0e7f346df9458c282dc3c5a182979ad5482564ebf179b37d3b0115d5df3d32265aa9dbf01d5569bb1ce9e57023f506c817b1fa89bd868a1b370b848864114c6 SHA512 2808c804ef3773220f218d0c8bedf43712df81be86dabafd5276e6e20067f4d42820c01661db5e81d38d312db51c3ab79f959debb87f91f9b153448401ac3215
EBUILD blktrace-1.1.0-r1.ebuild 1257 BLAKE2B 06ba4fe01da853678b04b1906768ee1d4d2220b151ca7664538222fb90d6b8f8a4bba7ce488b93e5675b83f087df50f0295f603fa0ce9d438ce5b6dc57526947 SHA512 0468940d295b87c97cb8e81d831a3d1d83fccc3cf5e23be6035f9012a6ae51a9f7651e2af49a3ecdd8b1667fcd7a2cdf3575ab0a306f10e5bf7c00c7ee37ec77
EBUILD blktrace-1.1.0.ebuild 1265 BLAKE2B 4a56cd81084a917894c128ed7b0ebe3049d986a50cad10d3f49124e5134ca9cbed52a1f9e6c81985fa7d57d4b76f2c4f2063ec382eac7b41643d0efb8755fc78 SHA512 f25ba23b7f908e4eb9f07df183bd61546e9f221f04de9e1fe203e55854e76ba78c77bf8cc4eda2eef1e57b30734dd3fbe2e33d6816f2d177057590ad0b00d5fb
+EBUILD blktrace-1.2.0.ebuild 1350 BLAKE2B 8ab45bfff4a8f91fac5b751913995bd42e1bebb4d070039c9a9ff7596ea173f2b00f59b4d44c6c0f9d074558070aa2f6440e517015341df7891b2f5bde86b4aa SHA512 2ac7416257f4b43d6da7aa16c10852a27329957a1e2193957260d359cb15410dde1ff9a574cdba5387779858bd201999f652593bf164d2e4d4b1e9588b14086c
MISC metadata.xml 216 BLAKE2B 20531789dc11e43feee7ec315a0c1c7249fdf73764e29cb7d6db439826e9ff72f24a5cdb8eb7f1ab99bbb41fb6e4226874a1d1fa4185de52598602bb3b0479a3 SHA512 e881b59fe49746eb25ad66c258b41aba501e4eb563129093a3898ea970a20506e7898f7c355cfcf99605234962bf2c77c1309c258b9a2b84ee4302ccb71c9dbd
diff --git a/sys-block/blktrace/blktrace-1.2.0.ebuild b/sys-block/blktrace/blktrace-1.2.0.ebuild
new file mode 100644
index 000000000000..063a913b54ba
--- /dev/null
+++ b/sys-block/blktrace/blktrace-1.2.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs flag-o-matic linux-info
+
+MY_PN="blktrace"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="show detailed info about what is happening on a block device io queue"
+HOMEPAGE="http://git.kernel.dk/cgit/blktrace/"
+SRC_URI="http://brick.kernel.dk/snaps/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE="doc"
+
+RDEPEND="dev-libs/libaio"
+# This is a Linux specific app!
+DEPEND="${RDEPEND}
+ sys-kernel/linux-headers
+ doc? (
+ virtual/latex-base
+ || ( >=app-text/texlive-core-2014 app-text/dvipdfm )
+ )
+"
+S="${WORKDIR}/${MY_P}"
+
+CONFIG_CHECK="~BLK_DEV_IO_TRACE"
+WARNING_BLK_DEV_IO_TRACE="you need to enable BLK_DEV_IO_TRACE kernel option if you want to gather traces from this machine"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-overlapping-io-stats.patch
+ "${FILESDIR}"/${PN}-1.2.0-ldflags.patch #335741
+ "${FILESDIR}"/${PN}-1.2.0-parallel-build.patch #335741
+)
+
+src_compile() {
+ append-cppflags -DLVM_REMAP_WORKAROUND -W -I"${S}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${CPPFLAGS}"
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs
+ fi
+}
+
+src_install() {
+ emake install DESTDIR="${ED}" prefix="/usr" mandir="/usr/share/man"
+ einstalldocs
+ use doc && dodoc doc/blktrace.pdf btt/doc/btt.pdf
+}
diff --git a/sys-block/blktrace/files/blktrace-1.2.0-ldflags.patch b/sys-block/blktrace/files/blktrace-1.2.0-ldflags.patch
new file mode 100644
index 000000000000..b8e2aebfff4f
--- /dev/null
+++ b/sys-block/blktrace/files/blktrace-1.2.0-ldflags.patch
@@ -0,0 +1,89 @@
+http://git.kernel.dk/?p=blktrace.git;a=commit;h=d1398e339585f6750f7158c50c98861b68dddc8b
+
+From 6d8c3d7a10f62b26514a56b25a3744c5f35219a6 Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Tue, 23 Jan 2018 17:40:48 -0500
+Subject: [PATCH] respect LDFLAGS when linking programs
+
+---
+ Makefile | 10 +++++-----
+ btreplay/Makefile | 4 ++--
+ btt/Makefile | 2 +-
+ iowatcher/Makefile | 2 +-
+ 4 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index fdbded02ee0a..68de59183a73 100644
+--- a/Makefile
++++ b/Makefile
+@@ -26,19 +26,19 @@ btreplay/btreplay:
+ $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+
+ blkparse: blkparse.o blkparse_fmt.o rbtree.o act_mask.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blktrace: blktrace.o act_mask.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ verify_blkparse: verify_blkparse.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blkrawverify: blkrawverify.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ blkiomon: blkiomon.o rbtree.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS) -lrt
+
+ $(PROGS): | depend
+
+diff --git a/btreplay/Makefile b/btreplay/Makefile
+index 2998182401e7..f574a2976ec1 100644
+--- a/btreplay/Makefile
++++ b/btreplay/Makefile
+@@ -32,10 +32,10 @@ clean: docsclean
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btrecord: btrecord.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^)
+
+ btreplay: btreplay.o
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ depend:
+ @$(CC) -MM $(CFLAGS) *.c 1> .depend
+diff --git a/btt/Makefile b/btt/Makefile
+index df7a3de6b3fb..32075573954c 100644
+--- a/btt/Makefile
++++ b/btt/Makefile
+@@ -38,7 +38,7 @@ clean: docsclean
+ $(CC) $(CFLAGS) -c -o $*.o $<
+
+ btt: $(OBJS)
+- $(CC) $(CFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) $(LIBS)
+
+ ifneq ($(wildcard .depend),)
+ include .depend
+diff --git a/iowatcher/Makefile b/iowatcher/Makefile
+index e013556f3ae1..a224a0848cc8 100644
+--- a/iowatcher/Makefile
++++ b/iowatcher/Makefile
+@@ -19,7 +19,7 @@ all: $(ALL)
+ $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+
+ iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
+- $(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(filter %.o,$^) -lm -lrt
+
+ depend:
+ @$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
+--
+2.15.1
+
diff --git a/sys-block/blktrace/files/blktrace-1.2.0-overlapping-io-stats.patch b/sys-block/blktrace/files/blktrace-1.2.0-overlapping-io-stats.patch
new file mode 100644
index 000000000000..11c495efbc0c
--- /dev/null
+++ b/sys-block/blktrace/files/blktrace-1.2.0-overlapping-io-stats.patch
@@ -0,0 +1,68 @@
+http://git.kernel.dk/?p=blktrace.git;a=commit;h=8fc451c6b0b9a7db7c376ea6865c35321e561f00
+
+From 8fc451c6b0b9a7db7c376ea6865c35321e561f00 Mon Sep 17 00:00:00 2001
+From: Gwendal Grignou <gwendal@chromium.org>
+Date: Fri, 18 Aug 2017 15:00:22 -0700
+Subject: [PATCH] btt: Fix overlapping IO stats.
+
+Keep scanning the tree for overlapping IO otherwise Q2G and process
+traces will be incorrect.
+
+Let assume we have 2 IOs:
+
+A A+a
+|---------------------------------------|
+ B B+b
+ |-----------------|
+
+In the red/black tree we have:
+
+ o -> [A,A+a]
+ / \
+ left right
+ / \
+ [...]o o -> [B, B+b]
+
+In the current code, if we would not be able to find [B+b] in the tree:
+B is greater than A, so we won't go left
+B+b is smaller than A+a, so we are not going right either.
+
+When we have a [X, X+x] IO to look for:
+We need to check for right when either:
+ X+x >= A+a (for merged IO)
+and
+ X > A (for overlapping IO)
+
+TEST=Check with a trace with overlapping IO: Q2C and Q2G are expected.
+
+Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+---
+ btt/dip_rb.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/btt/dip_rb.c b/btt/dip_rb.c
+index 2aa7ffcc763b..6efef6c03b8f 100644
+--- a/btt/dip_rb.c
++++ b/btt/dip_rb.c
+@@ -57,7 +57,7 @@ struct io *rb_find_sec(struct rb_root *root, __u64 sec)
+ __iop = rb_entry(n, struct io, rb_node);
+ if (sec < BIT_START(__iop))
+ n = n->rb_left;
+- else if (sec >= BIT_END(__iop))
++ else if (sec > BIT_START(__iop))
+ n = n->rb_right;
+ else
+ return __iop;
+@@ -82,7 +82,7 @@ void rb_foreach(struct rb_node *n, struct io *iop,
+ }
+ if (iop_s < this_s)
+ rb_foreach(n->rb_left, iop, fnc, head);
+- if (this_e < iop_e)
++ if ((this_e < iop_e) || (this_s < iop_s))
+ rb_foreach(n->rb_right, iop, fnc, head);
+ }
+ }
+--
+2.15.1
+
diff --git a/sys-block/blktrace/files/blktrace-1.2.0-parallel-build.patch b/sys-block/blktrace/files/blktrace-1.2.0-parallel-build.patch
new file mode 100644
index 000000000000..129f04107fa1
--- /dev/null
+++ b/sys-block/blktrace/files/blktrace-1.2.0-parallel-build.patch
@@ -0,0 +1,71 @@
+http://git.kernel.dk/?p=blktrace.git;a=commit;h=519fd9a5d08d85f3d9cb4192d624fe8351e40232
+
+From 4569544261be495bdec0574d7729c85a62dabad7 Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Thu, 3 Feb 2011 03:07:06 +0000
+Subject: [PATCH] fix parallel build failures
+
+When building in parallel, the btreplay/btrecord and btreplay/btreplay
+targets cause make to kick off two jobs for `make -C btreplay` and they
+sometimes end up clobbering each other. We could fix this by making one
+a dependency of the other, but it's a bit cleaner to refactor things to
+be based on subdirs. This way changes in subdirs also get noticed:
+ $ touch btreplay/*.[ch]
+ $ make
+ <btreplay is now correctly updated>
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 24 ++++++++++--------------
+ 1 file changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 68de59183a73..5917814d0344 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,23 +4,19 @@ ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+ PROGS = blkparse blktrace verify_blkparse blkrawverify blkiomon
+ LIBS = -lpthread
+ SCRIPTS = btrace
++SUBDIRS = btreplay btt iowatcher
+
+-ALL = $(PROGS) $(SCRIPTS) btt/btt btreplay/btrecord btreplay/btreplay \
++ALL = $(PROGS) $(SCRIPTS)
++INSTALL_ALL = $(ALL) btt/btt btreplay/btrecord btreplay/btreplay \
+ btt/bno_plot.py iowatcher/iowatcher
+
+-all: $(ALL)
++all: $(ALL) $(SUBDIRS)
+
+-btt/btt:
+- $(MAKE) -C btt
+-
+-iowatcher/iowatcher:
+- $(MAKE) -C iowatcher
+-
+-btreplay/btrecord:
+- $(MAKE) -C btreplay
+-
+-btreplay/btreplay:
+- $(MAKE) -C btreplay
++# We always descend into subdirs because they contain their own dependency
++# information which we don't track in this top level Makefile.
++$(SUBDIRS):
++ $(MAKE) -C $@
++.PHONY: $(SUBDIRS)
+
+ %.o: %.c
+ $(CC) -o $*.o -c $(ALL_CFLAGS) $<
+@@ -85,7 +81,7 @@ install: all
+ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man8
+- $(INSTALL) -m 755 $(ALL) $(DESTDIR)$(bindir)
++ $(INSTALL) -m 755 $(INSTALL_ALL) $(DESTDIR)$(bindir)
+ $(INSTALL) -m 644 doc/*.1 $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -m 644 doc/*.8 $(DESTDIR)$(mandir)/man8
+
+--
+2.15.1
+