On Wed, 2006-12-20 at 14:02 +0100, Jens Axboe wrote:
> On Wed, Dec 20 2006, Jens Axboe wrote:
> > On Wed, Dec 20 2006, Jens Axboe wrote:
> > > Irk, do_pipe() needs to know what the input is, obviously. Lemme add
> > > that as well.
> >
> > This has a better chance of working, still not tested though. If you can
> > test, I'll commit it once we have it working.
>
> It works for me, just tested it. Patch committed.
>
yes, works. thx.
now the fifo will use a name pattern like foo. but regular file will use
foo.blktrace.X and if you give full name, blkparse does not report any
warning or error, just return 0 results. this drove me nuts before i
read the code.
[EMAIL PROTECTED] blktrace]$ ./blkparse a.a.blktrace.0
WARNING: full file name given. Should give trace name foo,
instead of file name foo.blktrace.x
Throughput (R/W): 0KiB/s / 0KiB/s
Events (a.a.blktrace.0): 0 entries
Skips: 0 forward (0 - nan%)
[EMAIL PROTECTED] blktrace]$ ./blkparse a.a
Input file a.a.blktrace.0 added
8,16 0 1 0.000000000 4586 Q R 400000 + 8 [a.out]
...
8,16 0 25 0.000851377 9 C W 400008 + 8 [0]
CPU0 (a.a):
Reads Queued: 2, 8KiB Writes Queued: 2,
8KiB
Read Dispatches: 2, 8KiB Write Dispatches: 2,
8KiB
Reads Requeued: 0 Writes Requeued: 0
Reads Completed: 2, 8KiB Writes Completed: 2,
8KiB
Read Merges: 0 Write Merges: 0
Read depth: 1 Write depth: 1
IO unplugs: 1 Timer unplugs: 0
Throughput (R/W): 0KiB/s / 0KiB/s
Events (a.a): 25 entries
Skips: 0 forward (0 - 0.0%)
so suggest to have this as a warning.
diff --git a/blkparse.c b/blkparse.c
index cbb422f..f613fe2 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -2236,6 +2236,11 @@ static int setup_file(struct per_dev_inf
pci->cpu = cpu;
pci->fdblock = -1;
+ if (strcasestr(pdi->name, ".blktrace.")) {
+ printf("WARNING: full file name given. Should give trace name
foo,\n");
+ printf("\tinstead of file name foo.blktrace.x\n");
+ }
+
p = strdup(pdi->name);
dname = dirname(p);
if (strcmp(dname, ".")) {
-
To unsubscribe from this list: send the line "unsubscribe linux-btrace" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html