blktrace.git
9 years agoiowatcher: Fix spindle rotation in the movie mode
Chris Mason [Mon, 14 Jan 2013 21:05:13 +0000 (16:05 -0500)]
iowatcher: Fix spindle rotation in the movie mode

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
9 years agoiowatcher: Fix some rounding errors around the max offset
Chris Mason [Fri, 26 Oct 2012 19:23:40 +0000 (15:23 -0400)]
iowatcher: Fix some rounding errors around the max offset

set_gdd_bit makes sure that we don't try to set bits past the max offset
we used to allocate our gdd array.

But, it only does this when the function is first called, and the whole
byte range for the IO we're recording may go past max offset.  This adds
a check to be sure we stay in the right range.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
9 years agoiowatcher: Fix crash due to missing queue action
Jan Kara [Tue, 23 Oct 2012 09:05:31 +0000 (11:05 +0200)]
iowatcher: Fix crash due to missing queue action

When queue action was missing from a trace, handling of dispatch didn't
quite get things right and crashed due to NULL pointer dereference.
Fix it.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
9 years agoiowatcher: Add -K command line option to keep the movie svg files
Chris Mason [Mon, 22 Oct 2012 15:51:41 +0000 (11:51 -0400)]
iowatcher: Add -K command line option to keep the movie svg files

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
9 years agoiowatcher: Only hash IOs if there are completion or issue events
Chris Mason [Mon, 22 Oct 2012 15:22:55 +0000 (11:22 -0400)]
iowatcher: Only hash IOs if there are completion or issue events

We use an IO hash table to keep track of the IOs in flight, and this is
used to calculate the latencies from when we issue the IO to when
we complete the IO.

But if there are no completion events, io is never removed from the hash
table.  It grows very large and slows down the run.

Since we already scan all the events looking for outliers, this commit
checks for each major type of event during the scan.  If there are
no completion and no issue events, we don't bother inserting things
into the hash table.

If there are no completion events, we clean up during the issue event.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
9 years agoiowatcher: iowatcher: support png2theora for videos
Eric Sandeen [Thu, 18 Oct 2012 21:42:38 +0000 (15:42 -0600)]
iowatcher: iowatcher: support png2theora for videos

ffmpeg is not available on all distributions, so include Theora
as an option, via png2theora, if the output movie filename ends
in .ogg or .ogv

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
9 years agoiowatcher: Fix path name handling when the trace files are in the current directory
Chris Mason [Wed, 17 Oct 2012 19:45:49 +0000 (15:45 -0400)]
iowatcher: Fix path name handling when the trace files are in the current directory

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
9 years agoiowatcher: Fix buffer overwrite issue
Yuanhan Liu [Fri, 12 Oct 2012 16:09:29 +0000 (10:09 -0600)]
iowatcher: Fix buffer overwrite issue

Current code allocates buffer for path based on strdup, which would let
the size of path equals to the size of blktrace_dest_dir. But the code
next that joins it with the filename of dump file, which would overwrite
the buffer, and triggered an issue like following:

$ ./iowatcher -t trace.dump -o trace.svg
Unable to find trace file ./trace.dumpY
                                      ^

Refactoring join_path a bit to fix this issue.

Cc: Liu Bo <liub.liubo@gmail.com>
Signed-off-by: Yuanhan Liu <yliu.null@gmail.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
9 years agoiowatcher: add blktrace destination options
Liu Bo [Fri, 28 Sep 2012 03:55:14 +0000 (21:55 -0600)]
iowatcher: add blktrace destination options

Add 'D' for blktrace destination options so that we can save trace
in the destination directory.

Signed-off-by: Liu Bo <liub.liubo@gmail.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Per process IO graphs
Jan Kara [Mon, 10 Sep 2012 08:09:48 +0000 (10:09 +0200)]
iowatcher: Per process IO graphs

Add support for displaying different processes with different color in
the IO graph and movie.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Make sure we add the xtick labels if we're only plotting IO
Chris Mason [Fri, 21 Sep 2012 18:03:50 +0000 (14:03 -0400)]
iowatcher: Make sure we add the xtick labels if we're only plotting IO

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Merge branch 'jan'
Chris Mason [Tue, 11 Sep 2012 01:01:02 +0000 (21:01 -0400)]
iowatcher: Merge branch 'jan'

Jan Kara's updates for xzoom and yzoom

Conflicts:
main.c

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add option to set action which should be displayed in the IO graph
Jan Kara [Thu, 6 Sep 2012 16:23:05 +0000 (18:23 +0200)]
iowatcher: Add option to set action which should be displayed in the IO graph

Sometimes this is useful to see how IO scheduler or storage itself
changes the IO submitted by the application.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Improve xticks logic
Jan Kara [Thu, 6 Sep 2012 10:45:34 +0000 (12:45 +0200)]
iowatcher: Improve xticks logic

Ticks on x axis used integral step and fixed number of ticks. That generates
wrong results e.g. for 13s long trace with 10 ticks... Allow the code to
somewhat alter the number of ticks and also use non-integral step.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add options to limit time and sector range
Jan Kara [Fri, 31 Aug 2012 09:37:49 +0000 (11:37 +0200)]
iowatcher: Add options to limit time and sector range

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Ignore trace records beyond max_seconds
Jan Kara [Thu, 6 Sep 2012 08:14:59 +0000 (10:14 +0200)]
iowatcher: Ignore trace records beyond max_seconds

