summaryrefslogtreecommitdiff
path: root/btt/seek.c
AgeCommit message (Collapse)Author
2012-02-01Fix compiler warningsJens Axboe
One was a real bug, assigned i_time twice instead of c_time (which was left unitialized). Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-02-01Fix several leaks on error pathsEric Sandeen
In several cases space is allocated for a filename but not freed if open of that file fails. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2009-10-08btt: better data file namingAlan D. Brunelle
More logical naming for .dat files created. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
2009-02-13btt general cleanup plus valgrind cleanAlan D. Brunelle
Lots of general clean up of code, getting interfaces across different files to be similar (all are no alloc/free), and made it valgrind clean. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com
2009-01-23Fix btt to handle large numbers of output filesAlan D. Brunelle
Simply bump resource limits if file opens fail, and retry. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
2008-05-21Handled no difference in seek timesAlan D. Brunelle
For some reason recent kernels (2.6.25.4, for example) we've lost a lot of resolution in our blktrace times. This can result in lots of things happening "simultaneously." This change at least tries to handle the case where all the seeks happen at once. Probably have other issues that need to be looked into...
2008-05-21Added in -m option, seeks-per-secondAlan D. Brunelle
btt can now output data files containing seeks-per-second information.
2008-02-13Cleanups: Fixed IOPs in btt left over at end of runAlan D. Brunelle
o Using valgrind, determined we had Q IOPs left over that weren't used. Added "all" list, and then deleted these at end. o Removed old debug stuff (COUNT_IOS, DEBUG, ...) o Fixed a bunch of white space at end of lines. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
2007-09-10Major revamping (ver 2.0)Alan D. Brunelle
After a lot of fighting with maintaining a tree-styled design (each trace having it's own node), it was just getting too cumbersome to work in all circumstances. Taking a clue from blkparse itself, I decided to just keep track of IOs at queue time, and updating fields based upon later traces. The attached (large) patch works much faster, handles larger test cases with less failures, and is managing some pretty large jobs I'm working on (large Oracle-based DB analysis - 32-way box w/ lots of storage). I've also added a Q2Q seek distance feature - it's come in handy when comparing results of IO scheduler choice: We can see what the incoming IO seek distances are (at queue time), and then see how the scheduler itself manages things (via merges & sorting) by looking at D2D seek distances generated. As noted in the subject, I arbitrarily bumped this to version 2.00 as the innards are so different. The documentation (btt/doc/btt.tex) has been updated to reflect some minor output changes. I also fixed a bug dealing with process name notification: there was a problem that if a new PID came up with a name that was previously seen, btt wouldn't keep track of it right. [When running with Oracle, a lot of processes have the same name but different PIDs of course.] Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-04-14Combine all outstanding patches into one /big patch/Alan D. Brunelle
o Added seek absolute option -- allows one to specify whether they want seek distances to be calculated based upon nearness to previous IO or from start to start. o Added block number dumping o Updated btt documentation for above. o Significant clean up of memory used and files opened. All allocated memory and opened files are cleaned up prior to normal program exit. o Fixed problem where Q & M traces were not being freed properly. o Fixed problem where bilink structures were not being freed properly. o Fixed omission -- output combined seeks in addition to read and write seeks. Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-10-03[PATCH] Convert to using on-the-fly RB trees, no post-traversal.Alan David Brunelle
From: Alan D. Brunelle <Alan.Brunelle@hp.com> - Converted to using RB trees as much as possible - significant speed up in general. - Changed from constructing IO bushes to just doing things inline as we get the traces. Significant speed up and reduction in complexity. Lost ability to absolutely handle REQUEUE traces (may put out the wrong min/max information for certain stats). - Added btt/dip_rb.c - Removed btt/traverse.c btt/iofree.c btt/cylist.c - Fixed message concerning stats & range data to include '.dat' - Added in timing statistics (K traces per second handled) - Changed verbose to just update once per second - Added notions of "foreach" iterators for devices, processes, IO traces, ... - Removed a lot of redundant code in output (using iterators instead) - If not interested in seek information, don't calculate a lot of stuff - again, significant speed up. Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-09-21[PATCH] Added in Q2C and D2C latency output option.Alan David Brunelle
Also: cleaned up empty seek and latency files on exit. Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-15[PATCH] btt: seek additionsAlan D. Brunelle
Added seek analysis to btt: ==================== Device Seek Information ==================== DEV | NSEEKS MEAN MEDIAN | MODE ---------- | --------------- --------------- --------------- | --------------- ( 8, 16) | 15573 10297802.6 0 | 0(10710) Shows the: - Device (major, minor) - Number of seeks (IOs issued to driver) - Average (mean) of sector differences IO-to-IO - Median seek (sector difference) - Mode(s) - showing the mode and the number of times it occurred, thus in this example we see 68.8% of the "seeks" were contiguous (or overlapping). Also added in the ability to dump all read and write seek values: [ -s <output name> | --seeks=<output name> ] Will create files with the name: seek_<mjr,mnr>_[rw].dat like: seek_008,016_r.dat seek_008,016_w.dat Which contain relative sector offsets for reads and writes respectively. Signed-off-by: Jens Axboe <axboe@kernel.dk>