Currently we report error when we find a trace record beyond max_seconds.
When we allow user to set end of displayed period, records after the end
of period are no longer a bug so just ignore them.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add possibility to limit seconds from below
Jan Kara [Wed, 5 Sep 2012 21:01:08 +0000 (23:01 +0200)]
iowatcher: Add possibility to limit seconds from below

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Rename seconds to max_seconds
Jan Kara [Wed, 5 Sep 2012 20:08:24 +0000 (22:08 +0200)]
iowatcher: Rename seconds to max_seconds

Later we will add min_seconds to complement this.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add support for limitting IO graph offset from below
Jan Kara [Sat, 1 Sep 2012 21:31:46 +0000 (23:31 +0200)]
iowatcher: Add support for limitting IO graph offset from below

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix filtering of outliers from below
Jan Kara [Sat, 1 Sep 2012 21:37:20 +0000 (23:37 +0200)]
iowatcher: Fix filtering of outliers from below

There are lots of trace actions which do not carry a sector with them (e.g.
plug, unplug, ...). Thus sector is 0 for them and that results in trimming
of outliers from below never working. Fix the problem by accounting only
Queue events in the outlier statistics.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Define mask of trace action and use it instead of opencoding the constant
Jan Kara [Sat, 1 Sep 2012 21:35:55 +0000 (23:35 +0200)]
iowatcher: Define mask of trace action and use it instead of opencoding the constant

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix typo in option description
Jan Kara [Thu, 30 Aug 2012 13:59:01 +0000 (15:59 +0200)]
iowatcher: Fix typo in option description

Short variant of --movie is -m, not -p.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Check for null mpstat structs while generating plots
Chris Mason [Fri, 31 Aug 2012 00:42:30 +0000 (20:42 -0400)]
iowatcher: Check for null mpstat structs while generating plots

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add -c to split the graphs up into multiple columns
Chris Mason [Tue, 28 Aug 2012 06:15:11 +0000 (02:15 -0400)]
iowatcher: Add -c to split the graphs up into multiple columns

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix divide by zero while calculating averages
Chris Mason [Mon, 27 Aug 2012 22:27:59 +0000 (18:27 -0400)]
iowatcher: Fix divide by zero while calculating averages

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Update the README and the --help output
Chris Mason [Mon, 27 Aug 2012 22:09:57 +0000 (18:09 -0400)]
iowatcher: Update the README and the --help output

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Start support for multiple colums of plots
Chris Mason [Mon, 27 Aug 2012 21:39:58 +0000 (17:39 -0400)]
iowatcher: Start support for multiple colums of plots

The movie mode is updated to put extra plots on
the side.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix io line graphs at the edge of the X axis
Chris Mason [Mon, 27 Aug 2012 17:00:30 +0000 (13:00 -0400)]
iowatcher: Fix io line graphs at the edge of the X axis

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix the line graphs for values near the edges of the graph
Chris Mason [Mon, 27 Aug 2012 16:53:51 +0000 (12:53 -0400)]
iowatcher: Fix the line graphs for values near the edges of the graph

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Fix mpstat file permissions
Chris Mason [Mon, 27 Aug 2012 16:22:28 +0000 (12:22 -0400)]
iowatcher: Fix mpstat file permissions

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add initial support for flash tracing
Chris Mason [Fri, 24 Aug 2012 18:31:29 +0000 (14:31 -0400)]
iowatcher: Add initial support for flash tracing

This is incomplete, but it will catch messages from
the flash driver to find the actual chip an IO
was sent to.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add a new movie mode that maps the IOs onto a platter.
Chris Mason [Tue, 21 Aug 2012 19:19:35 +0000 (15:19 -0400)]
iowatcher: Add a new movie mode that maps the IOs onto a platter.

The --movie option defaults to spindle mode now,
but you can choose --movie=rect or --movie=spindle
as well.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Switch to ffmpeg for movie encoding. Chrome and vlc like these better.
Chris Mason [Tue, 21 Aug 2012 13:18:15 +0000 (09:18 -0400)]
iowatcher: Switch to ffmpeg for movie encoding.  Chrome and vlc like these better.

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add back missing plot title
Chris Mason [Mon, 20 Aug 2012 20:15:55 +0000 (16:15 -0400)]
iowatcher: Add back missing plot title

11 years agoiowatcher: Fix --help definition
Chris Mason [Mon, 20 Aug 2012 19:30:38 +0000 (15:30 -0400)]
iowatcher: Fix --help definition

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add mpstat.[ch] into git
Chris Mason [Mon, 20 Aug 2012 18:36:19 +0000 (14:36 -0400)]
iowatcher: Add mpstat.[ch] into git

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add movie support
Chris Mason [Fri, 17 Aug 2012 16:18:28 +0000 (12:18 -0400)]
iowatcher: Add movie support

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Add mpstat graphing support
Chris Mason [Thu, 16 Aug 2012 18:46:33 +0000 (14:46 -0400)]
iowatcher: Add mpstat graphing support

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
11 years agoiowatcher: Initial revision
Chris Mason [Wed, 15 Aug 2012 20:10:55 +0000 (16:10 -0400)]
iowatcher: Initial revision

Signed-off-by: Chris Mason <chris.mason@fusionio.com>